Skip to content

Commit eb655cc

Browse files
RekCuy63jxom
andauthored
fix: preserve explicit nonce in fillTransaction (#4518)
* fix: preserve explicit nonce in fillTransaction * Delete src/actions/public/fillTransaction.regression.test.ts * Preserve explicit nonce in fillTransaction --------- Co-authored-by: jxom <7336481+jxom@users.noreply.github.com>
1 parent 25cc59c commit eb655cc

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

.changeset/thin-books-swim.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+
Preserved explicit `nonce` in `fillTransaction`.

src/actions/public/fillTransaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export async function fillTransaction<
207207
if (transaction.maxPriorityFeePerGas)
208208
transaction.maxPriorityFeePerGas =
209209
parameters.maxPriorityFeePerGas ?? transaction.maxPriorityFeePerGas
210-
if (transaction.nonce)
210+
if (typeof transaction.nonce !== 'undefined')
211211
transaction.nonce = parameters.nonce ?? transaction.nonce
212212

213213
// Build fee multiplier function.

0 commit comments

Comments
 (0)