rpc: fix msg from address (#54)

This commit is contained in:
Federico Kunze 2021-06-02 04:10:37 -04:00 committed by GitHub
parent c08dcfad0c
commit 3cf3854529
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -542,6 +542,7 @@ func (e *PublicEthAPI) doCall(
fromAddr = sdk.AccAddress(args.From.Bytes())
} else {
fromAddr = sdk.AccAddress(common.Address{}.Bytes())
args.From = &common.Address{}
}
_, seq, err := e.clientCtx.AccountRetriever.GetAccountNumberSequence(e.clientCtx, fromAddr)
@ -551,7 +552,7 @@ func (e *PublicEthAPI) doCall(
// Create new call message
msg := evmtypes.NewMsgEthereumTx(e.chainIDEpoch, seq, args.To, value, gas, gasPrice, data, accessList)
msg.From = fromAddr.String()
msg.From = args.From.String()
if err := msg.ValidateBasic(); err != nil {
return nil, err