Skip to content

Commit

Permalink
fix: should reset nonce condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dhvanipa committed May 24, 2024
1 parent cc8bbd1 commit 217c896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/common/src/createNonceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ export function createNonceManager({
debug("reset nonce to", nonceRef.current);
}

// eslint-disable-next-line @typescript-eslint/no-explicit-any
function shouldResetNonce(error: any): boolean {
return (
(error instanceof BaseError &&
error.walk((e) => e instanceof NonceTooLowError || e instanceof NonceTooHighError) != null) ||
error.name === "NonceTooLowError" ||
error.name === "NonceTooHighError" ||
(error.name === "TransactionExecutionError" && error.message && error.message.includes("nonce"))
error.name === "NonceTooHighError"
);
}

Expand Down

0 comments on commit 217c896

Please sign in to comment.