From a9e8a407b5d6f356d7d0a1c1f093de926ffb072f Mon Sep 17 00:00:00 2001 From: Kevin Ingersoll Date: Fri, 5 Apr 2024 04:33:03 +0100 Subject: [PATCH] fix(common): pass through rest of nonce manager opts (#2616) --- .changeset/five-colts-refuse.md | 5 +++++ packages/common/src/getNonceManager.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/five-colts-refuse.md diff --git a/.changeset/five-colts-refuse.md b/.changeset/five-colts-refuse.md new file mode 100644 index 0000000000..22b5ecbd8f --- /dev/null +++ b/.changeset/five-colts-refuse.md @@ -0,0 +1,5 @@ +--- +"@latticexyz/common": patch +--- + +Fixed `getNonceManager` to correctly pass all options to `createNonceManager`. diff --git a/packages/common/src/getNonceManager.ts b/packages/common/src/getNonceManager.ts index 8fe22ed95c..1209894863 100644 --- a/packages/common/src/getNonceManager.ts +++ b/packages/common/src/getNonceManager.ts @@ -7,6 +7,7 @@ export async function getNonceManager({ client, address, // TODO: rename to account? blockTag = "pending", + ...opts }: CreateNonceManagerOptions): Promise { const id = await getNonceManagerId({ client, address, blockTag }); @@ -15,7 +16,7 @@ export async function getNonceManager({ return existingNonceManager; } - const nonceManager = createNonceManager({ client, address, blockTag }); + const nonceManager = createNonceManager({ client, address, blockTag, ...opts }); nonceManagers.set(id, nonceManager); return nonceManager; }