Skip to content

Commit

Permalink
rpc: fix default nonce (evmos#152)
Browse files Browse the repository at this point in the history
fixes evmos#151
  • Loading branch information
yihuang authored Jun 21, 2021
1 parent eee53a9 commit a3ee8a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ethereum/rpc/eth_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a3ee8a4

Please sign in to comment.