From 7ecb96e53095e7c48d2b0bf401730121fdb36165 Mon Sep 17 00:00:00 2001 From: Woosang Son Date: Thu, 15 Jul 2021 15:54:47 +0900 Subject: [PATCH] fix: send tx with unknown address with daemon command (#286) --- client/tx/tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 } }