Skip to content

Commit 9b89137

Browse files
authored
fix: hoist nonce manager before fillTransaction (#4119)
* fix: hoist nonce manager before fillTx * u * u * u
1 parent 85ded81 commit 9b89137

File tree

4 files changed

+184
-267
lines changed

4 files changed

+184
-267
lines changed

.changeset/sweet-papers-dig.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"viem": patch
3+
---
4+
5+
Fixed an issue where a `nonceManager` would unexpectedly consume a nonce if `eth_fillTransaction` is not supported.

src/actions/public/fillTransaction.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ export async function fillTransaction<
129129
const nonce = await (async () => {
130130
if (!account) return nonce_
131131
if (!nonceManager) return nonce_
132+
if (typeof nonce_ !== 'undefined') return nonce_
132133
const account_ = parseAccount(account)
133134
const chainId = chain
134135
? chain.id

0 commit comments

Comments
 (0)