Skip to content

Commit

Permalink
feat: fix the 0 check
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasmatt committed Oct 22, 2024
1 parent 476ffbc commit eb72b31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion x/evm/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down

0 comments on commit eb72b31

Please sign in to comment.