rpc: fix default nonce (#152)

fixes #151
This commit is contained in:
yihuang
2021-06-21 04:02:05 -04:00
committed by GitHub
parent eee53a9500
commit a3ee8a4622
+1 -1
View File
@@ -972,7 +972,7 @@ func (e *PublicEthAPI) setTxDefaults(args rpctypes.SendTxArgs) (rpctypes.SendTxA
args.GasPrice = (*hexutil.Big)(big.NewInt(ethermint.DefaultGasPrice))
}
if args.Nonce != nil {
if args.Nonce == nil {
// get the nonce from the account retriever
// ignore error in case tge account doesn't exist yet
_, nonce, _ := e.clientCtx.AccountRetriever.GetAccountNumberSequence(e.clientCtx, from)