diff --git a/prisma/migrations/20251031121927_migrate_lifpay_to_lnaddr/migration.sql b/prisma/migrations/20251031121927_migrate_lifpay_to_lnaddr/migration.sql new file mode 100644 index 0000000000..dd480f3c9b --- /dev/null +++ b/prisma/migrations/20251031121927_migrate_lifpay_to_lnaddr/migration.sql @@ -0,0 +1,21 @@ +-- Migrate LIFPAY users with lightning address to Custom Lightning Address (LN_ADDR) +WITH lifpay_with_addr AS ( + SELECT DISTINCT w.id + FROM "Wallet" w + JOIN "WalletProtocol" p + ON p."walletId" = w.id + AND p."send" = false + AND p."name" = 'LN_ADDR' + JOIN "WalletRecvLightningAddress" la + ON la."protocolId" = p.id + WHERE w."templateName" = 'LIFPAY' + AND la."address" IS NOT NULL + AND btrim(la."address") <> '' +) +UPDATE "Wallet" w + SET "templateName" = 'LN_ADDR' + FROM lifpay_with_addr l + WHERE w.id = l.id; +DELETE FROM "Wallet" w + WHERE w."templateName" = 'LIFPAY'; +DELETE FROM "WalletTemplate" WHERE "name" = 'LIFPAY'; \ No newline at end of file diff --git a/wallets/lib/wallets.json b/wallets/lib/wallets.json index 1975a9d26b..8b14c72dc1 100644 --- a/wallets/lib/wallets.json +++ b/wallets/lib/wallets.json @@ -105,12 +105,6 @@ "image": "/wallets/fountain.png", "url": "https://fountain.fm/" }, - { - "name": "LIFPAY", - "displayName": "Lifpay", - "image": "/wallets/lifpay.png", - "url": "https://lifpay.me/" - }, { "name": "SHOCKWALLET", "displayName": "Shockwallet",