Skip to content

Commit

Permalink
Fix estimation (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
yagopv committed May 11, 2024
1 parent 8cf4bf8 commit 71aaabf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/relay-kit/src/packs/safe-4337/Safe4337Pack.ts
Expand Up @@ -274,8 +274,6 @@ export class Safe4337Pack extends RelayKitBasePack<{
safeOperation,
feeEstimator = new PimlicoFeeEstimator()
}: EstimateFeeProps): Promise<SafeOperation> {
const userOperation = safeOperation.toUserOperation()

const setupEstimationData = await feeEstimator?.setupEstimation?.({
bundlerUrl: this.#BUNDLER_URL,
entryPoint: this.#ENTRYPOINT_ADDRESS,
Expand All @@ -288,7 +286,7 @@ export class Safe4337Pack extends RelayKitBasePack<{

const estimateUserOperationGas = await this.#bundlerClient.send(
RPC_4337_CALLS.ESTIMATE_USER_OPERATION_GAS,
[userOperationToHexValues(userOperation), this.#ENTRYPOINT_ADDRESS]
[userOperationToHexValues(safeOperation.toUserOperation()), this.#ENTRYPOINT_ADDRESS]
)

if (estimateUserOperationGas) {
Expand Down

0 comments on commit 71aaabf

Please sign in to comment.