diff --git a/client/tx/tx.go b/client/tx/tx.go index 4abf1032de..562983b0c5 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -326,7 +326,7 @@ func PrepareFactory(clientCtx client.Context, txf Factory) (Factory, error) { if initSeq == 0 && !clientCtx.Offline { seq, err := txf.accountRetriever.GetAccountSequence(clientCtx, from) if err != nil { - if sdkError, _ := err.(*sdkerrors.Error); sdkError != sdkerrors.ErrKeyNotFound { + if cliError, ok := err.(*client.Error); !ok || cliError.Code != sdkerrors.ErrKeyNotFound.ABCICode() { return txf, err } }