From 78e6df2ed27ffcaba30838894dfb76301f696656 Mon Sep 17 00:00:00 2001 From: MalteHerrmann <42640438+MalteHerrmann@users.noreply.github.com> Date: Tue, 20 Dec 2022 22:58:30 +0100 Subject: [PATCH] make missing key error message during SendTransaction more verbose (#1563) Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com> --- rpc/backend/sign_tx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpc/backend/sign_tx.go b/rpc/backend/sign_tx.go index 0f8e9261..0c16da0c 100644 --- a/rpc/backend/sign_tx.go +++ b/rpc/backend/sign_tx.go @@ -39,7 +39,7 @@ func (b *Backend) SendTransaction(args evmtypes.TransactionArgs) (common.Hash, e _, err := b.clientCtx.Keyring.KeyByAddress(sdk.AccAddress(args.GetFrom().Bytes())) if err != nil { b.logger.Error("failed to find key in keyring", "address", args.GetFrom(), "error", err.Error()) - return common.Hash{}, fmt.Errorf("%s; %s", keystore.ErrNoMatch, err.Error()) + return common.Hash{}, fmt.Errorf("failed to find key in the node's keyring; %s; %s", keystore.ErrNoMatch, err.Error()) } if args.ChainID != nil && (b.chainID).Cmp((*big.Int)(args.ChainID)) != 0 {