From abe8585f538fdeb6de100e9bdb938cda29b5e486 Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 12 Dec 2023 09:04:22 +0100 Subject: [PATCH] Do not decrease nonce when it wasn't increased --- ethers/signer.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethers/signer.nim b/ethers/signer.nim index 63a1f70..eaca26c 100644 --- a/ethers/signer.nim +++ b/ethers/signer.nim @@ -114,10 +114,10 @@ method populateTransaction*(signer: Signer, if transaction.nonce.isNone and transaction.gasLimit.isNone: # when both nonce and gasLimit are not populated, we must ensure getNonce is # followed by an estimateGas so we can determine if there was an error. If - # there is an error, the nonce must be deprecated to prevent nonce gaps and + # there is an error, the nonce must be decreased to prevent nonce gaps and # stuck transactions + populated.nonce = some(await signer.getNonce()) try: - populated.nonce = some(await signer.getNonce()) populated.gasLimit = some(await signer.estimateGas(populated)) except ProviderError, EstimateGasError: let e = getCurrentException()