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
28 changes: 28 additions & 0 deletions migration/1781700412000-UpdateAquaWalletWebsiteUrl.js
Original file line number Diff line number Diff line change
@@ -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/'`,
);
}
};
35 changes: 35 additions & 0 deletions migration/1781700855000-SetAquaWalletDeepLink.js
Original file line number Diff line number Diff line change
@@ -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:<inner-scheme>:<payload>" (e.g. "aqua:lightning:<lnurl>"). 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:" + <lnurl> string. The frontend builds Lightning links generically as
// "<deepLink>lightning:<lnurl>", so setting deepLink = 'aqua:' yields "aqua:lightning:<lnurl>",
// 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:'`);
}
};
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading