Skip to content

Commit

Permalink
fix: allow passing empty whitelist info when initialize (to support u…
Browse files Browse the repository at this point in the history
…nit-testing)
  • Loading branch information
TuDo1403 committed Jan 2, 2025
1 parent 2f8d91b commit bbd2ce4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/mainchain/MainchainGatewayV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ contract MainchainGatewayV3 is
_grantRole(_MIGRATOR_ROLE, migrator);
_restrict(this.requestDepositFor.selector, _toBitmap(TokenStandard.ERC20));
_restrict(this.submitWithdrawal.selector, _toBitmap(TokenStandard.ERC20));
_whitelist(tokens, recipients, remoteChainSelectors);
if (tokens.length != 0 || recipients.length != 0 || remoteChainSelectors.length != 0) {
_whitelist(tokens, recipients, remoteChainSelectors);
}
emergencyPauser = newEmergencyPauser;
}

Expand Down
4 changes: 3 additions & 1 deletion src/ronin/gateway/RoninGatewayV3.sol
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ contract RoninGatewayV3 is
_grantRole(_MIGRATOR_ROLE, migrator);
_restrict(this.requestWithdrawalFor.selector, _toBitmap(TokenStandard.ERC20));
_restrict(this.bulkRequestWithdrawalFor.selector, _toBitmap(TokenStandard.ERC20));
_whitelist(tokens, recipients, remoteChainSelectors);
if (tokens.length != 0 || recipients.length != 0 || remoteChainSelectors.length != 0) {
_whitelist(tokens, recipients, remoteChainSelectors);
}
emergencyPauser = newEmergencyPauser;
}

Expand Down

0 comments on commit bbd2ce4

Please sign in to comment.