make missing key error message during SendTransaction more verbose (#1563)

Co-authored-by: 4rgon4ut <59182467+4rgon4ut@users.noreply.github.com>
This commit is contained in:
MalteHerrmann 2022-12-20 22:58:30 +01:00 committed by GitHub
parent 9663ec3258
commit 78e6df2ed2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {