diff --git a/x/crosschain/keeper/evm_hooks.go b/x/crosschain/keeper/evm_hooks.go index ac2a5165fc..fb6e129cd6 100644 --- a/x/crosschain/keeper/evm_hooks.go +++ b/x/crosschain/keeper/evm_hooks.go @@ -329,7 +329,8 @@ func ValidateZrc20WithdrawEvent(event *zrc20.ZRC20Withdrawal, chainID int64) err if chains.IsBitcoinChain(chainID) { if event.Value.Cmp(big.NewInt(constant.BTCWithdrawalDustAmount)) < 0 { - return fmt.Errorf("ParseZRC20WithdrawalEvent: invalid amount %s", event.Value.String()) + return fmt.Errorf("ParseZRC20WithdrawalEvent: withdraw amount %s is less than minimum amount %d", + event.Value.String(), constant.BTCWithdrawalDustAmount) } addr, err := chains.DecodeBtcAddress(string(event.To), chainID) if err != nil { diff --git a/x/crosschain/keeper/evm_hooks_test.go b/x/crosschain/keeper/evm_hooks_test.go index 5518595a36..60367745eb 100644 --- a/x/crosschain/keeper/evm_hooks_test.go +++ b/x/crosschain/keeper/evm_hooks_test.go @@ -179,7 +179,7 @@ func TestValidateZrc20WithdrawEvent(t *testing.T) { // 999 satoshis cannot be withdrawn btcMainNetWithdrawalEvent.Value = big.NewInt(constant.BTCWithdrawalDustAmount - 1) err = crosschainkeeper.ValidateZrc20WithdrawEvent(btcMainNetWithdrawalEvent, chains.BitcoinMainnet.ChainId) - require.ErrorContains(t, err, "ParseZRC20WithdrawalEvent: invalid amount") + require.ErrorContains(t, err, "less than minimum amount") }) t.Run("unable to validate a event with an invalid chain ID", func(t *testing.T) {