diff --git a/migration/1781700412000-UpdateAquaWalletWebsiteUrl.js b/migration/1781700412000-UpdateAquaWalletWebsiteUrl.js new file mode 100644 index 0000000000..0ac81967d9 --- /dev/null +++ b/migration/1781700412000-UpdateAquaWalletWebsiteUrl.js @@ -0,0 +1,28 @@ +// Fix the AQUA wallet website URL in the wallet_app table. +// +// Background: the AQUA wallet (JAN3, package io.aquawallet.android / AppStore id6468594241) moved +// its website from the now-defunct aquawallet.io domain to aqua.net. The wallet_app row still +// pointed at https://aquawallet.io/, which no longer resolves (connection refused), while the +// public ecosystem page already links to https://aqua.net. This aligns the API data with the +// live domain. + +/** + * @typedef {import('typeorm').MigrationInterface} MigrationInterface + * @typedef {import('typeorm').QueryRunner} QueryRunner + */ + +module.exports = class UpdateAquaWalletWebsiteUrl1781700412000 { + name = 'UpdateAquaWalletWebsiteUrl1781700412000'; + + async up(queryRunner) { + await queryRunner.query( + `UPDATE "wallet_app" SET "websiteUrl" = 'https://aqua.net/' WHERE "name" = 'AQUA' AND "websiteUrl" = 'https://aquawallet.io/'`, + ); + } + + async down(queryRunner) { + await queryRunner.query( + `UPDATE "wallet_app" SET "websiteUrl" = 'https://aquawallet.io/' WHERE "name" = 'AQUA' AND "websiteUrl" = 'https://aqua.net/'`, + ); + } +}; diff --git a/migration/1781700855000-SetAquaWalletDeepLink.js b/migration/1781700855000-SetAquaWalletDeepLink.js new file mode 100644 index 0000000000..cf5ff8c2f9 --- /dev/null +++ b/migration/1781700855000-SetAquaWalletDeepLink.js @@ -0,0 +1,35 @@ +// Set the AQUA wallet deep link prefix in the wallet_app table. +// +// Background: AQUA (JAN3) now registers the custom URI scheme "aqua:" (alongside bitcoin:, +// lightning:, liquidnetwork:). Its deep link handler treats "aqua:" as a wrapper scheme that +// strips the "aqua:" prefix and recursively re-parses the remainder, so it expects +// "aqua::" (e.g. "aqua:lightning:"). Verified against +// AquaWallet/aqua-wallet on 2026-06-17 (android/app/src/main/AndroidManifest.xml scheme +// registration + lib/data/provider/app_links/deep_link_provider.dart, containsChildScheme). +// +// The wallet_app row had deepLink = NULL, which broke the payment frontend +// (@dfx.swiss/services-react): for public payments wallets without a deepLink are filtered out +// (AQUA was hidden), and otherwise the Lightning link builder produced a broken +// "null" + "lightning:" + string. The frontend builds Lightning links generically as +// "lightning:", so setting deepLink = 'aqua:' yields "aqua:lightning:", +// exactly the format AQUA expects. No frontend change is required: the API serves +// hasActionDeepLink verbatim from this column, but the frontend derives the in-app-pay +// capability client-side from supportedMethods (Lightning), so AQUA's hasActionDeepLink stays +// NULL like all other wallets. + +/** + * @typedef {import('typeorm').MigrationInterface} MigrationInterface + * @typedef {import('typeorm').QueryRunner} QueryRunner + */ + +module.exports = class SetAquaWalletDeepLink1781700855000 { + name = 'SetAquaWalletDeepLink1781700855000'; + + async up(queryRunner) { + await queryRunner.query(`UPDATE "wallet_app" SET "deepLink" = 'aqua:' WHERE "name" = 'AQUA' AND "deepLink" IS NULL`); + } + + async down(queryRunner) { + await queryRunner.query(`UPDATE "wallet_app" SET "deepLink" = NULL WHERE "name" = 'AQUA' AND "deepLink" = 'aqua:'`); + } +}; diff --git a/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts b/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts index 6ea7ee5f78..cdb42b8e4b 100644 --- a/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts +++ b/src/subdomains/supporting/bank-tx/bank-tx/services/bank-tx.service.ts @@ -390,8 +390,8 @@ export class BankTxService implements OnModuleInit { .createQueryBuilder('bankTx') .select('bankTx', 'bankTx') .leftJoinAndSelect('bankTx.transaction', 'transaction') - .where(`REPLACE(bankTx.remittanceInfo, ' ', '') = :remittanceInfo`, { - remittanceInfo: remittanceInfo.replace(/ /g, ''), + .where(`REPLACE(bankTx.remittanceInfo, ' ', '') LIKE :remittanceInfo`, { + remittanceInfo: `%${remittanceInfo.replace(/ /g, '')}%`, }) .orderBy('bankTx.id', 'DESC') .getOne();