We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 062aba4 commit b1b244aCopy full SHA for b1b244a
packages/package-utils/ExtendedNonceManager.js
@@ -46,9 +46,14 @@ class ExtendedNonceManager extends NonceManager {
46
this.signedTransactions[tx.hash] = signedTransaction;
47
return response;
48
} catch (e) {
49
- const txCount = await this.signer.getTransactionCount("pending");
50
- this.setTransactionCount(txCount);
51
- return this.sendTransaction(transactionRequest);
+ if (e.code === "NONCE_EXPIRED") {
+ // The nonce has expired, so we need to update it.
+ const txCount = await this.signer.getTransactionCount("pending");
52
+ this.setTransactionCount(txCount);
53
+ return this.sendTransaction(transactionRequest);
54
+ }
55
+ console.log(e);
56
+ throw e;
57
}
58
59
0 commit comments