Skip to content

Commit

Permalink
fix tx broadcast error message
Browse files Browse the repository at this point in the history
  • Loading branch information
tbruyelle committed Jul 29, 2022
1 parent 9c7e47c commit 0ab22ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ignite/pkg/cosmosclient/cosmosclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,14 +432,14 @@ func (c *Client) checkAccountBalance(ctx context.Context, address string) error
func handleBroadcastResult(resp *sdktypes.TxResponse, err error) error {
if err != nil {
if strings.Contains(err.Error(), "not found") {
return errors.New("make sure that your SPN account has enough balance")
return errors.New("make sure that your account has enough balance")
}

return err
}

if resp.Code > 0 {
return fmt.Errorf("SPN error with '%d' code: %s", resp.Code, resp.RawLog)
return fmt.Errorf("error code: '%d' msg: '%s'", resp.Code, resp.RawLog)
}
return nil
}
Expand Down

0 comments on commit 0ab22ac

Please sign in to comment.