From eb72b3184365bb4a51e1909d767403ae13b086a0 Mon Sep 17 00:00:00 2001 From: matthiasmatt Date: Tue, 22 Oct 2024 20:10:50 +0200 Subject: [PATCH] feat: fix the 0 check --- x/evm/keeper/msg_server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/evm/keeper/msg_server.go b/x/evm/keeper/msg_server.go index 1874de1f4..b706b7ceb 100644 --- a/x/evm/keeper/msg_server.go +++ b/x/evm/keeper/msg_server.go @@ -647,7 +647,7 @@ func (k Keeper) convertCoinNativeERC20( // Burn escrowed Coins based on the actual amount received by the recipient actualReceivedAmount := big.NewInt(0).Sub(recipientBalanceAfter, recipientBalanceBefore) - if actualReceivedAmount.Cmp(coin.Amount.BigInt()) == 0 { + if actualReceivedAmount.Sign() == 0 { return nil, fmt.Errorf("no ERC20 tokens were received by the recipient") }