Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Changelog
## [4.1.1] - 2025-05-24
- Fixed bug of comparing chainId as string for skipping type2 to legacy txn

Comment on lines +2 to +4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Fix markdown formatting issues.

The changelog entry correctly documents the bugfix, but there are formatting issues that should be addressed:

Apply this diff to fix the markdown formatting:

+
 ## [4.1.1] - 2025-05-24
+
-- Fixed bug of comparing chainId as string for skipping type2 to legacy txn 
+- Fixed bug of comparing chainId as string for skipping type2 to legacy txn
+
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## [4.1.1] - 2025-05-24
- Fixed bug of comparing chainId as string for skipping type2 to legacy txn
## [4.1.1] - 2025-05-24
- Fixed bug of comparing chainId as string for skipping type2 to legacy txn
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Above

(MD022, blanks-around-headings)


2-2: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below

(MD022, blanks-around-headings)


3-3: Trailing spaces
Expected: 0 or 2; Actual: 1

(MD009, no-trailing-spaces)


3-3: Lists should be surrounded by blank lines
null

(MD032, blanks-around-lists)

🤖 Prompt for AI Agents
In backend/CHANGELOG.md around lines 2 to 4, the markdown formatting of the
changelog entry is incorrect. Fix the formatting by ensuring the version header
is properly formatted as a markdown heading (e.g., starting with ## and a
space), and the bullet point describing the fix is correctly indented and uses a
hyphen followed by a space. Remove any trailing spaces or formatting
inconsistencies to comply with standard markdown syntax.

## [4.1.0] - 2025-05-22
### Fixes
- If `isApplicableTOAllChains` is true then dont check `enabledChains` on policy
Expand Down
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
16 changes: 7 additions & 9 deletions backend/src/paymaster/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class Paymaster {
coingeckoPrice: Map<string, CoingeckoPriceCache> = new Map();
coingeckoService: CoingeckoService = new CoingeckoService();
sequelize: Sequelize;
skipType2Txns: number[];
skipType2Txns: string[];

constructor(params: ConstructorParams) {
this.feeMarkUp = ethers.utils.parseUnits(params.feeMarkUp, 'gwei');
Expand All @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down