From 14f9f4713283c4da6c8e0015ad81bcf6c29ac87a Mon Sep 17 00:00:00 2001 From: Eric <5089238+emizzle@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:08:53 +1100 Subject: [PATCH] fix an indentation mistake after last merge --- ethers/signer.nim | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ethers/signer.nim b/ethers/signer.nim index 86e9093..16e1180 100644 --- a/ethers/signer.nim +++ b/ethers/signer.nim @@ -119,18 +119,18 @@ method populateTransaction*( if transaction.gasPrice.isNone and (transaction.maxFee.isNone or transaction.maxPriorityFee.isNone): populated.gasPrice = some(await signer.getGasPrice()) - 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 decreased to prevent nonce gaps and - # stuck transactions - populated.nonce = some(await signer.getNonce()) - try: - populated.gasLimit = some(await signer.estimateGas(populated, BlockTag.pending)) - except EstimateGasError as e: - raise e - except ProviderError as e: - raiseSignerError(e.msg) + 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 decreased to prevent nonce gaps and + # stuck transactions + populated.nonce = some(await signer.getNonce()) + try: + populated.gasLimit = some(await signer.estimateGas(populated, BlockTag.pending)) + except EstimateGasError as e: + raise e + except ProviderError as e: + raiseSignerError(e.msg) else: if transaction.nonce.isNone: