Skip to content

Commit 0e387a4

Browse files
committed
Separate ALBY into ALBY_HUB and ALBY_BROWSER_EXTENSION
1 parent 9b25ff2 commit 0e387a4

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

prisma/migrations/20250516042253_wallet_v2/migration.sql

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ CREATE TABLE "WalletTemplate" (
2222
);
2323

2424
INSERT INTO "WalletTemplate" (name, "sendProtocols", "recvProtocols") VALUES
25-
('ALBY',
26-
ARRAY['NWC', 'WEBLN']::"WalletSendProtocol"[],
25+
('ALBY_BROWSER_EXTENSION',
26+
ARRAY['WEBLN']::"WalletSendProtocol"[],
27+
ARRAY[]::"WalletRecvProtocol"[]),
28+
('ALBY_HUB',
29+
ARRAY['NWC']::"WalletSendProtocol"[],
2730
ARRAY['NWC', 'LN_ADDR']::"WalletRecvProtocol"[]),
2831
('BLINK',
2932
ARRAY['BLINK']::"WalletSendProtocol"[],
@@ -859,7 +862,7 @@ BEGIN
859862
relay := substring(row."nwcUrlRecv" from 'relay=([^&]+)');
860863

861864
IF relay LIKE '%getalby.com%' THEN
862-
walletName := 'ALBY';
865+
walletName := 'ALBY_HUB';
863866
ELSIF relay LIKE '%rizful.com%' THEN
864867
walletName := 'RIZFUL';
865868
ELSIF relay LIKE '%primal.net%' THEN
@@ -903,7 +906,7 @@ BEGIN
903906
IF domain LIKE '%walletofsatoshi.com' THEN
904907
walletName := 'WALLET_OF_SATOSHI';
905908
ELSIF domain LIKE '%getalby.com' THEN
906-
walletName := 'ALBY';
909+
walletName := 'ALBY_HUB';
907910
ELSIF domain LIKE '%coinos.io' THEN
908911
walletName := 'COINOS';
909912
ELSIF domain LIKE '%speed.app' OR domain LIKE '%tryspeed.com' THEN
@@ -957,9 +960,9 @@ BEGIN
957960
userWalletId INT;
958961
protocolWalletId INT;
959962
BEGIN
960-
userWalletId := get_or_create_user_wallet(row."userId", 'ALBY', row."priority", row."enabled");
963+
userWalletId := get_or_create_user_wallet(row."userId", 'ALBY_BROWSER_EXTENSION', row."priority", row."enabled");
961964

962-
protocolWalletId := create_protocol_wallet(row."walletId", userWalletId, true, 'WEBLN', row."userId", 'ALBY', row."priority", row."enabled");
965+
protocolWalletId := create_protocol_wallet(row."walletId", userWalletId, true, 'WEBLN', row."userId", 'ALBY_BROWSER_EXTENSION', row."priority", row."enabled");
963966
INSERT INTO "WalletSendWebLN" ("walletId")
964967
VALUES (protocolWalletId);
965968
END;

0 commit comments

Comments
 (0)