Skip to content

Commit

Permalink
fix: relax underlying asset check on OracleSwapFreezer constructor (#447
Browse files Browse the repository at this point in the history
)
  • Loading branch information
efecarranza authored Feb 20, 2025
1 parent b2b1801 commit 1936caa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ contract OracleSwapFreezer is AutomationCompatibleInterface {
uint128 unfreezeUpperBound,
bool allowUnfreeze
) {
require(gsm.UNDERLYING_ASSET() == underlyingAsset, 'UNDERLYING_ASSET_MISMATCH');
require(underlyingAsset != address(0), 'ZERO_ADDRESS_NOT_VALID');
require(
_validateBounds(
freezeLowerBound,
Expand Down
4 changes: 2 additions & 2 deletions src/test/TestGsmOracleSwapFreezer.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ contract TestGsmOracleSwapFreezer is TestGhoBase {
GHO_GSM.grantRole(GSM_SWAP_FREEZER_ROLE, address(swapFreezer));
}

function testRevertConstructorInvalidUnderlying() public {
vm.expectRevert('UNDERLYING_ASSET_MISMATCH');
function testRevertConstructorInvalidZeroAddress() public {
vm.expectRevert('ZERO_ADDRESS_NOT_VALID');
new OracleSwapFreezer(
GHO_GSM,
address(0),
Expand Down

0 comments on commit 1936caa

Please sign in to comment.