Skip to content

Commit

Permalink
fix(common): pass through rest of nonce manager opts (#2616)
Browse files Browse the repository at this point in the history
  • Loading branch information
holic authored Apr 5, 2024
1 parent b798ccb commit a9e8a40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-colts-refuse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@latticexyz/common": patch
---

Fixed `getNonceManager` to correctly pass all options to `createNonceManager`.
3 changes: 2 additions & 1 deletion packages/common/src/getNonceManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export async function getNonceManager({
client,
address, // TODO: rename to account?
blockTag = "pending",
...opts
}: CreateNonceManagerOptions): Promise<CreateNonceManagerResult> {
const id = await getNonceManagerId({ client, address, blockTag });

Expand All @@ -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;
}

0 comments on commit a9e8a40

Please sign in to comment.