From 5a3c10a29c047609a50828adb620d88aa8cf0014 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Wed, 22 Feb 2023 21:09:54 -0500 Subject: [PATCH] Fix NoneManager race condition (#3812, #3813). --- src.ts/providers/signer-noncemanager.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src.ts/providers/signer-noncemanager.ts b/src.ts/providers/signer-noncemanager.ts index 473d299a7..f6d6ae051 100644 --- a/src.ts/providers/signer-noncemanager.ts +++ b/src.ts/providers/signer-noncemanager.ts @@ -36,7 +36,9 @@ export class NonceManager extends AbstractSigner { if (this.#noncePromise == null) { this.#noncePromise = super.getNonce("pending"); } - return (await this.#noncePromise) + this.#delta; + + const delta = this.#delta; + return (await this.#noncePromise) + delta; } return super.getNonce(blockTag);