From 011f8d790119f055b33c6f0219b2ee1672d0d7cd Mon Sep 17 00:00:00 2001 From: jxom Date: Mon, 22 Jul 2024 12:26:44 +1000 Subject: [PATCH] chore: fix --- .../actions/paymaster/getPaymasterData.test.ts | 13 +++++++------ .../actions/paymaster/getPaymasterStubData.test.ts | 11 ++++++----- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/account-abstraction/actions/paymaster/getPaymasterData.test.ts b/src/account-abstraction/actions/paymaster/getPaymasterData.test.ts index 9968acbdb8..ecd0902f13 100644 --- a/src/account-abstraction/actions/paymaster/getPaymasterData.test.ts +++ b/src/account-abstraction/actions/paymaster/getPaymasterData.test.ts @@ -62,16 +62,17 @@ describe('entryPointVersion: 0.7', async () => { } `) - const userOperation_gas = await estimateUserOperationGas(bundlerClient, { - ...userOperation, - ...userOperation_paymasterStub, - }) + const { preVerificationGas, ...userOperation_gas } = + await estimateUserOperationGas(bundlerClient, { + ...userOperation, + ...userOperation_paymasterStub, + }) + expect(preVerificationGas).toBeDefined() expect(userOperation_gas).toMatchInlineSnapshot(` { "callGasLimit": 80000n, "paymasterPostOpGasLimit": 0n, "paymasterVerificationGasLimit": 0n, - "preVerificationGas": 51722n, "verificationGasLimit": 259060n, } `) @@ -86,7 +87,7 @@ describe('entryPointVersion: 0.7', async () => { expect(userOperation_paymaster).toMatchInlineSnapshot(` { "paymaster": "0x798f111c92e38f102931f34d1e0ea7e671bdbe31", - "paymasterData": "0x00000000000000000000000000000000000000000000000000000000deadbeef0000000000000000000000000000000000000000000000000000000000001234fe191962d4eea1f3eb3219b5c5cb2a093192510fe5edccc02103efc8cd8d38b85d1e42441c847dffa4187df1217d128628cebeedc8125cad3337c510b63915761b", + "paymasterData": "0x00000000000000000000000000000000000000000000000000000000deadbeef0000000000000000000000000000000000000000000000000000000000001234a528235cb473a447101ea2dbf58dc7150de904bbdac2dce9a7e26cbed67f54a476b98eb24355f3c230e116422618ccfa283a84dec8fcd934cdd1b9dbd0ec00cd1b", "paymasterPostOpGasLimit": 1000000n, "paymasterVerificationGasLimit": 1000000n, } diff --git a/src/account-abstraction/actions/paymaster/getPaymasterStubData.test.ts b/src/account-abstraction/actions/paymaster/getPaymasterStubData.test.ts index ffe60be008..655d77a417 100644 --- a/src/account-abstraction/actions/paymaster/getPaymasterStubData.test.ts +++ b/src/account-abstraction/actions/paymaster/getPaymasterStubData.test.ts @@ -58,16 +58,17 @@ describe('entryPointVersion: 0.7', async () => { } `) - const userOperation_gas = await estimateUserOperationGas(bundlerClient, { - ...userOperation, - ...userOperation_paymaster, - }) + const { preVerificationGas, ...userOperation_gas } = + await estimateUserOperationGas(bundlerClient, { + ...userOperation, + ...userOperation_paymaster, + }) + expect(preVerificationGas).toBeDefined() expect(userOperation_gas).toMatchInlineSnapshot(` { "callGasLimit": 80000n, "paymasterPostOpGasLimit": 0n, "paymasterVerificationGasLimit": 0n, - "preVerificationGas": 51722n, "verificationGasLimit": 259060n, } `)