mirror of
https://github.com/logos-storage/nim-ethers.git
synced 2026-01-13 19:13:08 +00:00
ensure nonce increment is done last
This commit is contained in:
parent
f7984ef384
commit
c22b7d479f
@ -111,12 +111,12 @@ method populateTransaction*(signer: Signer,
|
||||
|
||||
if transaction.sender.isNone:
|
||||
populated.sender = some(await signer.getAddress())
|
||||
if transaction.nonce.isNone:
|
||||
populated.nonce = some(await signer.getNonce())
|
||||
if transaction.chainId.isNone:
|
||||
populated.chainId = some(await signer.getChainId())
|
||||
if transaction.gasPrice.isNone and (transaction.maxFee.isNone or transaction.maxPriorityFee.isNone):
|
||||
populated.gasPrice = some(await signer.getGasPrice())
|
||||
if transaction.nonce.isNone:
|
||||
populated.nonce = some(await signer.getNonce())
|
||||
if transaction.gasLimit.isNone:
|
||||
try:
|
||||
populated.gasLimit = some(await signer.estimateGas(populated))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user