diff --git a/backend/CHANGELOG.md b/backend/CHANGELOG.md index 873c8b5..c82e5e8 100644 --- a/backend/CHANGELOG.md +++ b/backend/CHANGELOG.md @@ -1,4 +1,7 @@ # Changelog +## [4.1.1] - 2025-05-24 +- Fixed bug of comparing chainId as string for skipping type2 to legacy txn + ## [4.1.0] - 2025-05-22 ### Fixes - If `isApplicableTOAllChains` is true then dont check `enabledChains` on policy diff --git a/backend/package.json b/backend/package.json index 7682899..68d3a4f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,6 +1,6 @@ { "name": "arka", - "version": "4.1.0", + "version": "4.1.1", "description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software", "type": "module", "directories": { diff --git a/backend/src/paymaster/index.ts b/backend/src/paymaster/index.ts index 7e6ce50..9d2b3b4 100644 --- a/backend/src/paymaster/index.ts +++ b/backend/src/paymaster/index.ts @@ -79,7 +79,7 @@ export class Paymaster { coingeckoPrice: Map = new Map(); coingeckoService: CoingeckoService = new CoingeckoService(); sequelize: Sequelize; - skipType2Txns: number[]; + skipType2Txns: string[]; constructor(params: ConstructorParams) { this.feeMarkUp = ethers.utils.parseUnits(params.feeMarkUp, 'gwei'); @@ -93,9 +93,7 @@ export class Paymaster { this.EP8_PVGL = BigNumber.from(params.ep8Pvgl); this.MTP_PVGL = params.mtpPvgl; this.MTP_PPGL = params.mtpPpgl; - this.skipType2Txns = params.skipType2Txns.map( - (value) => Number(value) - ).filter((value) => !isNaN(value)); + this.skipType2Txns = params.skipType2Txns; } packUint(high128: BigNumberish, low128: BigNumberish): string { @@ -1132,7 +1130,7 @@ export class Paymaster { } let tx: providers.TransactionResponse; - if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId)) { + if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId.toString())) { tx = await signer.sendTransaction({ to: paymasterAddress, data: encodedData, @@ -1185,7 +1183,7 @@ export class Paymaster { } let tx: providers.TransactionResponse; - if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId)) { + if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId.toString())) { tx = await signer.sendTransaction({ to: paymasterAddress, data: encodedData, @@ -1249,7 +1247,7 @@ export class Paymaster { } let tx: providers.TransactionResponse; - if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId)) { + if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId.toString())) { tx = await signer.sendTransaction({ to: paymasterAddress, data: encodedData, @@ -1312,7 +1310,7 @@ export class Paymaster { } let tx; - if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId)) { + if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId.toString())) { tx = await contract.deploy(epAddr, signer.address, { gasPrice: feeData.gasPrice }); } else { tx = await contract.deploy( @@ -1359,7 +1357,7 @@ export class Paymaster { } let tx; - if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId)) { + if (!feeData.maxFeePerGas || this.skipType2Txns.includes(chainId.toString())) { tx = await contract.addStake("10", { value: ethers.utils.parseEther(amount), gasPrice: feeData.gasPrice }); } else { tx = await contract.addStake(