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
4 changes: 4 additions & 0 deletions backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Changelog
## [3.1.7] - 2025-04-16
### New
- Added support for multiTokenPaymaster deployed for EntryPoint v07

## [3.1.6] - 2025-04-02
### Fixes
- Fixed bug in paymaster estimation for multiTokenPaymaster getERC20Quotes API
Expand Down
11 changes: 11 additions & 0 deletions backend/migrations/20250416000001-update-apiKey-table.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require('dotenv').config();

async function up({ context: queryInterface }) {
await queryInterface.sequelize.query(`ALTER TABLE IF EXISTS "${process.env.DATABASE_SCHEMA_NAME}".api_keys ADD COLUMN "MULTI_TOKEN_PAYMASTERS_V2" text default null`);
}

async function down({ context: queryInterface }) {
await queryInterface.sequelize.query(`ALTER TABLE IF EXISTS "${process.env.DATABASE_SCHEMA_NAME}".api_keys DROP COLUMN MULTI_TOKEN_PAYMASTERS_V2;`);
}

module.exports = { up, down }
11 changes: 11 additions & 0 deletions backend/migrations/20250416000002-update-MTP-table.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
require('dotenv').config();

async function up({ context: queryInterface }) {
await queryInterface.sequelize.query(`ALTER TABLE IF EXISTS "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster ADD COLUMN "EP_VERSION" text default 'EPV_06'`);
}

async function down({ context: queryInterface }) {
await queryInterface.sequelize.query(`ALTER TABLE "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster DROP COLUMN EP_VERSION;`);
}
Comment on lines +7 to +9
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Add IF EXISTS clause to the down migration.

The down migration should include an IF EXISTS clause to match the style in the up migration and prevent errors if the table doesn't exist.

- await queryInterface.sequelize.query(`ALTER TABLE "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster DROP COLUMN EP_VERSION;`);
+ await queryInterface.sequelize.query(`ALTER TABLE IF EXISTS "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster DROP COLUMN EP_VERSION;`);
📝 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
async function down({ context: queryInterface }) {
await queryInterface.sequelize.query(`ALTER TABLE "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster DROP COLUMN EP_VERSION;`);
}
async function down({ context: queryInterface }) {
await queryInterface.sequelize.query(`ALTER TABLE IF EXISTS "${process.env.DATABASE_SCHEMA_NAME}".multi_token_paymaster DROP COLUMN EP_VERSION;`);
}


module.exports = { up, 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": "3.1.6",
"version": "3.1.7",
"description": "ARKA - (Albanian for Cashier's case) is the first open source Paymaster as a service software",
"type": "module",
"directories": {
Expand Down
File renamed without changes.
Loading