Skip to content

Commit 0a9c396

Browse files
committed
fix(mock-paymaster): handle string values in boosted userop detection
- Changed boosted detection to compare string "0x0" instead of bigint 0n - Updated epToPaymaster mapping to use Address type - Changed userOp type assertion for flexible type handling
1 parent 124d48e commit 0a9c396

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/mock-paymaster/relay.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const handleMethod = async ({
175175
getSingletonPaymaster08Address(paymasterSigner.account.address)
176176
]
177177

178-
const epToPaymaster: Record<`0x${string}`, `0x${string}`> = {
178+
const epToPaymaster: Record<Address, Address> = {
179179
[entryPoint06Address]: paymaster06,
180180
[entryPoint07Address]: paymaster07,
181181
[entryPoint08Address]: paymaster08
@@ -330,10 +330,11 @@ const handleMethod = async ({
330330

331331
// If boosted userOp, forward to bundler's boost_sendUserOperation method.
332332
if (parsedBody.method === "eth_sendUserOperation") {
333-
const userOp = parsedBody.params[0] as UserOperation
333+
const userOp = parsedBody.params[0] as any
334334

335335
const isBoosted =
336-
userOp.maxFeePerGas === 0n && userOp.maxPriorityFeePerGas === 0n
336+
userOp.maxFeePerGas === "0x0" &&
337+
userOp.maxPriorityFeePerGas === "0x0"
337338

338339
if (isBoosted) {
339340
return await bundlerClient.request({

0 commit comments

Comments
 (0)