Skip to content

Commit

Permalink
Fix transaction type in prepareTxRequest (#66)
Browse files Browse the repository at this point in the history
* Fix transaction type in prepareTxRequest

Previously it would be set to ConfidentialRequest, even if Legacy was explicitly chosen.

* Add changeset
  • Loading branch information
michcio1234 authored Nov 14, 2024
1 parent 43e44c4 commit 6ef0747
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-socks-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@flashbots/suave-viem": patch
---

Fix sending Legacy transactions
5 changes: 3 additions & 2 deletions src/chains/suave/wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,10 @@ function newSuaveWallet<TTransport extends Transport>(params: {
txRequest.gasPrice ?? (await this.customProvider.getGasPrice()),
chainId: txRequest.chainId ?? client.chain.id,
type:
txRequest.type ?? txRequest.kettleAddress
txRequest.type ??
(txRequest.kettleAddress
? SuaveTxRequestTypes.ConfidentialRequest
: '0x0',
: '0x0'),
}
},

Expand Down

0 comments on commit 6ef0747

Please sign in to comment.