Skip to content

Use a more clear error when deposit fails due to insufficient funds

Fix for #1810.

The error returned in the case of insufficient funds in handle_deposit.go is changed to se.ErrInsufficientFunds, which uses code 5. The original error was code 1, which was being redacted by cosmos. This should result in a more useful error message.

The test for this case in HandleDepositSuite was also updated to check for se.ErrInsufficientFunds specifically, versus using errors.Is which checks for the error anywhere nested within the top-level error.

Edited by fishtail

Merge request reports