Skip to content

Commit

Permalink
fix: fixed maxFeePerGas and maxPriorityFeePerGas (#30)
Browse files Browse the repository at this point in the history
Co-authored-by: GabiDev <[email protected]>
  • Loading branch information
VGabriel45 and GabiDev45 authored Mar 21, 2024
1 parent e6a155b commit 4e1a2a1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 20 deletions.
17 changes: 8 additions & 9 deletions src/accounts/actions/sendTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import {
type Chain,
type Client,
type Hash,
type SendTransactionParameters,
type Transport,
toHex
import type {
Chain,
Client,
Hash,
SendTransactionParameters,
Transport
} from "viem"
import type { Prettify } from "viem/chains"
import { waitForUserOperationReceipt } from "../../bundler/actions/waitForUserOperationReceipt"
Expand Down Expand Up @@ -110,8 +109,8 @@ export async function sendTransaction<
)({
userOperation: {
sender: account.address,
maxFeePerGas: toHex(maxFeePerGas || 0n),
maxPriorityFeePerGas: toHex(maxPriorityFeePerGas || 0n),
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: maxPriorityFeePerGas,
callData: callData,
nonce: nonce ? BigInt(nonce) : undefined
},
Expand Down
21 changes: 10 additions & 11 deletions src/accounts/actions/sendTransactions.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import {
type Address,
type Chain,
type Client,
type Hash,
type Hex,
type SendTransactionParameters,
type Transport,
toHex
import type {
Address,
Chain,
Client,
Hash,
Hex,
SendTransactionParameters,
Transport
} from "viem"
import type { Prettify } from "viem/chains"
import { waitForUserOperationReceipt } from "../../bundler/actions/waitForUserOperationReceipt"
Expand Down Expand Up @@ -118,8 +117,8 @@ export async function sendTransactions<
)({
userOperation: {
sender: account.address,
maxFeePerGas: toHex(maxFeePerGas || 0n),
maxPriorityFeePerGas: toHex(maxPriorityFeePerGas || 0n),
maxFeePerGas: maxFeePerGas,
maxPriorityFeePerGas: maxPriorityFeePerGas,
callData: callData,
nonce: nonce ? BigInt(nonce) : undefined
},
Expand Down

0 comments on commit 4e1a2a1

Please sign in to comment.