Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fix-battries
Browse files Browse the repository at this point in the history
  • Loading branch information
pavanjoshi914 committed Aug 12, 2024
2 parents 09b328e + f1a7dd8 commit 3ec1c93
Show file tree
Hide file tree
Showing 13 changed files with 55 additions and 36 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
- [ ] [Lsat](https://lsat.tech/) support

### STATUS: 🚀

Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/TransactionsTable/TransactionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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" ? "-" : "+"}{" "}
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/TransactionsTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export default function TransactionsTable({
<Loading />
</div>
) : !transactions?.length ? (
<p className="text-gray-500 dark:text-neutral-400">
<p className="text-gray-500 dark:text-neutral-400 text-center">
{t("no_transactions")}
</p>
) : (
Expand Down Expand Up @@ -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" ? "-" : "+"}{" "}
Expand Down
3 changes: 2 additions & 1 deletion src/extension/background-script/connectors/lnd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
},
};
});
Expand Down
4 changes: 3 additions & 1 deletion src/extension/background-script/connectors/nwc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/extension/background-script/events/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/bg/translation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
4 changes: 3 additions & 1 deletion src/i18n/locales/id/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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...",
Expand Down
30 changes: 24 additions & 6 deletions src/i18n/locales/pt_BR/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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",
Expand All @@ -755,11 +765,19 @@
"choose_path": {
"alby": {
"title": "Conta Alby",
"point1": "Necessita de convite para criar conta"
"point1": "Nova carteira com autocustódia — <0>Alby Hub</0>",
"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"
},
Expand Down Expand Up @@ -1042,9 +1060,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": {
Expand Down
1 change: 1 addition & 0 deletions static/views/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<body
class="w-96 max-w-full overflow-x-hidden h-[600px] no-scrollbar min-h-screen bg-gray-50 dark:bg-surface-00dp slashed-zero"
style="scrollbar-width: auto"
>
<div id="popup-root" class="h-full"></div>
</body>
Expand Down
13 changes: 12 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -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),
Expand All @@ -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: {
Expand Down
19 changes: 2 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1324,13 +1324,6 @@
resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.1.tgz#e8d066c653883238c291d8fdd8b36ed932e87920"
integrity sha512-xVRaR4u9hcYjFvcSg71Lz5Bo4//CyjAAfMxa7UsaDSYxAshflUkVJWiyVWrfxC59z2kP1IzI4/1BEpnhI9o3Mw==

"@swc/[email protected]":
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"
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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==
Expand Down

0 comments on commit 3ec1c93

Please sign in to comment.