Skip to content

Commit

Permalink
fix: remove hardcoded chain id
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilkumar1612 committed Dec 13, 2024
1 parent 776f77e commit 314f845
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions backend/src/paymaster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class Paymaster {
}

async getPaymasterAndDataForMultiTokenPaymaster(userOp: any, validUntil: string, validAfter: string, feeToken: string,
ethPrice: string, paymasterContract: Contract, signer: Wallet) {
ethPrice: string, paymasterContract: Contract, signer: Wallet, chainId: number) {
const priceMarkup = this.multiTokenMarkUp;

const hash = ethers.utils.keccak256(
Expand Down Expand Up @@ -237,7 +237,7 @@ export class Paymaster {
userOp.preVerificationGas,
userOp.maxFeePerGas,
userOp.maxPriorityFeePerGas,
80002,
chainId,
paymasterContract.address,
0,
validUntil,
Expand Down Expand Up @@ -626,7 +626,7 @@ export class Paymaster {
const ETHprice = await ecContract.cachedPrice();
ethPrice = ETHprice
}
const paymasterAndData = await this.getPaymasterAndDataForMultiTokenPaymaster(userOp, validUntil, validAfter, feeToken, ethPrice, paymasterContract, signer);
const paymasterAndData = await this.getPaymasterAndDataForMultiTokenPaymaster(userOp, validUntil, validAfter, feeToken, ethPrice, paymasterContract, signer, chainId);

if (!userOp.signature) userOp.signature = '0x';
const response = await provider.send('eth_estimateUserOperationGas', [userOp, entryPoint]);
Expand Down

0 comments on commit 314f845

Please sign in to comment.