From 0e6255af90e3b177b93024c57ad9d390ddb9a310 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Tue, 16 Jul 2024 16:16:39 +0530 Subject: [PATCH 01/15] fix: scrollbar on extension popup --- static/views/popup.html | 1 + 1 file changed, 1 insertion(+) diff --git a/static/views/popup.html b/static/views/popup.html index 6a0602a2b4..ca1b482649 100644 --- a/static/views/popup.html +++ b/static/views/popup.html @@ -13,6 +13,7 @@ From 4f4f67d2cf94b25a6c6980def9f6c18775fc4abf Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 17 Jul 2024 07:09:15 +0200 Subject: [PATCH 02/15] Translated using Weblate (Indonesian) Currently translated at 46.4% (369 of 795 strings) Co-authored-by: Chandra Pratama Ramadhan Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/id/ Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension --- src/i18n/locales/id/translation.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/id/translation.json b/src/i18n/locales/id/translation.json index d114d8aa5d..18299cb1f3 100644 --- a/src/i18n/locales/id/translation.json +++ b/src/i18n/locales/id/translation.json @@ -12,7 +12,9 @@ "enter_password": "Mohon masukan kode sandi.", "confirm_password": "Mohon konfirmasi kode sandi Anda.", "mismatched_password": "Kode sandi tidak sama." - } + }, + "title": "Atur kode sandi ekstensi", + "description1": "Atur kode sandi untuk membuka ekstensi Alby pada peramban ini" }, "test_connection": { "initializing": "Menginisialisasi akun Anda. Mohon tunggu, ini mungkin akan memakan waktu beberapa menit...", From f91bf0ede3100047f6e808b5fd9fd4baff57b394 Mon Sep 17 00:00:00 2001 From: Pavan Joshi <55848322+pavanjoshi914@users.noreply.github.com> Date: Thu, 18 Jul 2024 13:43:54 +0530 Subject: [PATCH 03/15] fix: correct total amount in notifcations (#3194) * feat: show totalamount including fees in notifications * fix: return totalAmount as only amount send by the user for notification in lnd --- src/extension/background-script/connectors/lnd.ts | 3 ++- src/extension/background-script/events/notifications.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/extension/background-script/connectors/lnd.ts b/src/extension/background-script/connectors/lnd.ts index 75f376b3a8..f9fef3e3a3 100644 --- a/src/extension/background-script/connectors/lnd.ts +++ b/src/extension/background-script/connectors/lnd.ts @@ -277,11 +277,12 @@ class Lnd implements Connector { if (data.payment_error) { throw new Error(data.payment_error); } + const { total_amt, total_fees } = data.payment_route; return { data: { preimage: utils.base64ToHex(data.payment_preimage), paymentHash: utils.base64ToHex(data.payment_hash), - route: data.payment_route, + route: { total_amt: total_amt - total_fees, total_fees }, }, }; }); diff --git a/src/extension/background-script/events/notifications.ts b/src/extension/background-script/events/notifications.ts index e23f936c79..631124be9a 100644 --- a/src/extension/background-script/events/notifications.ts +++ b/src/extension/background-script/events/notifications.ts @@ -22,7 +22,7 @@ const paymentSuccessNotification = async ( const route = paymentResponseData?.data.route; const { total_amt, total_fees } = route; - const paymentAmount = total_amt - total_fees; + const paymentAmount = total_amt; const { settings } = state.getState(); const { showFiat, currency, locale } = settings; From efaf10baab5ad4ba24f0c8457d1d4b8769c19027 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Thu, 18 Jul 2024 21:15:06 +0530 Subject: [PATCH 04/15] fix: twitter battery --- src/extension/content-script/batteries/Twitter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/content-script/batteries/Twitter.ts b/src/extension/content-script/batteries/Twitter.ts index 745c5fb24f..777ca379ad 100644 --- a/src/extension/content-script/batteries/Twitter.ts +++ b/src/extension/content-script/batteries/Twitter.ts @@ -7,11 +7,11 @@ declare global { } } -const urlMatcher = /^https:\/\/(mobile.)?twitter\.com\/(\w+).*/; +const urlMatcher = /^https:\/\/(mobile.)?(twitter|x)\.com\/(\w+).*/; function getUsername() { const matchData = document.location.toString().match(urlMatcher); - if (matchData) return matchData[2]; + if (matchData) return matchData[3]; return ""; } From 21a4fae802680b1880e0471a119a4e7925ce3515 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Thu, 18 Jul 2024 21:27:34 +0530 Subject: [PATCH 05/15] feat: update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 09a440a258..edeb57fc02 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lightning-browser-extension", - "version": "3.8.1", + "version": "3.9.0", "description": "Lightning browser extension", "private": true, "repository": "https://github.com/bumi/lightning-browser-extension.git", From 764c8afad4565c39c8eb60317d3c46efac0a9779 Mon Sep 17 00:00:00 2001 From: im-adithya Date: Thu, 11 Jul 2024 15:27:01 +0530 Subject: [PATCH 06/15] chore: fix dark mode text color --- src/app/components/TransactionsTable/TransactionModal.tsx | 4 ++-- src/app/components/TransactionsTable/index.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/components/TransactionsTable/TransactionModal.tsx b/src/app/components/TransactionsTable/TransactionModal.tsx index 38b7621ca6..3b2d9589ea 100644 --- a/src/app/components/TransactionsTable/TransactionModal.tsx +++ b/src/app/components/TransactionsTable/TransactionModal.tsx @@ -75,8 +75,8 @@ export default function TransactionModal({ className={classNames( "text-3xl font-medium", transaction.type == "received" - ? "text-green-600 dark:color-green-400" - : "text-orange-600 dark:color-orange-400" + ? "text-green-600 dark:text-emerald-500" + : "text-orange-600 dark:text-amber-600" )} > {transaction.type == "sent" ? "-" : "+"}{" "} diff --git a/src/app/components/TransactionsTable/index.tsx b/src/app/components/TransactionsTable/index.tsx index 844d7cf207..e398dd1d93 100644 --- a/src/app/components/TransactionsTable/index.tsx +++ b/src/app/components/TransactionsTable/index.tsx @@ -87,8 +87,8 @@ export default function TransactionsTable({ className={classNames( "text-sm", type == "incoming" - ? "text-green-600 dark:color-green-400" - : "text-orange-600 dark:color-orange-400" + ? "text-green-600 dark:text-emerald-500" + : "text-orange-600 dark:text-amber-600" )} > {type == "outgoing" ? "-" : "+"}{" "} From 633505750e6fc53615888e0dd9afda904c510269 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 24 Jul 2024 11:24:44 +0200 Subject: [PATCH 07/15] Translated using Weblate (Portuguese (Brazil)) Currently translated at 74.7% (594 of 795 strings) Translated using Weblate (Portuguese (Brazil)) Currently translated at 74.7% (594 of 795 strings) Translated using Weblate (Portuguese (Brazil)) Currently translated at 74.7% (594 of 795 strings) Co-authored-by: Hosted Weblate Co-authored-by: Leonardo Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension --- src/i18n/locales/pt_BR/translation.json | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 57e0185af6..b4e50611b3 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -579,7 +579,7 @@ "subtitle": "Exibe no navegador notificações da Alby relacionadas a pagamentos e autenticação.", "title": "Notificações do navegador" }, - "title": "Configurações da extensão", + "title": "Configurações", "general": { "title": "Geral" }, @@ -755,11 +755,19 @@ "choose_path": { "alby": { "title": "Conta Alby", - "point1": "Necessita de convite para criar conta" + "point1": "Nova carteira com autocustódia — <0>Alby Hub", + "connect": "Conecte-se com a Alby", + "point3": "Necessita de convite para criar conta", + "point2": "Endereço relâmpago e nostr exclusivos", + "description": "Ideal para iniciantes que procuram uma ótima carteira para gastos do dia a dia." }, "other": { "title": "Outras carteiras", - "point1": "Acesso instantâneo, não precisa de convite" + "point1": "Opções de autocustódia e custódia delegada", + "connect": "Escolher carteira", + "point2": "Sem endereço relâmpago e nostr", + "description": "Ideal para quem já possui uma carteira e deseja conectá-la na extensão.", + "point3": "Pronta para o uso, não precisa de convite" }, "title": "Conecte carteiras na extensão Alby" }, @@ -1042,9 +1050,9 @@ "apps": "Apps", "full_screen": "Tela cheia", "hide_advanced": "Ocultar configurações avançadas", - "settings": "Configurações da extensão", + "settings": "Configurações", "details": "Detalhes", - "wallet_settings": "Configurações da carteira", + "wallet_settings": "Preferências da carteira", "general": "Geral" }, "components": { From 56effdc87963958f3a32a7ecb31cb769b60428c5 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 24 Jul 2024 11:24:44 +0200 Subject: [PATCH 08/15] Added translation using Weblate (Bulgarian) Co-authored-by: Hosted Weblate Co-authored-by: Valentin Genev --- src/i18n/locales/bg/translation.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/i18n/locales/bg/translation.json diff --git a/src/i18n/locales/bg/translation.json b/src/i18n/locales/bg/translation.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/src/i18n/locales/bg/translation.json @@ -0,0 +1 @@ +{} From efc52d597902f19b76e31ebbe625b77433a7389e Mon Sep 17 00:00:00 2001 From: Dylan Date: Thu, 25 Jul 2024 17:56:03 +0200 Subject: [PATCH 09/15] fix: tailwindcss-3d plugin breaks scale animations --- package.json | 1 - tailwind.config.js | 13 ++++++++++++- yarn.lock | 19 ++----------------- 3 files changed, 14 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index edeb57fc02..a921db4f67 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,6 @@ "puppeteer": "^21.4.1", "stream-browserify": "^3.0.0", "swc-loader": "^0.2.3", - "tailwindcss-3d": "^1.0.2", "terser-webpack-plugin": "^5.3.9", "tsconfig-paths-webpack-plugin": "^4.1.0", "typescript": "^5.2.2", diff --git a/tailwind.config.js b/tailwind.config.js index a648c2a6de..0e2b026c4e 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,5 +1,6 @@ const defaultTheme = require("tailwindcss/defaultTheme"); const colors = require("tailwindcss/colors"); +const plugin = require("tailwindcss/plugin"); function lighten(color, percent) { var num = parseInt(color.replace("#", ""), 16), @@ -25,7 +26,17 @@ const surfaceColor = "#121212"; module.exports = { darkMode: "class", content: ["./static/views/**/*.html", "./src/app/**/*.{js,ts,jsx,tsx}"], - plugins: [require("tailwindcss-3d"), require("@tailwindcss/forms")], + plugins: [ + plugin(function ({ addUtilities }) { + const newUtilities = { + ".translate-z-0": { + transform: "translateZ(0)", + }, + }; + addUtilities(newUtilities); + }), + require("@tailwindcss/forms"), + ], theme: { extend: { animation: { diff --git a/yarn.lock b/yarn.lock index 8d2bbdab32..3f8f24ae48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1324,13 +1324,6 @@ resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.1.tgz#e8d066c653883238c291d8fdd8b36ed932e87920" integrity sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw== -"@swc/helpers@0.5.3": - version "0.5.3" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.3.tgz#98c6da1e196f5f08f977658b80d6bd941b5f294f" - integrity sha512-FaruWX6KdudYloq1AHD/4nU+UsMTdNE8CKyrseXWEcgjDAbvkwJg2QGPAnfIJLIWsjZOSPLOAykK6fuYp4vp4A== - dependencies: - tslib "^2.4.0" - "@swc/jest@^0.2.29": version "0.2.29" resolved "https://registry.yarnpkg.com/@swc/jest/-/jest-0.2.29.tgz#b27d647ec430c909f9bb567d1df2a47eaa3841f4" @@ -6838,7 +6831,7 @@ lodash.upperfirst@^4.3.1: resolved "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz" integrity sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg== -lodash@4.17.21, lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: +lodash@^4.17.11, lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -9359,14 +9352,6 @@ symbol-tree@^3.2.4: resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== -tailwindcss-3d@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/tailwindcss-3d/-/tailwindcss-3d-1.0.2.tgz#2ae554d792e5f34a490e87451a9f945d15c1b160" - integrity sha512-e1BIJKzLOiZ2lEK9L3eO9Geb9/zJ+zkCqRiYuIu6/01wPNcy1XEMqCs/MNNPdcJELresvpbxEhCq6AsJXSWNBw== - dependencies: - "@swc/helpers" "0.5.3" - lodash "4.17.21" - tailwindcss@^3.4.3: version "3.4.3" resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.4.3.tgz#be48f5283df77dfced705451319a5dffb8621519" @@ -9629,7 +9614,7 @@ tsconfig-paths@^4.1.2: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0: +tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0: version "2.6.2" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== From 00bc2d0043885f7648f31adf0d864d45055f1dd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Mon, 29 Jul 2024 11:25:53 +0200 Subject: [PATCH 10/15] fix: l402 link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 34d9da7f0d..304bf6278e 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ The extension can connect to different node implementations and supports custodi - [x] WebLN signMessage, verifyMessage support - [x] WebLN dynamic makeInvoice support - [x] Keysend -- [ ] [Lsat](https://lsat.tech/) support +- [ ] [L402](https://l402.org/) support ### STATUS: 🚀 From 494d29242f0d6fba36b85b9692df54c066b15a9a Mon Sep 17 00:00:00 2001 From: Pavan Joshi <55848322+pavanjoshi914@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:57:13 +0530 Subject: [PATCH 11/15] fix: align no transactions copy to center (#3208) --- src/app/components/TransactionsTable/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/TransactionsTable/index.tsx b/src/app/components/TransactionsTable/index.tsx index e398dd1d93..75f2bec035 100644 --- a/src/app/components/TransactionsTable/index.tsx +++ b/src/app/components/TransactionsTable/index.tsx @@ -43,7 +43,7 @@ export default function TransactionsTable({ ) : !transactions?.length ? ( -

+

{t("no_transactions")}

) : ( From f39ba501d5bed191d005cdfc7c852fff23def6b7 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Tue, 30 Jul 2024 14:22:58 +0530 Subject: [PATCH 12/15] feat: remove l402 from the list in readme --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 304bf6278e..52c6bfe432 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ The extension can connect to different node implementations and supports custodi - [x] WebLN signMessage, verifyMessage support - [x] WebLN dynamic makeInvoice support - [x] Keysend -- [ ] [L402](https://l402.org/) support ### STATUS: 🚀 From e0b978a4b4efaf1aeaa4988956628b62a9df5275 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Sun, 28 Jul 2024 00:09:17 +0200 Subject: [PATCH 13/15] Translated using Weblate (Portuguese (Brazil)) Currently translated at 75.2% (598 of 795 strings) Co-authored-by: Leonardo Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension --- src/i18n/locales/pt_BR/translation.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index b4e50611b3..df355aede3 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -744,8 +744,18 @@ }, "30023": { "title": "nota longa" + }, + "7": { + "title": "reagir" + }, + "22242": { + "title": "autenticar" + }, + "10002": { + "title": "atualizar relays" } - } + }, + "allow": "Permitir {{publisher}} {{action}}" }, "confirm_request_permission": { "title": "Aprovar solicitação", From d6261a8d64236b3e5048707cf92b0e7eb195327f Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Thu, 1 Aug 2024 16:26:55 +0530 Subject: [PATCH 14/15] fix: keysend method and custom record conversion when custom records are not passed --- src/extension/background-script/connectors/nwc.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/extension/background-script/connectors/nwc.ts b/src/extension/background-script/connectors/nwc.ts index edc5a592a6..a0bff40830 100644 --- a/src/extension/background-script/connectors/nwc.ts +++ b/src/extension/background-script/connectors/nwc.ts @@ -220,8 +220,12 @@ class NWCConnector implements Connector { } private customRecordsToTlv( - customRecords: Record - ): TlvRecord[] { + customRecords: Record | undefined + ): TlvRecord[] | undefined { + if (!customRecords) { + return undefined; + } + return Object.entries(customRecords).map(([key, value]) => ({ type: parseInt(key), value: UTF8.parse(value).toString(Hex), From 651aa653244820c28323119b58a3ff2192c21e42 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Fri, 2 Aug 2024 11:13:04 +0530 Subject: [PATCH 15/15] feat: add checks where function is called --- src/extension/background-script/connectors/nwc.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/extension/background-script/connectors/nwc.ts b/src/extension/background-script/connectors/nwc.ts index a0bff40830..e70aaaaabe 100644 --- a/src/extension/background-script/connectors/nwc.ts +++ b/src/extension/background-script/connectors/nwc.ts @@ -163,7 +163,9 @@ class NWCConnector implements Connector { const data = await this.nwc.payKeysend({ pubkey: args.pubkey, amount: args.amount * 1000, - tlv_records: this.customRecordsToTlv(args.customRecords), + ...(args.customRecords && { + tlv_records: this.customRecordsToTlv(args.customRecords), + }), }); const paymentHash = SHA256(data.preimage).toString(Hex); @@ -220,12 +222,8 @@ class NWCConnector implements Connector { } private customRecordsToTlv( - customRecords: Record | undefined - ): TlvRecord[] | undefined { - if (!customRecords) { - return undefined; - } - + customRecords: Record + ): TlvRecord[] { return Object.entries(customRecords).map(([key, value]) => ({ type: parseInt(key), value: UTF8.parse(value).toString(Hex),