Skip to content

Commit

Permalink
chore(protocol): fix an error message in vaults (#17348)
Browse files Browse the repository at this point in the history
Co-authored-by: Keszey Dániel <[email protected]>
  • Loading branch information
adaki2004 and Keszey Dániel authored May 26, 2024
1 parent e79a367 commit 611785e
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/protocol/contracts/tokenvault/BaseVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ abstract contract BaseVault is

uint256[50] private __gap;

error VAULT_INSURFICIENT_FEE();
error VAULT_INSUFFICIENT_FEE();
error VAULT_INVALID_TO_ADDR();
error VAULT_PERMISSION_DENIED();

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/tokenvault/ERC1155Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ contract ERC1155Vault is BaseNFTVault, ERC1155ReceiverUpgradeable {
nonReentrant
returns (IBridge.Message memory message_)
{
if (msg.value < _op.fee) revert VAULT_INSURFICIENT_FEE();
if (msg.value < _op.fee) revert VAULT_INSUFFICIENT_FEE();

for (uint256 i; i < _op.amounts.length; ++i) {
if (_op.amounts[i] == 0) revert VAULT_INVALID_AMOUNT();
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/tokenvault/ERC20Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ contract ERC20Vault is BaseVault {
if (_op.amount == 0) revert VAULT_INVALID_AMOUNT();
if (_op.token == address(0)) revert VAULT_INVALID_TOKEN();
if (btokenDenylist[_op.token]) revert VAULT_BTOKEN_BLACKLISTED();
if (msg.value < _op.fee) revert VAULT_INSURFICIENT_FEE();
if (msg.value < _op.fee) revert VAULT_INSUFFICIENT_FEE();

(bytes memory data, CanonicalERC20 memory ctoken, uint256 balanceChange) =
_handleMessage(_op);
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/contracts/tokenvault/ERC721Vault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ contract ERC721Vault is BaseNFTVault, IERC721Receiver {
nonReentrant
returns (IBridge.Message memory message_)
{
if (msg.value < _op.fee) revert VAULT_INSURFICIENT_FEE();
if (msg.value < _op.fee) revert VAULT_INSUFFICIENT_FEE();

for (uint256 i; i < _op.tokenIds.length; ++i) {
if (_op.amounts[i] != 0) revert VAULT_INVALID_AMOUNT();
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/tokenvault/ERC20Vault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ contract TestERC20Vault is TaikoTest {

function test_20Vault_send_erc20_revert_if_allowance_not_set() public {
vm.startPrank(Alice);
vm.expectRevert(BaseVault.VAULT_INSURFICIENT_FEE.selector);
vm.expectRevert(BaseVault.VAULT_INSUFFICIENT_FEE.selector);
erc20Vault.sendToken(
ERC20Vault.BridgeTransferOp(
destChainId, address(0), Bob, 1, address(erc20), 1_000_000, 1 wei
Expand Down

0 comments on commit 611785e

Please sign in to comment.