diff --git a/src/server/blockchain/Web3Wallet.js b/src/server/blockchain/Web3Wallet.js index 6187637a..e39476b3 100644 --- a/src/server/blockchain/Web3Wallet.js +++ b/src/server/blockchain/Web3Wallet.js @@ -1200,6 +1200,28 @@ export class Web3Wallet { // increase nonce, since we assume therre's a tx pending with same nonce await this.txManager.unlock(currentAddress, currentNonce + 1) + return this.sendTransaction( + tx, + txCallbacks, + { gas, gasPrice, maxFeePerGas, maxPriorityFeePerGas }, + false, + logger + ) + } else if (retry && e.message.toLowerCase().includes('nonce')) { + logger.warn('sendTransaction retrying tx with too low nonce:', { + error: e.message, + currentAddress, + currentNonce, + netNonce, + txuuid, + txHash, + wallet: this.name, + network: this.networkId + }) + + // increase nonce, since we assume our local nonce is behind on the network. + await this.txManager.unlock(currentAddress, netNonce + 1) + return this.sendTransaction( tx, txCallbacks,