From d9acac119a5c0d6ee37180fe05f697d12395fd5d Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 17 Oct 2022 01:18:17 +0200 Subject: [PATCH 001/123] Add Lightning Node Connect --- package.json | 1 + src/app/router/connectorRoutes.tsx | 8 + .../screens/connectors/ConnectLnc/index.tsx | 86 +++++++ .../background-script/actions/ln/index.ts | 2 + .../background-script/actions/ln/lnc.ts | 22 ++ .../connectors/connector.interface.ts | 1 + .../background-script/connectors/index.ts | 2 + .../background-script/connectors/lnc.ts | 230 ++++++++++++++++++ src/extension/background-script/router.ts | 1 + src/extension/content-script/onend.js | 1 + src/extension/ln/webln/index.ts | 12 + src/manifest.json | 2 +- yarn.lock | 9 +- 13 files changed, 375 insertions(+), 2 deletions(-) create mode 100644 src/app/screens/connectors/ConnectLnc/index.tsx create mode 100644 src/extension/background-script/actions/ln/lnc.ts create mode 100644 src/extension/background-script/connectors/lnc.ts diff --git a/package.json b/package.json index 9da2ce2e51..2f9ce3cf93 100644 --- a/package.json +++ b/package.json @@ -39,6 +39,7 @@ "dependencies": { "@bitcoin-design/bitcoin-icons-react": "^0.1.9", "@headlessui/react": "^1.7.3", + "@lightninglabs/lnc-web": "^0.1.12-alpha", "@runcitadel/sdk": "^0.3.8", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/line-clamp": "^0.4.2", diff --git a/src/app/router/connectorRoutes.tsx b/src/app/router/connectorRoutes.tsx index 79612cd280..e07f2bc257 100644 --- a/src/app/router/connectorRoutes.tsx +++ b/src/app/router/connectorRoutes.tsx @@ -3,6 +3,7 @@ import ConnectCitadel from "@screens/connectors/ConnectCitadel"; import ConnectEclair from "@screens/connectors/ConnectEclair"; import ConnectGaloy, { galoyUrls } from "@screens/connectors/ConnectGaloy"; import ConnectLnbits from "@screens/connectors/ConnectLnbits"; +import ConnectLnc from "@screens/connectors/ConnectLnc"; import ConnectLnd from "@screens/connectors/ConnectLnd"; import ConnectLndHub from "@screens/connectors/ConnectLndHub"; import ConnectMyNode from "@screens/connectors/ConnectMyNode"; @@ -55,6 +56,13 @@ function getConnectorRoutes() { ), logo: lnd, }, + { + path: "lnc", + element: , + title: "Connect with LNC", + description: "Use LNC to connect to your LND", + logo: lnd, + }, { path: "lnbits", element: , diff --git a/src/app/screens/connectors/ConnectLnc/index.tsx b/src/app/screens/connectors/ConnectLnc/index.tsx new file mode 100644 index 0000000000..cf3b0afbb3 --- /dev/null +++ b/src/app/screens/connectors/ConnectLnc/index.tsx @@ -0,0 +1,86 @@ +import ConnectorForm from "@components/ConnectorForm"; +import TextField from "@components/form/TextField"; +import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; +import { useState } from "react"; +import { useNavigate } from "react-router-dom"; +import { toast } from "react-toastify"; +import utils from "~/common/lib/utils"; + +const initialFormData = Object.freeze({ + pairingPhrase: "", +}); + +export default function ConnectLnd() { + const navigate = useNavigate(); + const [formData, setFormData] = useState(initialFormData); + const [loading, setLoading] = useState(false); + + function handleChange(event: React.ChangeEvent) { + setFormData({ + ...formData, + [event.target.name]: event.target.value.trim(), + }); + } + + async function handleSubmit(event: React.FormEvent) { + event.preventDefault(); + setLoading(true); + const { pairingPhrase } = formData; + const account = { + name: "LND", + config: { + pairingPhrase, + }, + connector: "lnc", + }; + + try { + const validation = { valid: true, error: "" }; // opening and closing a connection to fast causes some problems. I've seen "channel occupied errors" await utils.call("validateAccount", account); + + if (validation.valid) { + const addResult = await utils.call("addAccount", account); + if (addResult.accountId) { + await utils.call("selectAccount", { + id: addResult.accountId, + }); + navigate("/test-connection"); + } + } else { + console.error(validation); + toast.error( + + ); + } + } catch (e) { + console.error(e); + let message = "LNC connection failed"; + if (e instanceof Error) { + message += `\n\n${e.message}`; + } + toast.error(message); + } + setLoading(false); + } + + return ( + +
+ +
+
+ ); +} diff --git a/src/extension/background-script/actions/ln/index.ts b/src/extension/background-script/actions/ln/index.ts index e39bdcbb5f..572d37c3a0 100644 --- a/src/extension/background-script/actions/ln/index.ts +++ b/src/extension/background-script/actions/ln/index.ts @@ -3,6 +3,7 @@ import connectPeer from "./connectPeer"; import getInfo from "./getInfo"; import invoices from "./invoices"; import keysend from "./keysend"; +import lnc from "./lnc"; import makeInvoice from "./makeInvoice"; import sendPayment from "./sendPayment"; import signMessage from "./signMessage"; @@ -16,4 +17,5 @@ export { makeInvoice, sendPayment, signMessage, + lnc, }; diff --git a/src/extension/background-script/actions/ln/lnc.ts b/src/extension/background-script/actions/ln/lnc.ts new file mode 100644 index 0000000000..ee4070c2d2 --- /dev/null +++ b/src/extension/background-script/actions/ln/lnc.ts @@ -0,0 +1,22 @@ +import { Message } from "~/types"; + +import state from "../../state"; + +export default async function (message: Message) { + console.info(`LNC call: ${message.args.method}`); + const connector = await state.getState().getConnector(); + + if (!connector) { + // TODO: add unlock prompt + return Promise.resolve({ + error: "Connector not available. Is the account unlocked?", + }); + } + + const response = await connector.request( + message.args.method, + message.args.params + ); + + return response; +} diff --git a/src/extension/background-script/connectors/connector.interface.ts b/src/extension/background-script/connectors/connector.interface.ts index 56d727f65d..3e8d13de24 100644 --- a/src/extension/background-script/connectors/connector.interface.ts +++ b/src/extension/background-script/connectors/connector.interface.ts @@ -117,6 +117,7 @@ export default interface Connector { keysend(args: KeysendArgs): Promise; checkPayment(args: CheckPaymentArgs): Promise; signMessage(args: SignMessageArgs): Promise; + request?(method: string, args: FixMe): Promise; connectPeer( args: ConnectPeerArgs ): Promise | Error; diff --git a/src/extension/background-script/connectors/index.ts b/src/extension/background-script/connectors/index.ts index 5051195917..0a880267a7 100644 --- a/src/extension/background-script/connectors/index.ts +++ b/src/extension/background-script/connectors/index.ts @@ -2,6 +2,7 @@ import Citadel from "./citadel"; import Eclair from "./eclair"; import Galoy from "./galoy"; import LnBits from "./lnbits"; +import Lnc from "./lnc"; import Lnd from "./lnd"; import LndHub from "./lndhub"; import NativeCitadel from "./nativecitadel"; @@ -23,6 +24,7 @@ const connectors = { lndhub: LndHub, nativelndhub: NativeLndHub, lnbits: LnBits, + lnc: Lnc, nativelnbits: NativeLnBits, galoy: Galoy, eclair: Eclair, diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts new file mode 100644 index 0000000000..d021b1790d --- /dev/null +++ b/src/extension/background-script/connectors/lnc.ts @@ -0,0 +1,230 @@ +import LNC from "@lightninglabs/lnc-web"; +import Base64 from "crypto-js/enc-base64"; +import Hex from "crypto-js/enc-hex"; +import UTF8 from "crypto-js/enc-utf8"; +import WordArray from "crypto-js/lib-typedarrays"; +import SHA256 from "crypto-js/sha256"; +import utils from "~/common/lib/utils"; + +import Connector, { + CheckPaymentArgs, + CheckPaymentResponse, + SendPaymentArgs, + SendPaymentResponse, + GetInfoResponse, + GetBalanceResponse, + GetInvoicesResponse, + ConnectPeerArgs, + ConnectPeerResponse, + ConnectorInvoice, + MakeInvoiceArgs, + MakeInvoiceResponse, + SignMessageArgs, + SignMessageResponse, + KeysendArgs, +} from "./connector.interface"; + +interface Config { + pairingPhrase: string; +} + +class Lnc implements Connector { + config: Config; + lnc: FixMe; + + constructor(config: Config) { + this.config = config; + this.lnc = new LNC({ + pairingPhrase: this.config.pairingPhrase, + }); + } + + async init(): Promise { + console.info("init LNC"); + await this.lnc.connect(); + } + + async unload() { + console.info("LNC disconnect"); + await this.lnc.disconnect(); + return new Promise((resolve) => { + // give lnc a bit time to disconnect. + // not sure what there happens, best would be to have disconnect() return a promise + setTimeout(() => { + // TODO: investigate garbage collection + delete this.lnc; + resolve(); + }, 1000); + }); + } + + getInfo(): Promise { + return this.lnc.lnd.lightning.GetInfo().then((data: FixMe) => { + return { + data: { + alias: data.alias, + pubkey: data.identityPubkey, + color: data.color, + }, + }; + }); + } + + getBalance(): Promise { + return this.lnc.lnd.lightning.ChannelBalance().then((data: FixMe) => { + return { + data: { + balance: data.balance, + }, + }; + }); + } + + async getInvoices(): Promise { + const data = await this.lnc.lnd.lightning.ListInvoices({ reversed: true }); + + const invoices: ConnectorInvoice[] = data.invoices + .map((invoice: FixMe, index: number): ConnectorInvoice => { + const custom_records = + invoice.htlcs[0] && invoice.htlcs[0].custom_records; + + return { + custom_records, + id: `${invoice.payment_request}-${index}`, + memo: invoice.memo, + preimage: invoice.r_preimage, + settled: invoice.settled, + settleDate: parseInt(invoice.settle_date) * 1000, + totalAmount: invoice.value, + type: "received", + }; + }) + .reverse(); + + return { + data: { + invoices, + }, + }; + } + + connectPeer(args: ConnectPeerArgs): Promise { + //const { pubkey, host } = args; + throw new Error("Not implemented yet"); + } + + async checkPayment(args: CheckPaymentArgs): Promise { + return this.lnc.lnd.lightning + .LookupInvoice({ r_hash_str: args.paymentHash }) + .then((data: FixMe) => { + return { + data: { + paid: data.settled, + }, + }; + }); + } + + sendPayment(args: SendPaymentArgs): Promise { + return this.lnc.lnd.lightning + .SendPaymentSync({ + payment_request: args.paymentRequest, + }) + .then((data: FixMe) => { + if (data.paymentError) { + throw new Error(data.paymentError); + } + return { + data: { + preimage: utils.base64ToHex(data.paymentPreimage), + paymentHash: utils.base64ToHex(data.paymentHash), + route: { + total_amt: data.paymentRoute.totalAmt, + total_fees: data.paymentRoute.totalFees, + }, + }, + }; + }); + } + async keysend(args: KeysendArgs): Promise { + //See: https://gist.github.com/dellagustin/c3793308b75b6b0faf134e64db7dc915 + const dest_pubkey_hex = args.pubkey; + const dest_pubkey_base64 = Hex.parse(dest_pubkey_hex).toString(Base64); + + const preimage = WordArray.random(32); + const preimage_base64 = preimage.toString(Base64); + const hash = SHA256(preimage).toString(Base64); + + //base64 encode the record values + const records_base64: Record = {}; + for (const key in args.customRecords) { + records_base64[parseInt(key)] = UTF8.parse( + args.customRecords[key] + ).toString(Base64); + } + //mandatory record for keysend + records_base64[5482373484] = preimage_base64; + + return this.lnc.lnd.lightning + .SendPaymentSync({ + dest: dest_pubkey_base64, + amt: args.amount, + payment_hash: hash, + dest_custom_records: records_base64, + }) + .then((data: FixMe) => { + if (data.paymentError) { + throw new Error(data.paymentError); + } + return { + data: { + preimage: utils.base64ToHex(data.paymentPreimage), + paymentHash: utils.base64ToHex(data.paymentHash), + route: { + total_amt: data.paymentRoute.totalAmt, + total_fees: data.paymentRoute.totalFees, + }, + }, + }; + }); + } + + signMessage(args: SignMessageArgs): Promise { + // use v2 to use the key locator (key_loc) + // return this.request("POST", "/v2/signer/signmessage", { + return this.lnc.lnd.lightning + .SignMessage({ msg: args.message }) + .then((data: FixMe) => { + return { + data: { + message: args.message, + signature: data.signature, + }, + }; + }); + } + + makeInvoice(args: MakeInvoiceArgs): Promise { + return this.lnc.lnd.lightning + .AddInvoice({ memo: args.memo, value: args.amount }) + .then((data: FixMe) => { + return { + data: { + paymentRequest: data.paymentRequest, + rHash: utils.base64ToHex(data.rHash), + }, + }; + }); + } + + request(method: FixMe, args: FixMe) { + const func = method.split(".").reduce((obj: FixMe, prop: FixMe) => { + return obj[prop]; + }, this.lnc); + return func(args).then((data: FixMe) => { + return { data }; + }); + } +} + +export default Lnc; diff --git a/src/extension/background-script/router.ts b/src/extension/background-script/router.ts index edaf53ef0e..394d10678a 100644 --- a/src/extension/background-script/router.ts +++ b/src/extension/background-script/router.ts @@ -19,6 +19,7 @@ const routes = { signMessageOrPrompt: webln.signMessageOrPrompt, lnurl: webln.lnurl, makeInvoice: webln.makeInvoiceOrPrompt, + lnc: ln.lnc, }, addAllowance: allowances.add, getAllowance: allowances.get, diff --git a/src/extension/content-script/onend.js b/src/extension/content-script/onend.js index 1c65687590..be9797abe9 100644 --- a/src/extension/content-script/onend.js +++ b/src/extension/content-script/onend.js @@ -15,6 +15,7 @@ const weblnCalls = [ "keysendOrPrompt", "makeInvoice", "signMessageOrPrompt", + "lnc", ]; // calls that can be executed when webln is not enabled for the current content page const disabledCalls = ["enable"]; diff --git a/src/extension/ln/webln/index.ts b/src/extension/ln/webln/index.ts index fa4f91b3ca..55fed66eb7 100644 --- a/src/extension/ln/webln/index.ts +++ b/src/extension/ln/webln/index.ts @@ -90,6 +90,18 @@ export default class WebLNProvider { throw new Error("Alby does not support `verifyMessage`"); } + lnc(method: string, params: FixMe) { + if (!this.enabled) { + throw new Error("Provider must be enabled before calling verifyMessage"); + } + + const args = { + method, + params, + }; + return this.execute("lnc", args); + } + // NOTE: new call `action`s must be specified also in the content script execute( action: string, diff --git a/src/manifest.json b/src/manifest.json index b22f936e51..7a369b62ba 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -25,7 +25,7 @@ "*://*/*" ], - "content_security_policy": "script-src 'self'; object-src 'self'", + "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';", "__chrome|firefox__author": "Alby", "__opera__developer": { diff --git a/yarn.lock b/yarn.lock index 3d3bf684b3..b0ba5ae249 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2321,6 +2321,13 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.3.tgz#0300943770e04231041a51bd39f0439b5c7ab4f0" integrity sha512-nkalE/f1RvRGChwBnEIoBfSEYOXnCRdleKuv6+lePbMDrMZXeDQnqak5XDOeBgrPPyPfAdcCu/B5z+v3VhplGg== +"@lightninglabs/lnc-web@^0.1.12-alpha": + version "0.1.12-alpha" + resolved "https://registry.yarnpkg.com/@lightninglabs/lnc-web/-/lnc-web-0.1.12-alpha.tgz#3a74e1b88636dadfbff43c93644fb49cc4a46181" + integrity sha512-6cvDM5bdDdiEoXRZlDYWBlXGmCc8cSCXCnz3JFEf9iGBPgP+6oMG9Ds+O/7HuD8elX1dhGx/BGo998jNJqn1Hg== + dependencies: + crypto-js "4.1.1" + "@mdx-js/mdx@^1.6.22": version "1.6.22" resolved "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz" @@ -7107,7 +7114,7 @@ crypto-browserify@^3.11.0, crypto-browserify@^3.12.0: randombytes "^2.0.0" randomfill "^1.0.3" -crypto-js@^4.1.1: +crypto-js@4.1.1, crypto-js@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== From a0c52b4ad4b83a19c86ef64a814495ec5f5d2367 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Thu, 20 Oct 2022 23:03:19 +0200 Subject: [PATCH 002/123] chore: fix type --- src/extension/background-script/actions/ln/lnc.ts | 13 +++++++++---- .../connectors/connector.interface.ts | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/extension/background-script/actions/ln/lnc.ts b/src/extension/background-script/actions/ln/lnc.ts index ee4070c2d2..b8b794f797 100644 --- a/src/extension/background-script/actions/ln/lnc.ts +++ b/src/extension/background-script/actions/ln/lnc.ts @@ -13,10 +13,15 @@ export default async function (message: Message) { }); } - const response = await connector.request( - message.args.method, - message.args.params - ); + let response; + if (connector.requestLNC) { + response = await connector.requestLNC( + message.args.method as string, + message.args.params + ); + } else { + response = { error: "Only available with LNC" }; + } return response; } diff --git a/src/extension/background-script/connectors/connector.interface.ts b/src/extension/background-script/connectors/connector.interface.ts index 3e8d13de24..78e2689788 100644 --- a/src/extension/background-script/connectors/connector.interface.ts +++ b/src/extension/background-script/connectors/connector.interface.ts @@ -117,7 +117,7 @@ export default interface Connector { keysend(args: KeysendArgs): Promise; checkPayment(args: CheckPaymentArgs): Promise; signMessage(args: SignMessageArgs): Promise; - request?(method: string, args: FixMe): Promise; + requestLNC?(method: string, args: FixMe): Promise; connectPeer( args: ConnectPeerArgs ): Promise | Error; From 80cffada56eea89ef4728f062e2757817b566109 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 31 Oct 2022 14:30:49 +0100 Subject: [PATCH 003/123] fix: naming --- src/extension/background-script/connectors/lnc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index d021b1790d..b5fa578ae4 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -217,7 +217,7 @@ class Lnc implements Connector { }); } - request(method: FixMe, args: FixMe) { + requestLNC(method: FixMe, args: FixMe) { const func = method.split(".").reduce((obj: FixMe, prop: FixMe) => { return obj[prop]; }, this.lnc); From 9676daf294ac1e8eb2a4ace4ff00d283ca22dde9 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Thu, 10 Nov 2022 14:29:01 +0100 Subject: [PATCH 004/123] feat(lnc): use custom LNC credentialstore this saves the LNC data to the extension's account config --- .node-version | 2 +- .../background-script/connectors/lnc.ts | 97 ++++++++++++++++++- 2 files changed, 97 insertions(+), 2 deletions(-) diff --git a/.node-version b/.node-version index 2851522760..d4df1049f2 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -14.20.1 +18.1.0 diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index b5fa578ae4..4dc4444ffb 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -1,11 +1,14 @@ import LNC from "@lightninglabs/lnc-web"; +import { CredentialStore } from "@lightninglabs/lnc-web"; import Base64 from "crypto-js/enc-base64"; import Hex from "crypto-js/enc-hex"; import UTF8 from "crypto-js/enc-utf8"; import WordArray from "crypto-js/lib-typedarrays"; import SHA256 from "crypto-js/sha256"; +import { encryptData } from "~/common/lib/crypto"; import utils from "~/common/lib/utils"; +import state from "../state"; import Connector, { CheckPaymentArgs, CheckPaymentResponse, @@ -26,6 +29,74 @@ import Connector, { interface Config { pairingPhrase: string; + localKey?: string; + remoteKey?: string; + serverHost?: string; +} + +const DEFAULT_SERVER_HOST = "mailbox.terminal.lightning.today:443"; + +class LncCredentialStore implements CredentialStore { + config: Config; + + constructor(config: Config) { + this.config = config; + } + + get password() { + return ""; + } + + set localKey(value: string) { + this.config.localKey = value; + this._save(); + } + + get localKey() { + return this.config.localKey || ""; + } + + set remoteKey(value: string) { + this.config.remoteKey = value; + this._save(); + } + + get remoteKey() { + return this.config.remoteKey || ""; + } + + get pairingPhrase() { + return this.config.pairingPhrase; + } + + set serverHost(value: string) { + this.config.serverHost = value; + this._save(); + } + + get serverHost() { + return this.config.serverHost || DEFAULT_SERVER_HOST; + } + + get isPaired() { + return true; + } + + async clear() { + this.config.localKey = ""; + this.config.remoteKey = ""; + this._save(); + } + + private async _save() { + const accounts = state.getState().accounts; + const password = state.getState().password as string; + const currentAccountId = state.getState().currentAccountId as string; + accounts[currentAccountId].config = encryptData(this.config, password); + state.setState({ accounts }); + await state.getState().saveToStorage(); + return true; + } } class Lnc implements Connector { @@ -35,7 +106,7 @@ class Lnc implements Connector { constructor(config: Config) { this.config = config; this.lnc = new LNC({ - pairingPhrase: this.config.pairingPhrase, + credentialStore: new LncCredentialStore(config), }); } @@ -59,6 +130,9 @@ class Lnc implements Connector { } getInfo(): Promise { + if (!this.lnc.isConnected) { + return Promise.reject(new Error("Account is still loading")); + } return this.lnc.lnd.lightning.GetInfo().then((data: FixMe) => { return { data: { @@ -71,6 +145,9 @@ class Lnc implements Connector { } getBalance(): Promise { + if (!this.lnc.isConnected) { + return Promise.reject(new Error("Account is still loading")); + } return this.lnc.lnd.lightning.ChannelBalance().then((data: FixMe) => { return { data: { @@ -81,6 +158,9 @@ class Lnc implements Connector { } async getInvoices(): Promise { + if (!this.lnc.isConnected) { + throw new Error("Account is still loading"); + } const data = await this.lnc.lnd.lightning.ListInvoices({ reversed: true }); const invoices: ConnectorInvoice[] = data.invoices @@ -114,6 +194,9 @@ class Lnc implements Connector { } async checkPayment(args: CheckPaymentArgs): Promise { + if (!this.lnc.isConnected) { + throw new Error("Account is still loading"); + } return this.lnc.lnd.lightning .LookupInvoice({ r_hash_str: args.paymentHash }) .then((data: FixMe) => { @@ -126,6 +209,9 @@ class Lnc implements Connector { } sendPayment(args: SendPaymentArgs): Promise { + if (!this.lnc.isConnected) { + return Promise.reject(new Error("Account is still loading")); + } return this.lnc.lnd.lightning .SendPaymentSync({ payment_request: args.paymentRequest, @@ -147,6 +233,9 @@ class Lnc implements Connector { }); } async keysend(args: KeysendArgs): Promise { + if (!this.lnc.isConnected) { + throw new Error("Account is still loading"); + } //See: https://gist.github.com/dellagustin/c3793308b75b6b0faf134e64db7dc915 const dest_pubkey_hex = args.pubkey; const dest_pubkey_base64 = Hex.parse(dest_pubkey_hex).toString(Base64); @@ -190,6 +279,9 @@ class Lnc implements Connector { } signMessage(args: SignMessageArgs): Promise { + if (!this.lnc.isConnected) { + return Promise.reject(new Error("Account is still loading")); + } // use v2 to use the key locator (key_loc) // return this.request("POST", "/v2/signer/signmessage", { return this.lnc.lnd.lightning @@ -205,6 +297,9 @@ class Lnc implements Connector { } makeInvoice(args: MakeInvoiceArgs): Promise { + if (!this.lnc.isConnected) { + return Promise.reject(new Error("Account is still loading")); + } return this.lnc.lnd.lightning .AddInvoice({ memo: args.memo, value: args.amount }) .then((data: FixMe) => { From 70a0868a7f921065eb546f62b1c4a3f572ccba45 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Fri, 11 Nov 2022 00:39:01 +0100 Subject: [PATCH 005/123] fix: save current account only once the connector is loaded this tries to fix a race condition that could happen when the user changes the connector which is loading and the user tries to call some other action at the same time that loads the connector. --- src/extension/background-script/actions/accounts/select.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/extension/background-script/actions/accounts/select.ts b/src/extension/background-script/actions/accounts/select.ts index 9d3970bebc..0fd44ef529 100644 --- a/src/extension/background-script/actions/accounts/select.ts +++ b/src/extension/background-script/actions/accounts/select.ts @@ -17,11 +17,12 @@ const select = async (message: MessageAccountSelect) => { connector: null, // reset memoized connector currentAccountId: accountId, }); - await state.getState().saveToStorage(); - // init connector this also memoizes the connector in the state object await state.getState().getConnector(); + // save the current account id once the connector is loaded + await state.getState().saveToStorage(); + return { data: { unlocked: true }, }; From 56cb99bd6fc7587824781624e977205c4dbdb638 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 5 Dec 2022 19:05:02 +0530 Subject: [PATCH 006/123] feat: view and edit allowance permissions --- src/app/components/AllowanceMenu/index.tsx | 119 ++++++++++++++++-- .../actions/allowances/disablePermissions.ts | 15 +++ .../actions/allowances/index.ts | 14 ++- .../actions/allowances/listPermissions.ts | 18 +++ src/i18n/locales/en/translation.json | 4 +- src/types.ts | 14 +++ 6 files changed, 170 insertions(+), 14 deletions(-) create mode 100644 src/extension/background-script/actions/allowances/disablePermissions.ts create mode 100644 src/extension/background-script/actions/allowances/listPermissions.ts diff --git a/src/app/components/AllowanceMenu/index.tsx b/src/app/components/AllowanceMenu/index.tsx index 81bfe5aa43..93223396ff 100644 --- a/src/app/components/AllowanceMenu/index.tsx +++ b/src/app/components/AllowanceMenu/index.tsx @@ -1,6 +1,8 @@ import { GearIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; +import Loading from "@components/Loading"; import Setting from "@components/Setting"; +import Checkbox from "@components/form/Checkbox"; import Toggle from "@components/form/Toggle"; import { useState, useEffect } from "react"; import type { FormEvent } from "react"; @@ -9,7 +11,7 @@ import Modal from "react-modal"; import { toast } from "react-toastify"; import { useSettings } from "~/app/context/SettingsContext"; import msg from "~/common/lib/msg"; -import type { Allowance } from "~/types"; +import type { Allowance, Permission } from "~/types"; import Button from "../Button"; import Menu from "../Menu"; @@ -33,10 +35,42 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { const [budget, setBudget] = useState(""); const [lnurlAuth, setLnurlAuth] = useState(false); const [fiatAmount, setFiatAmount] = useState(""); + + const [originalPermissions, setOriginalPermissions] = useState< + Permission[] | null + >(null); + const [permissions, setPermissions] = useState(null); + const [isLoadingPermissions, setIsLoadingPermissions] = useState(true); + const { t } = useTranslation("components", { keyPrefix: "allowance_menu" }); const { t: tCommon } = useTranslation("common"); + const hasPermissions = !isLoadingPermissions && !!permissions?.length; + const isEmptyPermissions = !isLoadingPermissions && permissions?.length === 0; + useEffect(() => { + const fetchPermissions = async () => { + try { + const permissionResponse = await msg.request<{ + permissions: Permission[]; + }>("listPermissions", { + id: allowance.id, + }); + + const permissions: Permission[] = permissionResponse.permissions; + + setOriginalPermissions(permissions); + setPermissions(permissions); + } catch (e) { + console.error(e); + if (e instanceof Error) toast.error(e.message); + } finally { + setIsLoadingPermissions(false); + } + }; + + !permissions && fetchPermissions(); + if (budget !== "" && showFiat) { const getFiat = async () => { const res = await getFormattedFiat(budget); @@ -45,7 +79,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { getFiat(); } - }, [budget, showFiat, getFormattedFiat]); + }, [budget, showFiat, getFormattedFiat, allowance.id, permissions]); function openModal() { setBudget(allowance.totalBudget.toString()); @@ -65,6 +99,14 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { setIsOpen(false); } + function changedPermissionIds(): number[] { + if (!permissions || !originalPermissions) return []; + const ids = permissions + .filter((prm, i) => prm.enabled !== originalPermissions[i].enabled) + .map((prm) => prm.id); + return ids; + } + async function updateAllowance() { await msg.request("updateAllowance", { id: allowance.id, @@ -72,6 +114,12 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { lnurlAuth, }); + await msg.request("disablePermissions", { + ids: changedPermissionIds(), + }); + + setOriginalPermissions(permissions); + onEdit && onEdit(); closeModal(); } @@ -145,15 +193,61 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { onChange={(e) => setBudget(e.target.value)} /> - - setLnurlAuth(!lnurlAuth)} - /> - +
+ + setLnurlAuth(!lnurlAuth)} + /> + +
+

+ {t("edit_permissions")} +

+ + {isLoadingPermissions && ( +
+ +
+ )} + + {hasPermissions && ( +
+ {permissions.map((permission, index) => ( +
+ { + setPermissions( + permissions.map((prm) => + prm.id === permission.id + ? { ...prm, enabled: !prm.enabled } + : prm + ) + ); + }} + /> + +
+ ))} +
+ )} + + {isEmptyPermissions && ( +

+ {t("no_permissions")} +

+ )}
@@ -163,7 +257,8 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { primary disabled={ parseInt(budget) === allowance.totalBudget && - lnurlAuth === allowance.lnurlAuth + lnurlAuth === allowance.lnurlAuth && + !changedPermissionIds().length } />
diff --git a/src/extension/background-script/actions/allowances/disablePermissions.ts b/src/extension/background-script/actions/allowances/disablePermissions.ts new file mode 100644 index 0000000000..651756209c --- /dev/null +++ b/src/extension/background-script/actions/allowances/disablePermissions.ts @@ -0,0 +1,15 @@ +import db from "~/extension/background-script/db"; +import type { MessagePermissionsDisable } from "~/types"; + +const disablePermissions = async (message: MessagePermissionsDisable) => { + const { ids } = message.args; + + for (const id of ids) { + await db.permissions.update(id, { enabled: false }); + } + await db.saveToStorage(); + + return { data: true }; +}; + +export default disablePermissions; diff --git a/src/extension/background-script/actions/allowances/index.ts b/src/extension/background-script/actions/allowances/index.ts index 71c4784cfc..ad0046242c 100644 --- a/src/extension/background-script/actions/allowances/index.ts +++ b/src/extension/background-script/actions/allowances/index.ts @@ -1,9 +1,21 @@ import add from "./add"; import deleteAllowance from "./delete"; +import disablePermissions from "./disablePermissions"; import enable from "./enable"; import get from "./get"; import getById from "./getById"; import list from "./list"; +import listPermissions from "./listPermissions"; import updateAllowance from "./update"; -export { add, enable, get, getById, list, deleteAllowance, updateAllowance }; +export { + add, + enable, + get, + getById, + list, + deleteAllowance, + updateAllowance, + listPermissions, + disablePermissions, +}; diff --git a/src/extension/background-script/actions/allowances/listPermissions.ts b/src/extension/background-script/actions/allowances/listPermissions.ts new file mode 100644 index 0000000000..c49c7f0d20 --- /dev/null +++ b/src/extension/background-script/actions/allowances/listPermissions.ts @@ -0,0 +1,18 @@ +import db from "~/extension/background-script/db"; +import type { MessagePermissionsList } from "~/types"; + +const listPermissions = async (message: MessagePermissionsList) => { + const { id } = message.args; + const permissions = await db.permissions + .toCollection() + .filter((permission) => permission.allowanceId === id) + .toArray(); + + return { + data: { + permissions, + }, + }; +}; + +export default listPermissions; diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 44495a3e42..af67b75672 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -717,7 +717,9 @@ "edit_allowance": { "title": "Edit Allowance", "screen_reader": "Allowance Options" - } + }, + "edit_permissions": "Edit Permissions", + "no_permissions": "No permissions." }, "qrcode_scanner": { "title": "Scan QR Code", diff --git a/src/types.ts b/src/types.ts index ff1601370a..270ab9f635 100644 --- a/src/types.ts +++ b/src/types.ts @@ -288,6 +288,20 @@ export interface MessageAllowanceList extends MessageDefault { action: "listAllowances"; } +export interface MessagePermissionsList extends MessageDefault { + args: { + id: Allowance["id"]; + }; + action: "listPermissions"; +} + +export interface MessagePermissionsDisable extends MessageDefault { + args: { + ids: Permission["id"][]; + }; + action: "disablePermissions"; +} + export interface MessageInvoices extends Omit { args: { limit?: number; isSettled?: boolean }; action: "getInvoices"; From 7b717da271bbc722ef6e886c1fa1743b391f5fc9 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 5 Dec 2022 20:30:12 +0530 Subject: [PATCH 007/123] fix: addPermissionFor to update existing permission --- .../background-script/actions/nostr/helpers.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/extension/background-script/actions/nostr/helpers.ts b/src/extension/background-script/actions/nostr/helpers.ts index 64a077f0e1..61c63ff7e3 100644 --- a/src/extension/background-script/actions/nostr/helpers.ts +++ b/src/extension/background-script/actions/nostr/helpers.ts @@ -33,6 +33,24 @@ export async function addPermissionFor(method: string, host: string) { if (!allowance?.id) { return false; } + + const findPermission = await db.permissions.get({ + host, + method, + }); + + if (findPermission) { + if (!findPermission?.id) { + return false; + } + + const permissionEnabled = await db.permissions.update(findPermission.id, { + enabled: true, + }); + + return !!permissionEnabled && (await db.saveToStorage()); + } + const permissionIsAdded = await db.permissions.add({ createdAt: Date.now().toString(), allowanceId: allowance.id, From 19c94f1b2cb7439157677c1076b9fd70ab33e839 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 5 Dec 2022 20:52:06 +0530 Subject: [PATCH 008/123] chore: allowancemenu --- src/app/components/AllowanceMenu/index.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/app/components/AllowanceMenu/index.tsx b/src/app/components/AllowanceMenu/index.tsx index 93223396ff..53f5202c88 100644 --- a/src/app/components/AllowanceMenu/index.tsx +++ b/src/app/components/AllowanceMenu/index.tsx @@ -48,6 +48,11 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { const hasPermissions = !isLoadingPermissions && !!permissions?.length; const isEmptyPermissions = !isLoadingPermissions && permissions?.length === 0; + const isEnabled = + parseInt(budget) !== allowance.totalBudget || + lnurlAuth !== allowance.lnurlAuth || + changedPermissionIds().length; + useEffect(() => { const fetchPermissions = async () => { try { @@ -219,8 +224,8 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { {permissions.map((permission, index) => (
{ setPermissions( @@ -233,7 +238,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { }} />
From b6485e37e065b47f97dcd5ef2957b4f0e9539073 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 5 Dec 2022 21:07:32 +0530 Subject: [PATCH 009/123] fix: toggle permissions instead of disable --- src/app/components/AllowanceMenu/index.tsx | 10 +++++++--- .../actions/allowances/disablePermissions.ts | 15 --------------- .../actions/allowances/index.ts | 4 ++-- .../actions/allowances/togglePermissions.ts | 19 +++++++++++++++++++ src/types.ts | 2 +- 5 files changed, 29 insertions(+), 21 deletions(-) delete mode 100644 src/extension/background-script/actions/allowances/disablePermissions.ts create mode 100644 src/extension/background-script/actions/allowances/togglePermissions.ts diff --git a/src/app/components/AllowanceMenu/index.tsx b/src/app/components/AllowanceMenu/index.tsx index 53f5202c88..6f50bf46db 100644 --- a/src/app/components/AllowanceMenu/index.tsx +++ b/src/app/components/AllowanceMenu/index.tsx @@ -119,9 +119,13 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { lnurlAuth, }); - await msg.request("disablePermissions", { - ids: changedPermissionIds(), - }); + const changedIds = changedPermissionIds(); + + if (changedIds.length) { + await msg.request("togglePermissions", { + ids: changedIds, + }); + } setOriginalPermissions(permissions); diff --git a/src/extension/background-script/actions/allowances/disablePermissions.ts b/src/extension/background-script/actions/allowances/disablePermissions.ts deleted file mode 100644 index 651756209c..0000000000 --- a/src/extension/background-script/actions/allowances/disablePermissions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import db from "~/extension/background-script/db"; -import type { MessagePermissionsDisable } from "~/types"; - -const disablePermissions = async (message: MessagePermissionsDisable) => { - const { ids } = message.args; - - for (const id of ids) { - await db.permissions.update(id, { enabled: false }); - } - await db.saveToStorage(); - - return { data: true }; -}; - -export default disablePermissions; diff --git a/src/extension/background-script/actions/allowances/index.ts b/src/extension/background-script/actions/allowances/index.ts index ad0046242c..5278361e82 100644 --- a/src/extension/background-script/actions/allowances/index.ts +++ b/src/extension/background-script/actions/allowances/index.ts @@ -1,11 +1,11 @@ import add from "./add"; import deleteAllowance from "./delete"; -import disablePermissions from "./disablePermissions"; import enable from "./enable"; import get from "./get"; import getById from "./getById"; import list from "./list"; import listPermissions from "./listPermissions"; +import togglePermissions from "./togglePermissions"; import updateAllowance from "./update"; export { @@ -17,5 +17,5 @@ export { deleteAllowance, updateAllowance, listPermissions, - disablePermissions, + togglePermissions, }; diff --git a/src/extension/background-script/actions/allowances/togglePermissions.ts b/src/extension/background-script/actions/allowances/togglePermissions.ts new file mode 100644 index 0000000000..8a6c73f35b --- /dev/null +++ b/src/extension/background-script/actions/allowances/togglePermissions.ts @@ -0,0 +1,19 @@ +import db from "~/extension/background-script/db"; +import type { MessagePermissionsDisable } from "~/types"; + +const togglePermissions = async (message: MessagePermissionsDisable) => { + const { ids } = message.args; + + for (const id of ids) { + const permission = await db.permissions.get({ id }); + + if (!permission) continue; + + await db.permissions.update(id, { enabled: !permission.enabled }); + } + await db.saveToStorage(); + + return { data: true }; +}; + +export default togglePermissions; diff --git a/src/types.ts b/src/types.ts index 270ab9f635..36ddbf8fea 100644 --- a/src/types.ts +++ b/src/types.ts @@ -299,7 +299,7 @@ export interface MessagePermissionsDisable extends MessageDefault { args: { ids: Permission["id"][]; }; - action: "disablePermissions"; + action: "togglePermissions"; } export interface MessageInvoices extends Omit { From 8a71aedbc99f103895b50f19b1275204a82e7d53 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 12 Dec 2022 17:53:41 +0530 Subject: [PATCH 010/123] chore: changes after rebase --- src/app/components/AllowanceMenu/index.tsx | 128 +++++++++--------- .../actions/allowances/index.ts | 14 +- .../actions/allowances/listPermissions.ts | 18 --- .../actions/allowances/togglePermissions.ts | 19 --- .../actions/nostr/helpers.ts | 18 --- src/i18n/locales/en/translation.json | 3 +- src/types.ts | 14 -- 7 files changed, 67 insertions(+), 147 deletions(-) delete mode 100644 src/extension/background-script/actions/allowances/listPermissions.ts delete mode 100644 src/extension/background-script/actions/allowances/togglePermissions.ts diff --git a/src/app/components/AllowanceMenu/index.tsx b/src/app/components/AllowanceMenu/index.tsx index 6f50bf46db..40136796c0 100644 --- a/src/app/components/AllowanceMenu/index.tsx +++ b/src/app/components/AllowanceMenu/index.tsx @@ -1,6 +1,5 @@ import { GearIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; -import Loading from "@components/Loading"; import Setting from "@components/Setting"; import Checkbox from "@components/form/Checkbox"; import Toggle from "@components/form/Toggle"; @@ -46,12 +45,11 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { const { t: tCommon } = useTranslation("common"); const hasPermissions = !isLoadingPermissions && !!permissions?.length; - const isEmptyPermissions = !isLoadingPermissions && permissions?.length === 0; - const isEnabled = + const enableSubmit = parseInt(budget) !== allowance.totalBudget || lnurlAuth !== allowance.lnurlAuth || - changedPermissionIds().length; + getChangedPermissionsIds().length; useEffect(() => { const fetchPermissions = async () => { @@ -75,7 +73,9 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { }; !permissions && fetchPermissions(); + }, [allowance.id, permissions]); + useEffect(() => { if (budget !== "" && showFiat) { const getFiat = async () => { const res = await getFormattedFiat(budget); @@ -84,7 +84,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { getFiat(); } - }, [budget, showFiat, getFormattedFiat, allowance.id, permissions]); + }, [budget, showFiat, getFormattedFiat]); function openModal() { setBudget(allowance.totalBudget.toString()); @@ -104,7 +104,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { setIsOpen(false); } - function changedPermissionIds(): number[] { + function getChangedPermissionsIds(): number[] { if (!permissions || !originalPermissions) return []; const ids = permissions .filter((prm, i) => prm.enabled !== originalPermissions[i].enabled) @@ -113,24 +113,30 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { } async function updateAllowance() { - await msg.request("updateAllowance", { - id: allowance.id, - totalBudget: parseInt(budget), - lnurlAuth, - }); + try { + await msg.request("updateAllowance", { + id: allowance.id, + totalBudget: parseInt(budget), + lnurlAuth, + }); - const changedIds = changedPermissionIds(); + const changedIds = getChangedPermissionsIds(); - if (changedIds.length) { - await msg.request("togglePermissions", { - ids: changedIds, - }); - } + if (changedIds.length) { + await msg.request("deletePermissionsById", { + ids: changedIds, + }); + } - setOriginalPermissions(permissions); + /* DB is updated, let´s update the original permissions + to the updated permission in local state too */ + setOriginalPermissions(permissions); - onEdit && onEdit(); - closeModal(); + onEdit && onEdit(); + closeModal(); + } catch (e) { + console.error(e); + } } return ( @@ -202,7 +208,13 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { onChange={(e) => setBudget(e.target.value)} /> -
+
-

- {t("edit_permissions")} -

- - {isLoadingPermissions && ( -
- -
- )} {hasPermissions && ( -
- {permissions.map((permission, index) => ( -
- { - setPermissions( - permissions.map((prm) => - prm.id === permission.id - ? { ...prm, enabled: !prm.enabled } - : prm - ) - ); - }} - /> - -
- ))} -
- )} - - {isEmptyPermissions && ( -

- {t("no_permissions")} -

+ <> +

+ {t("edit_permissions")} +

+
+ {permissions.map((permission, index) => ( +
+ { + setPermissions( + permissions.map((prm) => + prm.id === permission.id + ? { ...prm, enabled: !prm.enabled } + : prm + ) + ); + }} + /> + +
+ ))} +
+ )}
@@ -264,7 +266,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { type="submit" label={tCommon("actions.save")} primary - disabled={!isEnabled} + disabled={!enableSubmit} /> diff --git a/src/extension/background-script/actions/allowances/index.ts b/src/extension/background-script/actions/allowances/index.ts index 5278361e82..71c4784cfc 100644 --- a/src/extension/background-script/actions/allowances/index.ts +++ b/src/extension/background-script/actions/allowances/index.ts @@ -4,18 +4,6 @@ import enable from "./enable"; import get from "./get"; import getById from "./getById"; import list from "./list"; -import listPermissions from "./listPermissions"; -import togglePermissions from "./togglePermissions"; import updateAllowance from "./update"; -export { - add, - enable, - get, - getById, - list, - deleteAllowance, - updateAllowance, - listPermissions, - togglePermissions, -}; +export { add, enable, get, getById, list, deleteAllowance, updateAllowance }; diff --git a/src/extension/background-script/actions/allowances/listPermissions.ts b/src/extension/background-script/actions/allowances/listPermissions.ts deleted file mode 100644 index c49c7f0d20..0000000000 --- a/src/extension/background-script/actions/allowances/listPermissions.ts +++ /dev/null @@ -1,18 +0,0 @@ -import db from "~/extension/background-script/db"; -import type { MessagePermissionsList } from "~/types"; - -const listPermissions = async (message: MessagePermissionsList) => { - const { id } = message.args; - const permissions = await db.permissions - .toCollection() - .filter((permission) => permission.allowanceId === id) - .toArray(); - - return { - data: { - permissions, - }, - }; -}; - -export default listPermissions; diff --git a/src/extension/background-script/actions/allowances/togglePermissions.ts b/src/extension/background-script/actions/allowances/togglePermissions.ts deleted file mode 100644 index 8a6c73f35b..0000000000 --- a/src/extension/background-script/actions/allowances/togglePermissions.ts +++ /dev/null @@ -1,19 +0,0 @@ -import db from "~/extension/background-script/db"; -import type { MessagePermissionsDisable } from "~/types"; - -const togglePermissions = async (message: MessagePermissionsDisable) => { - const { ids } = message.args; - - for (const id of ids) { - const permission = await db.permissions.get({ id }); - - if (!permission) continue; - - await db.permissions.update(id, { enabled: !permission.enabled }); - } - await db.saveToStorage(); - - return { data: true }; -}; - -export default togglePermissions; diff --git a/src/extension/background-script/actions/nostr/helpers.ts b/src/extension/background-script/actions/nostr/helpers.ts index 61c63ff7e3..64a077f0e1 100644 --- a/src/extension/background-script/actions/nostr/helpers.ts +++ b/src/extension/background-script/actions/nostr/helpers.ts @@ -33,24 +33,6 @@ export async function addPermissionFor(method: string, host: string) { if (!allowance?.id) { return false; } - - const findPermission = await db.permissions.get({ - host, - method, - }); - - if (findPermission) { - if (!findPermission?.id) { - return false; - } - - const permissionEnabled = await db.permissions.update(findPermission.id, { - enabled: true, - }); - - return !!permissionEnabled && (await db.saveToStorage()); - } - const permissionIsAdded = await db.permissions.add({ createdAt: Date.now().toString(), allowanceId: allowance.id, diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index af67b75672..8d198fbafc 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -718,8 +718,7 @@ "title": "Edit Allowance", "screen_reader": "Allowance Options" }, - "edit_permissions": "Edit Permissions", - "no_permissions": "No permissions." + "edit_permissions": "Edit Permissions" }, "qrcode_scanner": { "title": "Scan QR Code", diff --git a/src/types.ts b/src/types.ts index 36ddbf8fea..ff1601370a 100644 --- a/src/types.ts +++ b/src/types.ts @@ -288,20 +288,6 @@ export interface MessageAllowanceList extends MessageDefault { action: "listAllowances"; } -export interface MessagePermissionsList extends MessageDefault { - args: { - id: Allowance["id"]; - }; - action: "listPermissions"; -} - -export interface MessagePermissionsDisable extends MessageDefault { - args: { - ids: Permission["id"][]; - }; - action: "togglePermissions"; -} - export interface MessageInvoices extends Omit { args: { limit?: number; isSettled?: boolean }; action: "getInvoices"; From ae357576944e93ac7b22bf0a553b87bb7d05ea85 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 12 Dec 2022 17:59:18 +0530 Subject: [PATCH 011/123] chore: use where in listByAllowance --- src/extension/background-script/actions/permissions/list.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/extension/background-script/actions/permissions/list.ts b/src/extension/background-script/actions/permissions/list.ts index 4d8336b347..77851ae6f2 100644 --- a/src/extension/background-script/actions/permissions/list.ts +++ b/src/extension/background-script/actions/permissions/list.ts @@ -4,8 +4,7 @@ import type { MessagePermissionsList, Permission } from "~/types"; const listByAllowance = async (message: MessagePermissionsList) => { const { id } = message.args; const dbPermissions = await db.permissions - .toCollection() - .filter((permission) => permission.allowanceId === id) + .where({ allowanceId: id }) .toArray(); const permissions: Permission[] = []; From 80598008b2aca5a9b55f92d39229014b27fd4c95 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Tue, 13 Dec 2022 16:45:42 +0530 Subject: [PATCH 012/123] chore: switch to toggle --- src/app/components/AllowanceMenu/index.tsx | 54 +++++++++++----------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/src/app/components/AllowanceMenu/index.tsx b/src/app/components/AllowanceMenu/index.tsx index 40136796c0..7815816a34 100644 --- a/src/app/components/AllowanceMenu/index.tsx +++ b/src/app/components/AllowanceMenu/index.tsx @@ -1,7 +1,6 @@ import { GearIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; import Setting from "@components/Setting"; -import Checkbox from "@components/form/Checkbox"; import Toggle from "@components/form/Toggle"; import { useState, useEffect } from "react"; import type { FormEvent } from "react"; @@ -178,6 +177,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { contentLabel={t("edit_allowance.screen_reader")} overlayClassName="bg-black bg-opacity-25 fixed inset-0 flex justify-center items-center p-5" className="rounded-lg bg-white w-full max-w-lg" + style={{ content: { maxHeight: "90vh" } }} >

@@ -194,7 +194,10 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { updateAllowance(); }} > -
+
{hasPermissions && ( - <> -

+
+

{t("edit_permissions")}

- {permissions.map((permission, index) => ( -
- { - setPermissions( - permissions.map((prm) => - prm.id === permission.id - ? { ...prm, enabled: !prm.enabled } - : prm - ) - ); - }} - /> - -
+ { + setPermissions( + permissions.map((prm) => + prm.id === permission.id + ? { ...prm, enabled: !prm.enabled } + : prm + ) + ); + }} + /> + + ))}
- +
)}

From 9c6e1f7a8bf17453831f4b33fcdd06650dc3172b Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 31 Dec 2022 12:41:34 +0000 Subject: [PATCH 013/123] Update react-qr-code to version 2.0.11 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 705d5d156c..3ef4bb53be 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "react-i18next": "^12.1.1", "react-loading-skeleton": "^3.1.0", "react-modal": "^3.16.1", - "react-qr-code": "^2.0.8", + "react-qr-code": "^2.0.11", "react-router-dom": "^6.6.1", "react-toastify": "^9.1.1", "stream": "^0.0.2", diff --git a/yarn.lock b/yarn.lock index 238a85e711..e544833193 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7954,10 +7954,10 @@ react-modal@^3.16.1: react-lifecycles-compat "^3.0.0" warning "^4.0.3" -react-qr-code@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/react-qr-code/-/react-qr-code-2.0.8.tgz#d34a766fb5b664a40dbdc7020f7ac801bacb2851" - integrity sha512-zYO9EAPQU8IIeD6c6uAle7NlKOiVKs8ji9hpbWPTGxO+FLqBN2on+XCXQvnhm91nrRd306RvNXUkUNcXXSfhWA== +react-qr-code@^2.0.11: + version "2.0.11" + resolved "https://registry.yarnpkg.com/react-qr-code/-/react-qr-code-2.0.11.tgz#444c759a2100424972e17135fbe0e32eaffa19e8" + integrity sha512-P7mvVM5vk9NjGdHMt4Z0KWeeJYwRAtonHTghZT2r+AASinLUUKQ9wfsGH2lPKsT++gps7hXmaiMGRvwTDEL9OA== dependencies: prop-types "^15.8.1" qr.js "0.0.0" From 17f2b32c7a2aa504d1f7d3a0f6510c6211737c65 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sat, 7 Jan 2023 13:13:58 +0100 Subject: [PATCH 014/123] feat(lnc): enable webln.request methods --- .../background-script/connectors/lnc.ts | 57 +++++++++++++++---- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index 1dc889241e..a8c88a7e63 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -33,6 +33,31 @@ interface Config { serverHost?: string; } +const methods: Record = { + getinfo: "lnd.lightning.GetInfo", + listchannels: "lnd.lightning.ListChannels", + listinvoices: "lnd.lightning.ListInvoices", + channelbalance: "lnd.lightning.ChannelBalance", + walletbalance: "lnd.lightning.WalletBalance", + openchannel: "lnd.lightning.OpenChannelSync", + connectpeer: "lnd.lightning.ConnectPeer", + disconnectpeer: "lnd.lightning.DisconnectPeer", + estimatefee: "lnd.lightning.EstimateFee", + getchaninfo: "lnd.lightning.GetChanInfo", + getnetworkinfo: "lnd.lightning.GetNetworkInfo", + getnodeinfo: "lnd.lightning.GetNodeInfo", + gettransactions: "lnd.lightning.GetTransactions", + listpayments: "lnd.lightning.ListPayments", + listpeers: "lnd.lightning.ListPeers", + lookupinvoice: "lnd.lightning.LookupInvoice", + queryroutes: "lnd.lightning.QueryRoutes", + verifymessage: "lnd.lightning.VerifyMessage", + sendtoroute: "lnd.lightning.SendToRouteSync", + decodepayreq: "lnd.lightning.DecodePayReq", + routermc: "lnd.router.QueryMissionControl", + addinvoice: "lnd.lightning.AddInvoice", +}; + const DEFAULT_SERVER_HOST = "mailbox.terminal.lightning.today:443"; class LncCredentialStore implements CredentialStore { @@ -128,6 +153,27 @@ class Lnc implements Connector { }); } + get supportedMethods() { + return Object.keys(methods); + } + + async requestMethod( + method: string, + args: Record + ): Promise<{ data: unknown }> { + const lncCall = methods[method]; + if (!lncCall) { + throw new Error(`${method} is not supported`); + } + + const func = lncCall.split(".").reduce((obj: FixMe, prop: FixMe) => { + return obj[prop]; + }, this.lnc); + return func(args).then((data: FixMe) => { + return { data }; + }); + } + getInfo(): Promise { if (!this.lnc.isConnected) { return Promise.reject(new Error("Account is still loading")); @@ -313,17 +359,6 @@ class Lnc implements Connector { }; }); } - - /* - requestLNC(method: FixMe, args: FixMe) { - const func = method.split(".").reduce((obj: FixMe, prop: FixMe) => { - return obj[prop]; - }, this.lnc); - return func(args).then((data: FixMe) => { - return { data }; - }); - } - */ } export default Lnc; From c588ad75f55e288568731667aaf4a37218b8be20 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sat, 7 Jan 2023 21:42:29 +0100 Subject: [PATCH 015/123] feat(lnc): snake case LNC return values to be compatible with current lnd the REST interface returns snake_case keys the GRPC interface returns camelCase keys we use the REST one for now as we already have this one out --- package.json | 4 +- .../background-script/connectors/lnc.ts | 41 ++++++++++++++----- yarn.lock | 7 ++++ 3 files changed, 41 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3fe2095581..9adbbb65b6 100644 --- a/package.json +++ b/package.json @@ -37,8 +37,8 @@ "dependencies": { "@bitcoin-design/bitcoin-icons-react": "^0.1.9", "@headlessui/react": "^1.7.7", - "@noble/secp256k1": "^1.7.0", "@lightninglabs/lnc-web": "^0.2.1-alpha", + "@noble/secp256k1": "^1.7.0", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/line-clamp": "^0.4.2", "axios": "^1.2.1", @@ -54,6 +54,7 @@ "lnmessage": "^0.0.14", "lodash.merge": "^4.6.2", "lodash.pick": "^4.4.0", + "lodash.snakecase": "^4.1.1", "pubsub-js": "^1.9.4", "react": "^18.2.0", "react-confetti": "^6.1.0", @@ -86,6 +87,7 @@ "@types/elliptic": "^6.4.14", "@types/lodash.merge": "^4.6.7", "@types/lodash.pick": "^4.4.0", + "@types/lodash.snakecase": "^4.1.1", "@types/pubsub-js": "^1.8.3", "@types/react-dom": "^18.0.10", "@types/react-modal": "^3.13.1", diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index a8c88a7e63..3c70f68fa3 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -5,6 +5,7 @@ import Hex from "crypto-js/enc-hex"; import UTF8 from "crypto-js/enc-utf8"; import WordArray from "crypto-js/lib-typedarrays"; import SHA256 from "crypto-js/sha256"; +import snakeCase from "lodash.snakecase"; import { encryptData } from "~/common/lib/crypto"; import utils from "~/common/lib/utils"; @@ -34,32 +35,52 @@ interface Config { } const methods: Record = { - getinfo: "lnd.lightning.GetInfo", - listchannels: "lnd.lightning.ListChannels", - listinvoices: "lnd.lightning.ListInvoices", + addinvoice: "lnd.lightning.AddInvoice", channelbalance: "lnd.lightning.ChannelBalance", - walletbalance: "lnd.lightning.WalletBalance", - openchannel: "lnd.lightning.OpenChannelSync", connectpeer: "lnd.lightning.ConnectPeer", + decodepayreq: "lnd.lightning.DecodePayReq", disconnectpeer: "lnd.lightning.DisconnectPeer", estimatefee: "lnd.lightning.EstimateFee", getchaninfo: "lnd.lightning.GetChanInfo", + getinfo: "lnd.lightning.GetInfo", getnetworkinfo: "lnd.lightning.GetNetworkInfo", getnodeinfo: "lnd.lightning.GetNodeInfo", gettransactions: "lnd.lightning.GetTransactions", + listchannels: "lnd.lightning.ListChannels", + listinvoices: "lnd.lightning.ListInvoices", listpayments: "lnd.lightning.ListPayments", listpeers: "lnd.lightning.ListPeers", lookupinvoice: "lnd.lightning.LookupInvoice", + openchannel: "lnd.lightning.OpenChannelSync", queryroutes: "lnd.lightning.QueryRoutes", - verifymessage: "lnd.lightning.VerifyMessage", - sendtoroute: "lnd.lightning.SendToRouteSync", - decodepayreq: "lnd.lightning.DecodePayReq", routermc: "lnd.router.QueryMissionControl", - addinvoice: "lnd.lightning.AddInvoice", + sendtoroute: "lnd.lightning.SendToRouteSync", + verifymessage: "lnd.lightning.VerifyMessage", + walletbalance: "lnd.lightning.WalletBalance", }; const DEFAULT_SERVER_HOST = "mailbox.terminal.lightning.today:443"; +const snakeCaseObjectDeep = (value: FixMe): FixMe => { + if (Array.isArray(value)) { + return value.map(snakeCaseObjectDeep); + } + + if (value && typeof value === "object" && value.constructor === Object) { + const obj = {} as FixMe; + const keys = Object.keys(value); + const len = keys.length; + + for (let i = 0; i < len; i += 1) { + obj[snakeCase(keys[i])] = snakeCaseObjectDeep(value[keys[i]]); + } + + return obj; + } + + return value; +}; + class LncCredentialStore implements CredentialStore { config: Config; @@ -170,7 +191,7 @@ class Lnc implements Connector { return obj[prop]; }, this.lnc); return func(args).then((data: FixMe) => { - return { data }; + return { data: snakeCaseObjectDeep(data) }; }); } diff --git a/yarn.lock b/yarn.lock index fdc602617b..9e33466009 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1512,6 +1512,13 @@ dependencies: "@types/lodash" "*" +"@types/lodash.snakecase@^4.1.1": + version "4.1.7" + resolved "https://registry.yarnpkg.com/@types/lodash.snakecase/-/lodash.snakecase-4.1.7.tgz#2a1ca7cbc08b63e7c3708f6291222e69b0d3216d" + integrity sha512-nv9M+JJokFyfZ9QmaWVXZu2DfT40K0GictZaA8SwXczp3oCzMkjp7PtvUBQyvdoG9SnlCpoRXZDIVwQRzJbd9A== + dependencies: + "@types/lodash" "*" + "@types/lodash@*": version "4.14.188" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.188.tgz#e4990c4c81f7c9b00c5ff8eae389c10f27980da5" From a1315c301d0fe00742634852ddcb0f45533c11c9 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sun, 8 Jan 2023 01:31:22 +0100 Subject: [PATCH 016/123] feat(lnc): add permission i18n --- src/i18n/locales/en/translation.json | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index db07359438..a38a0a6143 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -884,6 +884,30 @@ "decodepayreq": "Decode a payment request string.", "routermc": "Read the internal mission control state.", "addinvoice": "Create new invoices." + }, + "lnc": { + "getinfo": "Get the node information.", + "listchannels": "Get a description of all the open channels.", + "listinvoices": "Get a list of all invoices.", + "channelbalance": "Get a report on the total funds across all open channels.", + "walletbalance": "Get the total unspent outputs of the wallet.", + "openchannel": "Open a new channel.", + "connectpeer": "Establish a connection to a remote peer.", + "disconnectpeer": "Disconnect from a remote peer.", + "estimatefee": "Estimate the fee rate and total fees for a transaction.", + "getchaninfo": "Get the network announcement for the given channel.", + "getnetworkinfo": "Get basic stats about the known channel graph.", + "getnodeinfo": "Get the channel information for a node.", + "gettransactions": "Get a list of all transactions relevant to the wallet.", + "listpayments": "Get a list of all outgoing payments.", + "listpeers": "Get a list all currently active peers.", + "lookupinvoice": "Look up invoice details.", + "queryroutes": "Query for a possible route.", + "verifymessage": "Verify a signature over a msg.", + "sendtoroute": "Make a payment via the specified route.", + "decodepayreq": "Decode a payment request string.", + "routermc": "Read the internal mission control state.", + "addinvoice": "Create new invoices." } } } From 8122a5c5c524b83c98e4bf6c94bc729ca8e3dd59 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sun, 8 Jan 2023 03:23:03 +0100 Subject: [PATCH 017/123] feat(lnc): i18n --- src/app/screens/connectors/ConnectLnc/index.tsx | 13 ++++++++----- src/i18n/locales/en/translation.json | 11 +++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/app/screens/connectors/ConnectLnc/index.tsx b/src/app/screens/connectors/ConnectLnc/index.tsx index c8a67166d4..94891b36a3 100644 --- a/src/app/screens/connectors/ConnectLnc/index.tsx +++ b/src/app/screens/connectors/ConnectLnc/index.tsx @@ -2,6 +2,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; +import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; @@ -12,6 +13,9 @@ const initialFormData = Object.freeze({ export default function ConnectLnd() { const navigate = useNavigate(); + const { t } = useTranslation("translation", { + keyPrefix: "choose_connector.lnc", + }); const [formData, setFormData] = useState(initialFormData); const [loading, setLoading] = useState(false); @@ -64,8 +68,8 @@ export default function ConnectLnd() { return ( diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index a38a0a6143..3448334778 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -138,6 +138,17 @@ "connection_failed": "Connection failed. Are your LND credentials correct?" } }, + "lnc": { + "title": "LND", + "page": { + "title": "Connect to your LND node", + "description": "Create a new session in terminal (litd) to obtain a new pairing phrase and enter it here" + }, + "pairing_phrase": { + "label": "Your pairing phrase ", + "placeholder": "secret stack sats phrase" + } + }, "lndhub_bluewallet": { "title": "Bluewallet", "page": { From 5c702a1be989072874e74516d432059de94fbe1e Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sun, 8 Jan 2023 03:23:38 +0100 Subject: [PATCH 018/123] feat(lnc): use special wasm-unsave-eval CSP --- src/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/manifest.json b/src/manifest.json index f90d756a1a..e79c1178e4 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -26,7 +26,7 @@ "*://*/*" ], - "content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self';", + "content_security_policy": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';", "__chrome|firefox__author": "Alby", "__opera__developer": { From b993c719a5dd2b9466c5701e2a060d3a1c6cad42 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sun, 8 Jan 2023 11:35:43 +0100 Subject: [PATCH 019/123] test: load TextEncoder in jest setup for LNC --- jest.setup.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jest.setup.js b/jest.setup.js index 50bdc0c550..5f5c301c8a 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -7,6 +7,11 @@ import "@testing-library/jest-dom"; // https://github.com/mswjs/examples/tree/master/examples/rest-react import { server } from "./tests/unit/helpers/server"; +import { TextEncoder, TextDecoder } from 'util' +global.TextEncoder = TextEncoder +global.TextDecoder = TextDecoder + + // fix "This script should only be loaded in a browser extension." e.g. https://github.com/mozilla/webextension-polyfill/issues/218 if (!chrome.runtime.id) chrome.runtime.id = "history-delete"; From c36c622889f319946b123e963d9e6ac2632274cf Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sun, 8 Jan 2023 14:14:52 +0100 Subject: [PATCH 020/123] feat(lnc): fix signmessage --- src/extension/background-script/connectors/lnc.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index 3c70f68fa3..badd1c4e8c 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -351,10 +351,8 @@ class Lnc implements Connector { if (!this.lnc.isConnected) { return Promise.reject(new Error("Account is still loading")); } - // use v2 to use the key locator (key_loc) - // return this.request("POST", "/v2/signer/signmessage", { return this.lnc.lnd.lightning - .SignMessage({ msg: args.message }) + .SignMessage({ msg: Base64.stringify(UTF8.parse(args.message)) }) .then((data: FixMe) => { return { data: { From 5213ecb386097bc5e18b13adadcdf0f3f01c0601 Mon Sep 17 00:00:00 2001 From: Moritz Kaminski Date: Mon, 9 Jan 2023 21:55:48 +0100 Subject: [PATCH 021/123] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 95fa75ac3c..9e7e176887 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ Alby is open-source and currently in alpha stage. Our goal is to create the best We have a channel on the [bitcoin.design](https://bitcoin.design/) Slack community [#lightning-browser-extension](https://bitcoindesign.slack.com/archives/C02591ADXM2) and a [Telegram group](https://t.me/getAlby). Come and join us! -We also do a bi-weekly call on Thursday at [13:00 UTC](https://everytimezone.com/s/436cf0d2) on [Jitsi](https://meet.fulmo.org/AlbyCommunityCall) +We also do a bi-weekly call on Thursday at [15:00 UTC](https://everytimezone.com/s/436cf0d2) on [Jitsi](https://meet.fulmo.org/AlbyCommunityCall) ## Browser Support From 4d1e2c7bc23f6d47e5d6c710888f4cab6c8dbb2b Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 9 Jan 2023 23:10:12 +0100 Subject: [PATCH 022/123] v1.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1dc02d148..1780edb0f1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lightning-browser-extension", - "version": "1.22.1", + "version": "1.23.0", "description": "Lightning browser extension", "private": true, "repository": "https://github.com/bumi/lightning-browser-extension.git", From 2fcfc9f11906bb1b7484343353cda0fc56e2e57a Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Tue, 10 Jan 2023 19:25:50 +0530 Subject: [PATCH 023/123] chore(i18n): nostr permissions --- src/app/screens/Nostr/Confirm.tsx | 2 +- src/app/screens/Nostr/ConfirmGetPublicKey.tsx | 6 ++++-- src/app/screens/Nostr/ConfirmSignMessage.tsx | 2 +- src/i18n/locales/en/translation.json | 12 +++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/app/screens/Nostr/Confirm.tsx b/src/app/screens/Nostr/Confirm.tsx index d1d61e5d38..a0aef09c9b 100644 --- a/src/app/screens/Nostr/Confirm.tsx +++ b/src/app/screens/Nostr/Confirm.tsx @@ -91,7 +91,7 @@ function NostrConfirm() { htmlFor="remember_permission" className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white" > - {t("confirm_sign_message.remember.label")} + {t("permissions.remember.label")}
diff --git a/src/app/screens/Nostr/ConfirmGetPublicKey.tsx b/src/app/screens/Nostr/ConfirmGetPublicKey.tsx index 75a2531e2d..e3d09d8427 100644 --- a/src/app/screens/Nostr/ConfirmGetPublicKey.tsx +++ b/src/app/screens/Nostr/ConfirmGetPublicKey.tsx @@ -66,7 +66,9 @@ function NostrConfirmGetPublicKey() {

{t("allow")}

-

{t("read_public_key")}

+

+ {t("permissions.read_public_key")} +

@@ -85,7 +87,7 @@ function NostrConfirmGetPublicKey() { htmlFor="remember_permission" className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white" > - {t("confirm_sign_message.remember.label")} + {t("permissions.remember.label")} diff --git a/src/app/screens/Nostr/ConfirmSignMessage.tsx b/src/app/screens/Nostr/ConfirmSignMessage.tsx index 20cec6c4ae..8ecf745350 100644 --- a/src/app/screens/Nostr/ConfirmSignMessage.tsx +++ b/src/app/screens/Nostr/ConfirmSignMessage.tsx @@ -94,7 +94,7 @@ function ConfirmSignMessage() { htmlFor="remember_permission" className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white" > - {t("confirm_sign_message.remember.label")} + {t("permissions.remember.label")} diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 528ac6e300..c8c3d1374d 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -642,18 +642,16 @@ "title": "Nostr", "allow": "Allow this website to:", "content": "This website asks you to sign:", - "read_public_key": "Read your public key", "block_and_ignore": "Block and ignore {{host}}", "block_added": "Added {{host}} to the blocklist, please reload the website.", - "confirm_sign_message": { - "remember": { - "label": "Remember my choice and don't ask again" - } - }, "permissions": { "decrypt": "Decrypt data", "encrypt": "Encrypt data", - "allow_sign": "Allow {{host}} to sign:" + "allow_sign": "Allow {{host}} to sign:", + "read_public_key": "Read your public key", + "remember": { + "label": "Remember my choice and don't ask again" + } } } }, From 57fee78ded2761681fa8f11589a75bc6ea677f9a Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Tue, 10 Jan 2023 19:52:21 +0530 Subject: [PATCH 024/123] chore: add connector name to permission method --- src/extension/background-script/actions/ln/request.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/extension/background-script/actions/ln/request.ts b/src/extension/background-script/actions/ln/request.ts index cc03f7853c..9706b1907f 100644 --- a/src/extension/background-script/actions/ln/request.ts +++ b/src/extension/background-script/actions/ln/request.ts @@ -35,13 +35,15 @@ const request = async ( return { error: "Could not find an allowance for this host" }; } + const connectorName = connector.constructor.name.toLowerCase(); // prefix method with webln to prevent potential naming conflicts (e.g. with nostr calls that also use the permissions) - const weblnMethod = `${WEBLN_PREFIX}${method}`; + const legacyWeblnMethod = `${WEBLN_PREFIX}${method}`; + const weblnMethod = `${WEBLN_PREFIX}${connectorName}/${method}`; const permission = await db.permissions .where("host") .equalsIgnoreCase(origin.host) - .and((p) => p.method === weblnMethod) + .and((p) => p.method === legacyWeblnMethod || p.method === weblnMethod) .first(); // request method is allowed to be called @@ -56,7 +58,7 @@ const request = async ( args: { requestPermission: { method, - description: `${connector.constructor.name.toLowerCase()}.${method}`, + description: `${connectorName}.${method}`, }, }, origin, From b384c6e0291ed2c88123f90dc9ebb76e2546625f Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Tue, 10 Jan 2023 19:55:52 +0530 Subject: [PATCH 025/123] feat: add subtitles for permissions --- src/app/components/AllowanceMenu/index.tsx | 15 +++++++++++++-- src/i18n/locales/en/translation.json | 6 ++++++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/app/components/AllowanceMenu/index.tsx b/src/app/components/AllowanceMenu/index.tsx index 7815816a34..b46dd66963 100644 --- a/src/app/components/AllowanceMenu/index.tsx +++ b/src/app/components/AllowanceMenu/index.tsx @@ -2,8 +2,8 @@ import { GearIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; import Setting from "@components/Setting"; import Toggle from "@components/form/Toggle"; -import { useState, useEffect } from "react"; import type { FormEvent } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import Modal from "react-modal"; import { toast } from "react-toastify"; @@ -42,6 +42,7 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { const { t } = useTranslation("components", { keyPrefix: "allowance_menu" }); const { t: tCommon } = useTranslation("common"); + const { t: tPermissions } = useTranslation("permissions"); const hasPermissions = !isLoadingPermissions && !!permissions?.length; @@ -239,7 +240,17 @@ function AllowanceMenu({ allowance, onEdit, onDelete }: Props) { <> lnd.getinfo + nostr/nip04decrypt --> nostr.nip04decrypt */ > Date: Wed, 11 Jan 2023 00:51:45 +0100 Subject: [PATCH 026/123] fix: balance card after test connection --- src/app/components/Card/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/app/components/Card/index.tsx b/src/app/components/Card/index.tsx index 5f1eeb7436..fdc8e2d096 100644 --- a/src/app/components/Card/index.tsx +++ b/src/app/components/Card/index.tsx @@ -14,14 +14,16 @@ export default function Card({ currency, }: Props) { return ( -
+

{alias}

{satoshis}

-

- {fiat} {currency} -

+ {fiat && currency && ( +

+ {fiat} {currency} +

+ )}
); } From 5ae13bf57f94c4036d59ad9caea041b2aea4b080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 11 Jan 2023 00:54:19 +0100 Subject: [PATCH 027/123] fix: shadow usage on publisher card --- src/app/components/PublisherCard/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/PublisherCard/index.tsx b/src/app/components/PublisherCard/index.tsx index 7c1b387ac0..166691a031 100644 --- a/src/app/components/PublisherCard/index.tsx +++ b/src/app/components/PublisherCard/index.tsx @@ -38,7 +38,7 @@ export default function PublisherCard({ > {image && ( Date: Wed, 11 Jan 2023 01:01:29 +0100 Subject: [PATCH 028/123] fix: connector form spacing --- src/app/components/ConnectorForm/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/ConnectorForm/index.tsx b/src/app/components/ConnectorForm/index.tsx index efeab321d4..985832b21d 100644 --- a/src/app/components/ConnectorForm/index.tsx +++ b/src/app/components/ConnectorForm/index.tsx @@ -31,15 +31,15 @@ function ConnectorForm({ return (
-
+
{typeof title === "string" ? ( -

{title}

+

{title}

) : ( title )} {description && ( -
+
{typeof description === "string" ? (

{description}

) : ( From 9f6a7996243bcc3525d463ca7cc438fcc74f2932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 11 Jan 2023 01:04:36 +0100 Subject: [PATCH 029/123] fix: decrease spacing on connector selection --- src/app/components/LinkButton/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/LinkButton/index.tsx b/src/app/components/LinkButton/index.tsx index eeea65f5ca..1dc85ede79 100644 --- a/src/app/components/LinkButton/index.tsx +++ b/src/app/components/LinkButton/index.tsx @@ -9,8 +9,8 @@ type Props = { export default function LinkButton({ to, title, logo }: Props) { return ( -
-
+
+
logo
From 771c87d72e9b14b94c2b19cb562fb8672e39aba9 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 11 Jan 2023 09:58:19 +0000 Subject: [PATCH 030/123] Update @types/chrome to version 0.0.208 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1780edb0f1..bb481fbaad 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@types/chrome": "^0.0.206", + "@types/chrome": "^0.0.208", "@types/crypto-js": "^4.1.1", "@types/elliptic": "^6.4.14", "@types/lodash.merge": "^4.6.7", diff --git a/yarn.lock b/yarn.lock index 47a9cca5be..1d891de493 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1288,10 +1288,10 @@ dependencies: "@types/node" "*" -"@types/chrome@^0.0.206": - version "0.0.206" - resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.206.tgz#ad1fd9799f368b5993d7c240492d4adaf5efbd8c" - integrity sha512-fQnTFjghPB9S4UzbfublUB6KmsBkvvJeGXGaaoD5Qu+ZxrDUfgJnKN5egLSzDcGAH5YxQubDgbCdNwwUGewQHg== +"@types/chrome@^0.0.208": + version "0.0.208" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.208.tgz#c52992e46723c783d3fd84a8b90dd8b3e87af67f" + integrity sha512-VDU/JnXkF5qaI7WBz14Azpa2VseZTgML0ia/g/B1sr9OfdOnHiH/zZ7P7qCDqxSlkqJh76/bPc8jLFcx8rHJmw== dependencies: "@types/filesystem" "*" "@types/har-format" "*" From 201d780141b52c4bcce619a20e0c6346a1f8da1e Mon Sep 17 00:00:00 2001 From: Leonardo Date: Tue, 10 Jan 2023 16:18:22 +0000 Subject: [PATCH 031/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 86.5% (399 of 461 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 98 ++++++++++++++++++++++--- 1 file changed, 87 insertions(+), 11 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 3aae9cd8cc..e573bc40cb 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -4,7 +4,7 @@ "nav": { "welcome": "Bem-vindo", "password": "Senha", - "connect": "Sua conta", + "connect": "Sua Conta", "done": "Feito" }, "intro": { @@ -58,7 +58,7 @@ } }, "choose_connector": { - "description": "Você precisa primeiro conectar-se a uma conta ou servidor para poder interagir com seus sites favoritos que aceitam pagamentos em bitcoin!", + "description": "Conecte-se a uma carteira ou servidor disponíveis abaixo", "lnd": { "title": "LND", "page": { @@ -138,7 +138,7 @@ "title": "myNode", "page": { "title": "Conecte na <0>myNode", - "instructions": "No myNode clique em <0>Wallet botão para seu serviço <0>Lightning.<1/> Agora clique em <0>Pair Wallet botão abaixo da tab <0>Status. Insira sua senha quando solicitada.<1/> Selecione o menu suspenso e escolha uma opção de emparelhamento. Dependendo da sua configuração você pode escolher <0>Conexão Lightning (REST + Local IP) ou conexão <0>Lightning (REST + Tor)." + "instructions": "No myNode clique em <0>Wallet botão para seu serviço <0>lightning.<1/> Agora clique em <0>Pair Wallet botão abaixo da tab <0>Status. Insira sua senha quando solicitada.<1/> Selecione o menu suspenso e escolha uma opção de emparelhamento. Dependendo da sua configuração você pode escolher <0>Conexão lightning (REST + Local IP) ou conexão <0>lightning (REST + Tor)." }, "rest_url": { "label": "lndconnect REST URL", @@ -149,7 +149,7 @@ "title": "Start9", "page": { "title": "Conecte no seu servidor <0>Embassy", - "instructions": "<0>Note: Atualmente somente a LND é suportada mas nós adicionaremos suporte para a c-lightning no futuro!<1/>No seu Embassy clique em service <0>Lightning Network Daemon.<1/>Selecione a tab <0>Properties.<1/>Agora copie o <0>LND Connect REST URL." + "instructions": "<0>Note: Atualmente somente a LND é suportada mas nós adicionaremos suporte para a c-lightning no futuro!<1/>No seu Embassy clique em service <0>lightning network Daemon.<1/>Selecione a tab <0>Properties.<1/>Agora copie o <0>LND Connect REST URL." }, "rest_url": { "label": "lndconnect REST URL", @@ -246,7 +246,7 @@ "commando": { "page": { "title": "Conecte no servidor Core Lightning", - "instructions": "Certifique-se de conectar em um servidor Core Lightning que esteja na versão 0.12.0 ou mais recente, o plugin commando instalado e rodando e o servidor acessível na Rede Relâmpago. Crie um rune executando o comando 'lightning-cli commando-rune'." + "instructions": "Certifique-se de conectar em um servidor Core Lightning que esteja na versão 0.12.0 ou mais recente, o plugin commando instalado e rodando e o servidor acessível na rede relâmpago. Crie um rune executando o comando 'lightning-cli commando-rune'." }, "title": "Core Lightning", "pubkey": { @@ -274,7 +274,8 @@ "errors": { "connection_failed": "Falha na conexão. O servidor Core Lightning está online e usando o plugin comando?" } - } + }, + "title": "Conectar Carteira Bitcoin" }, "home": { "actions": { @@ -396,7 +397,7 @@ }, "exchange": { "title": "Serviço provedor de cotações", - "subtitle": "Escolha o serviço que fornecerá as cotações do Bitcoin exibidas na Alby" + "subtitle": "Escolha o serviço que fornecerá as cotações do bitcoin exibidas na Alby" }, "personal_data": { "title": "Dados pessoais", @@ -439,7 +440,7 @@ "nostr": { "title": "Nostr", "private_key": { - "subtitle": "Ao gerar uma chave, ela será criada a partir da conta atual que você usa. Certifique-se de fazer backup desta chave privada. <0>Saiba mais »", + "subtitle": "Cole ou gere uma nova chave privada. Ao gerar uma chave, ela será criada a partir da conta atual que você usa. Certifique-se de fazer backup desta chave privada. <0>Saiba mais »", "warning": "Isso excluirá sua chave privada antiga. Tem certeza de que deseja prosseguir?", "title": "Chave privada", "generate": "Gerar", @@ -498,7 +499,11 @@ "title": "Limite de gastos", "used_budget": "sats usados" } - } + }, + "title": "Sua lista de sites ⚡️", + "description": "Sites onde você já usou a Alby", + "no_info": "Nenhum site ainda.", + "discover": "Descubra Sites" }, "make_invoice": { "title": "Gerar Fatura", @@ -591,6 +596,75 @@ "title": "Aprovar Solicitação", "allow": "Permitir este site executar:", "always_allow": "Lembrar minha escolha e não perguntar novamente" + }, + "discover": { + "title": "Explore o ecossistema ⚡️", + "description": "Sites onde você já usou a Alby", + "list": { + "trading": "Negociação", + "gaming": "Jogos", + "entertaiment": "Entretenimento", + "shopping": "Compras" + } + }, + "choose_path": { + "alby": { + "description": "Crie uma conta ou realize o login na sua conta atual da Alby.", + "create_new": "Criar nova conta", + "title": "Alby" + }, + "other": { + "title": "Outras carteiras", + "and_more": "& mais...", + "description": "Conecte-se em sua carteira bitcoin ou escolha um dos vários servidores de carteira suportados.", + "connect": "Conectar" + }, + "description": "Você pode usar Alby, criando uma conta conosco ou conectando-se à sua própria carteira bitcoin.", + "title": "Como você deseja usar a Alby?" + }, + "alby": { + "pre_connect": { + "title": "Sua conta Alby", + "set_password": { + "errors": { + "enter_password": "Insira uma senha.", + "confirm_password": "Confirme sua senha.", + "mismatched_password": "As senhas não correspondem." + }, + "confirm_password": { + "label": "Confirmar Senha" + }, + "choose_password": { + "label": "Senha" + } + }, + "login_account": "Acessar sua conta atual da Alby.", + "host_wallet": "A custódia dos seus bitcoins é por nossa conta!", + "create_account": "Crie uma nova conta Alby para enviar e receber pagamentos em bitcoin.", + "email": { + "create": { + "label": "Endereço de E-mail" + }, + "login": { + "label": "Endereço de E-mail ou Endereço Relâmpago" + } + }, + "forgot_password": "Esqueceu sua senha?", + "optional_lightning_note": { + "part4": "saiba mais", + "part3": ". É o jeito mais simples para você receber Bitcoins na Rede Relâmpago.", + "part2": "endereço relâmpago", + "part1": "Ao criar uma conta Alby, você pode escolher um" + }, + "optional_lightning_address": { + "title": "números e letras, pelo menos 3 caracteres", + "suffix": "@getalby.com", + "label": "Escolha um Endereço Relâmpago (opcional)" + }, + "errors": { + "create_wallet_error": "Falha ao logar ou criar uma nova conta. Se precisar de ajuda, entre em contato com support@getalby.com" + } + } } }, "common": { @@ -624,7 +698,8 @@ "export": "Exportar", "remove": "Remover", "copy": "Copiar", - "back": "Voltar" + "back": "Voltar", + "log_in": "Logar" }, "errors": { "connection_failed": "Falha na conexão", @@ -637,7 +712,8 @@ "response": "Resposta", "success_message": "{{amount}}{{fiatAmount}} enviados para {{destination}}", "advanced": "Avançado", - "discover": "Explorar" + "discover": "Explorar", + "confirm_password": "Confirmar Senha" }, "components": { "allowance_menu": { From baef93f3fe6bf47a84ecbac9ae9d240bba02c1e0 Mon Sep 17 00:00:00 2001 From: Maicol Stracci Date: Tue, 10 Jan 2023 21:56:46 +0000 Subject: [PATCH 032/123] Translated using Weblate (Italian) Currently translated at 75.0% (346 of 461 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/it/ --- src/i18n/locales/it/translation.json | 55 +++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index 6db66e0f03..82799219c1 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -4,7 +4,7 @@ "nav": { "welcome": "Benvenuto", "password": "La tua Password", - "connect": "Il tuo account Lightning", + "connect": "Il tuo Account Lightning", "done": "Fatto" }, "intro": { @@ -30,7 +30,7 @@ }, "set_password": { "title": "Imposta una password di sblocco", - "description": "I dati del tuo account Lightning sono crittografati in modo sicuro con una password di sblocco. Non dimenticare questa password! Ti serve per sbloccare l'estensione Alby (in questo browser)", + "description": "I dati del tuo account lightning sono crittografati in modo sicuro con una password di sblocco. Non dimenticare questa password! Ti serve per sbloccare l'estensione Alby (in questo browser)", "choose_password": { "label": "Scegli una password di sblocco:" }, @@ -542,6 +542,57 @@ "allow": "Consenti a {{host}} di:", "read_public_key": "Leggere la propria chiave pubblica", "block_and_ignore": "Blocca e ignora {{host}}" + }, + "alby": { + "pre_connect": { + "create_account": "Crea un nuovo account Alby per inviare e ricevere pagamenti bitcoin.", + "login_account": "Accedi per connettere il tuo account Alby esistente.", + "optional_lightning_note": { + "part4": "Scopri di più", + "part3": ". Si tratta di un semplice modo per fare in modo che chiunque possa inviarti bitcoin sulla rete lightning.", + "part1": "Il tuo account Alby include anche un optional", + "part2": "Indirizzo Lightning" + }, + "forgot_password": "Hai dimenticato la password?", + "title": "Il tuo account Alby", + "host_wallet": "Ospitiamo un portafoglio Lightning per te!", + "email": { + "create": { + "label": "Indirizzo email" + }, + "login": { + "label": "Indirizzo email o indirizzo Lightning" + } + }, + "set_password": { + "choose_password": { + "label": "Password" + }, + "confirm_password": { + "label": "Conferma password" + }, + "errors": { + "enter_password": "Inserisci una password.", + "confirm_password": "Si prega di confermare la password.", + "mismatched_password": "Le password non corrispondono." + } + } + } + }, + "choose_path": { + "title": "Connettiti", + "description": "Per iniziare a utilizzare Alby per effettuare pagamenti online, collega il tuo portafoglio lightning all'estensione.", + "alby": { + "title": "Alby", + "description": "Registrati o utilizza il tuo account Alby per iniziare a pagare attraverso lightning in pochissimo tempo.", + "create_new": "Iscriviti" + }, + "other": { + "title": "Altri portafogli", + "description": "Collegati al tuo portafoglio o nodo Lightning e scegli tra vari connettori.", + "and_more": "& altro...", + "connect": "Connettiti" + } } }, "common": { From ca2a1b62295da6cafd073c2e608532a04d901530 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:51:50 +0100 Subject: [PATCH 033/123] fix: cutoff text on publisher card (#1966) --- src/app/components/PublisherCard/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/PublisherCard/index.tsx b/src/app/components/PublisherCard/index.tsx index 7c1b387ac0..98ddcd14e6 100644 --- a/src/app/components/PublisherCard/index.tsx +++ b/src/app/components/PublisherCard/index.tsx @@ -60,7 +60,7 @@ export default function PublisherCard({

@@ -71,7 +71,7 @@ export default function PublisherCard({ href={`https://${url}`} title={url} target="_blank" - className="text-gray-500 dark:text-gray-400 overflow-hidden mb-2 text-ellipsis whitespace-nowrap" + className="text-gray-500 dark:text-gray-400 overflow-hidden mb-2 text-ellipsis whitespace-nowrap leading-1" rel="noreferrer noopener" > {url} From ccaab19a7e9a61524c7e0d0783dcb01a935164fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:52:34 +0100 Subject: [PATCH 034/123] fix: remove balance card (#1961) --- src/app/components/BalanceCard/index.test.tsx | 25 ---------------- src/app/components/BalanceCard/index.tsx | 29 ------------------- 2 files changed, 54 deletions(-) delete mode 100644 src/app/components/BalanceCard/index.test.tsx delete mode 100644 src/app/components/BalanceCard/index.tsx diff --git a/src/app/components/BalanceCard/index.test.tsx b/src/app/components/BalanceCard/index.test.tsx deleted file mode 100644 index 43775d6494..0000000000 --- a/src/app/components/BalanceCard/index.test.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import { MemoryRouter } from "react-router-dom"; - -import type { Props } from "./index"; -import BalanceCard from "./index"; - -const props: Props = { - alias: "100", - crypto: "200", - fiat: "300", -}; - -describe("ConfirmPayment", () => { - test("render", async () => { - render( - - - - ); - - expect(screen.getByText("100")).toBeInTheDocument(); - expect(screen.getByText("200")).toBeInTheDocument(); - expect(screen.getByText("300")).toBeInTheDocument(); - }); -}); diff --git a/src/app/components/BalanceCard/index.tsx b/src/app/components/BalanceCard/index.tsx deleted file mode 100644 index eb2f736aac..0000000000 --- a/src/app/components/BalanceCard/index.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import Skeleton from "react-loading-skeleton"; - -export type Props = { - alias: string; - crypto: string; - fiat: string; -}; - -const skeletonStyle = { - opacity: 0.5, -}; - -function BalanceCard({ alias, crypto, fiat }: Props) { - return ( -
-

- {alias || } -

-

- {crypto || } -

-

- {fiat || } -

-
- ); -} - -export default BalanceCard; From b25e5b61b1d62437548afb7a3f7100c0d0503ec1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:53:10 +0100 Subject: [PATCH 035/123] fix: improve discover ui (#1958) * fix: improve discover ui * fix: switch to 2 columns on sm --- src/app/screens/Discover/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/screens/Discover/index.tsx b/src/app/screens/Discover/index.tsx index 0be68e0178..c383f95480 100644 --- a/src/app/screens/Discover/index.tsx +++ b/src/app/screens/Discover/index.tsx @@ -20,20 +20,20 @@ function Discover() {
{websites.map(({ title, items }) => ( -
-

+
+

{t(`list.${title as "trading"}`)}

-
+
{items.map(({ title, subtitle, logo, url }) => ( -
+
image
From 013a8c943d2655183d9ed38241e838d385170b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Fri, 13 Jan 2023 23:54:05 +0100 Subject: [PATCH 036/123] fix: publishers ui (#1959) --- src/app/components/PublishersTable/index.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/components/PublishersTable/index.tsx b/src/app/components/PublishersTable/index.tsx index df72462eed..25852a1046 100644 --- a/src/app/components/PublishersTable/index.tsx +++ b/src/app/components/PublishersTable/index.tsx @@ -38,7 +38,7 @@ export default function PublishersTable({
{publisher.host} { @@ -66,11 +66,14 @@ export default function PublishersTable({
{publisher.host} • {publisher.paymentsCount}{" "} - {tComponents("payments")}{" "} + {tComponents("payments")} {publisher.paymentsAmount > 0 && ( - - {getFormattedSats(publisher.paymentsAmount)} - + <> + {" • "} + + {getFormattedSats(publisher.paymentsAmount)} + + )}
From 436cd2509729d37ef72ec55664a9423147a40d41 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 14 Jan 2023 07:11:09 +0000 Subject: [PATCH 037/123] Update react-i18next to version 12.1.4 --- package.json | 2 +- yarn.lock | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index bb481fbaad..01da59c037 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "react": "^18.2.0", "react-confetti": "^6.1.0", "react-dom": "^18.2.0", - "react-i18next": "^12.1.1", + "react-i18next": "^12.1.4", "react-loading-skeleton": "^3.1.0", "react-modal": "^3.16.1", "react-qr-code": "^2.0.8", diff --git a/yarn.lock b/yarn.lock index 1d891de493..4e2bb5469d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -318,13 +318,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.14.5", "@babel/runtime@^7.9.2": - version "7.17.9" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" - integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/runtime@^7.19.4": version "7.20.1" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9" @@ -339,6 +332,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.9.2": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" + integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.16.7", "@babel/template@^7.18.6", "@babel/template@^7.3.3": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" @@ -7911,12 +7911,12 @@ react-dom@^18.2.0: loose-envify "^1.1.0" scheduler "^0.23.0" -react-i18next@^12.1.1: - version "12.1.1" - resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-12.1.1.tgz#2626cdbfe6bcb76ef833861c0184a5c4e5e3c089" - integrity sha512-mFdieOI0LDy84q3JuZU6Aou1DoWW2fhapcTGeBS8+vWSJuViuoCLQAMYSb0QoHhXS8B0WKUOPpx4cffAP7r/aA== +react-i18next@^12.1.4: + version "12.1.4" + resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-12.1.4.tgz#be0a60d3a45acc4321909f8a4b8cde16518a2926" + integrity sha512-XQND7jYtgM7ht5PH3yIZljCRpAMTlH/zmngM9ZjToqa+0BR6xuu8c7QF0WIIOEjcMTB2S3iOfpN/xG/ZrAnO6g== dependencies: - "@babel/runtime" "^7.14.5" + "@babel/runtime" "^7.20.6" html-parse-stringify "^3.0.1" react-is@^16.13.1, react-is@^16.8.1: From 7b6441248f8e110001666939773a56f4fab95b13 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 14 Jan 2023 13:11:02 +0000 Subject: [PATCH 038/123] Update all development Yarn dependencies (2023-01-14) --- package.json | 16 +-- yarn.lock | 365 +++++++++++++++++++++++++-------------------------- 2 files changed, 188 insertions(+), 193 deletions(-) diff --git a/package.json b/package.json index bb481fbaad..ba5991772d 100644 --- a/package.json +++ b/package.json @@ -70,8 +70,8 @@ "zustand": "^3.7.2" }, "devDependencies": { - "@commitlint/cli": "^17.3.0", - "@commitlint/config-conventional": "^17.3.0", + "@commitlint/cli": "^17.4.1", + "@commitlint/config-conventional": "^17.4.0", "@jest/types": "^29.3.1", "@playwright/test": "^1.29.1", "@swc/core": "^1.3.24", @@ -90,8 +90,8 @@ "@types/react-modal": "^3.13.1", "@types/uuid": "^9.0.0", "@types/webextension-polyfill": "^0.9.2", - "@typescript-eslint/eslint-plugin": "^5.45.1", - "@typescript-eslint/parser": "^5.45.1", + "@typescript-eslint/eslint-plugin": "^5.48.0", + "@typescript-eslint/parser": "^5.48.0", "autoprefixer": "^10.4.13", "buffer": "^6.0.3", "clean-webpack-plugin": "^4.0.0", @@ -101,22 +101,22 @@ "css-loader": "^6.7.3", "css-minimizer-webpack-plugin": "^4.2.2", "del-cli": "^5.0.0", - "eslint": "^8.30.0", - "eslint-config-prettier": "^8.5.0", + "eslint": "^8.31.0", + "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-react": "^7.31.11", "eslint-plugin-react-hooks": "^4.6.0", "fake-indexeddb": "^3.1.8", "filemanager-webpack-plugin": "^8.0.0", "html-webpack-plugin": "^5.5.0", - "husky": "^8.0.2", + "husky": "^8.0.3", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "jest-webextension-mock": "^3.8.7", "lint-staged": "^13.1.0", "mini-css-extract-plugin": "^2.7.2", "msw": "^0.49.2", - "postcss": "^8.4.20", + "postcss": "^8.4.21", "postcss-cli": "^10.1.0", "postcss-loader": "^7.0.2", "pptr-testing-library": "^0.7.0", diff --git a/yarn.lock b/yarn.lock index 1d891de493..e5e261f4d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -406,92 +406,92 @@ resolved "https://registry.yarnpkg.com/@bitcoin-design/bitcoin-icons-react/-/bitcoin-icons-react-0.1.9.tgz#25c18808f167e242cd15ba27c185d785f2728980" integrity sha512-nJvTD1+zG/ffHdMeGQ39vdsmEFo9WcCIP1RlR7ZpZoP2H+IgKwzwow8VSY6ebroLoCT7WWtUPJQSbgQwgWYrFg== -"@commitlint/cli@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.3.0.tgz#d8497f03e27a5161178e802168d77de2941959a0" - integrity sha512-/H0md7TsKflKzVPz226VfXzVafJFO1f9+r2KcFvmBu08V0T56lZU1s8WL7/xlxqLMqBTVaBf7Ixtc4bskdEEZg== - dependencies: - "@commitlint/format" "^17.0.0" - "@commitlint/lint" "^17.3.0" - "@commitlint/load" "^17.3.0" - "@commitlint/read" "^17.2.0" - "@commitlint/types" "^17.0.0" +"@commitlint/cli@^17.4.1": + version "17.4.1" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-17.4.1.tgz#71086653a42abafe5519c6c5f8ada35b17f1dc53" + integrity sha512-W8OJwz+izY+fVwyUt1HveCDmABMZNRVZHSVPw/Bh9Y62tp11SmmQaycgbsYLMiMy7JGn4mAJqEGlSHS9Uti9ZQ== + dependencies: + "@commitlint/format" "^17.4.0" + "@commitlint/lint" "^17.4.0" + "@commitlint/load" "^17.4.1" + "@commitlint/read" "^17.4.0" + "@commitlint/types" "^17.4.0" execa "^5.0.0" lodash.isfunction "^3.0.9" resolve-from "5.0.0" resolve-global "1.0.0" yargs "^17.0.0" -"@commitlint/config-conventional@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.3.0.tgz#77bcfabfed932bc80e97f31f2201ba05f504e145" - integrity sha512-hgI+fN5xF8nhS9uG/V06xyT0nlcyvHHMkq0kwRSr96vl5BFlRGaL2C0/YY4kQagfU087tmj01bJkG9Ek98Wllw== +"@commitlint/config-conventional@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.4.0.tgz#9188d793886d8a1c633834602f06a642dd16ed64" + integrity sha512-G4XBf45J4ZMspO4NwBFzY3g/1Kb+B42BcIxeikF8wucQxcyxcmhRdjeQpRpS1XEcBq5pdtEEQFipuB9IuiNFhw== dependencies: conventional-changelog-conventionalcommits "^5.0.0" -"@commitlint/config-validator@^17.1.0": - version "17.1.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.1.0.tgz#51d09ca53d7a0d19736abf34eb18a66efce0f97a" - integrity sha512-Q1rRRSU09ngrTgeTXHq6ePJs2KrI+axPTgkNYDWSJIuS1Op4w3J30vUfSXjwn5YEJHklK3fSqWNHmBhmTR7Vdg== +"@commitlint/config-validator@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-17.4.0.tgz#2cb229672a22476cf1f21bedbfcd788e5da5b54f" + integrity sha512-Sa/+8KNpDXz4zT4bVbz2fpFjvgkPO6u2V2fP4TKgt6FjmOw2z3eEX859vtfeaTav/ukBw0/0jr+5ZTZp9zCBhA== dependencies: - "@commitlint/types" "^17.0.0" + "@commitlint/types" "^17.4.0" ajv "^8.11.0" -"@commitlint/ensure@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-17.3.0.tgz#d7bb60291a254152b468ccb2be8c0dc79667247e" - integrity sha512-kWbrQHDoW5veIUQx30gXoLOCjWvwC6OOEofhPCLl5ytRPBDAQObMbxTha1Bt2aSyNE/IrJ0s0xkdZ1Gi3wJwQg== +"@commitlint/ensure@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-17.4.0.tgz#3de65768bfccb9956ec3a0ecd8a415421bf315e5" + integrity sha512-7oAxt25je0jeQ/E0O/M8L3ADb1Cvweu/5lc/kYF8g/kXatI0wxGE5La52onnAUAWeWlsuvBNar15WcrmDmr5Mw== dependencies: - "@commitlint/types" "^17.0.0" + "@commitlint/types" "^17.4.0" lodash.camelcase "^4.3.0" lodash.kebabcase "^4.1.1" lodash.snakecase "^4.1.1" lodash.startcase "^4.4.0" lodash.upperfirst "^4.3.1" -"@commitlint/execute-rule@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-17.0.0.tgz#186e9261fd36733922ae617497888c4bdb6e5c92" - integrity sha512-nVjL/w/zuqjCqSJm8UfpNaw66V9WzuJtQvEnCrK4jDw6qKTmZB+1JQ8m6BQVZbNBcwfYdDNKnhIhqI0Rk7lgpQ== +"@commitlint/execute-rule@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-17.4.0.tgz#4518e77958893d0a5835babe65bf87e2638f6939" + integrity sha512-LIgYXuCSO5Gvtc0t9bebAMSwd68ewzmqLypqI2Kke1rqOqqDbMpYcYfoPfFlv9eyLIh4jocHWwCK5FS7z9icUA== -"@commitlint/format@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-17.0.0.tgz#2c991ac0df3955fe5d7d4d733967bd17e6cfd9e0" - integrity sha512-MZzJv7rBp/r6ZQJDEodoZvdRM0vXu1PfQvMTNWFb8jFraxnISMTnPBWMMjr2G/puoMashwaNM//fl7j8gGV5lA== +"@commitlint/format@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-17.4.0.tgz#1c80cf3a6274ff9b3d3c0dd150a97882d557aa0f" + integrity sha512-Z2bWAU5+f1YZh9W76c84J8iLIWIvvm+mzqogTz0Nsc1x6EHW0Z2gI38g5HAjB0r0I3ZjR15IDEJKhsxyblcyhA== dependencies: - "@commitlint/types" "^17.0.0" + "@commitlint/types" "^17.4.0" chalk "^4.1.0" -"@commitlint/is-ignored@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.2.0.tgz#07c329396e2457fd37e8707f990c3a49731a168d" - integrity sha512-rgUPUQraHxoMLxiE8GK430HA7/R2vXyLcOT4fQooNrZq9ERutNrP6dw3gdKLkq22Nede3+gEHQYUzL4Wu75ndg== - dependencies: - "@commitlint/types" "^17.0.0" - semver "7.3.7" - -"@commitlint/lint@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.3.0.tgz#16506deaa347d61bd1195b17df1c6809a553d2a0" - integrity sha512-VilOTPg0i9A7CCWM49E9bl5jytfTvfTxf9iwbWAWNjxJ/A5mhPKbm3sHuAdwJ87tDk1k4j8vomYfH23iaY+1Rw== - dependencies: - "@commitlint/is-ignored" "^17.2.0" - "@commitlint/parse" "^17.2.0" - "@commitlint/rules" "^17.3.0" - "@commitlint/types" "^17.0.0" - -"@commitlint/load@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.3.0.tgz#ebfec0198dd1627627e32a2b2ae4744d297599a8" - integrity sha512-u/pV6rCAJrCUN+HylBHLzZ4qj1Ew3+eN9GBPhNi9otGxtOfA8b+8nJSxaNbcC23Ins/kcpjGf9zPSVW7628Umw== - dependencies: - "@commitlint/config-validator" "^17.1.0" - "@commitlint/execute-rule" "^17.0.0" - "@commitlint/resolve-extends" "^17.3.0" - "@commitlint/types" "^17.0.0" - "@types/node" "^14.0.0" +"@commitlint/is-ignored@^17.4.2": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-17.4.2.tgz#2d40a34e071c3e595e485fafe8460457a7b7af9d" + integrity sha512-1b2Y2qJ6n7bHG9K6h8S4lBGUl6kc7mMhJN9gy1SQfUZqe92ToDjUTtgNWb6LbzR1X8Cq4SEus4VU8Z/riEa94Q== + dependencies: + "@commitlint/types" "^17.4.0" + semver "7.3.8" + +"@commitlint/lint@^17.4.0": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-17.4.2.tgz#1277cb4d5395e9d6c39cbc351984bac9dcc6b7cd" + integrity sha512-HcymabrdBhsDMNzIv146+ZPNBPBK5gMNsVH+el2lCagnYgCi/4ixrHooeVyS64Fgce2K26+MC7OQ4vVH8wQWVw== + dependencies: + "@commitlint/is-ignored" "^17.4.2" + "@commitlint/parse" "^17.4.2" + "@commitlint/rules" "^17.4.2" + "@commitlint/types" "^17.4.0" + +"@commitlint/load@^17.4.1": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-17.4.2.tgz#551875c3e1dce6dc0375dc9c8ad551de8ba35de4" + integrity sha512-Si++F85rJ9t4hw6JcOw1i2h0fdpdFQt0YKwjuK4bk9KhFjyFkRxvR3SB2dPaMs+EwWlDrDBGL+ygip1QD6gmPw== + dependencies: + "@commitlint/config-validator" "^17.4.0" + "@commitlint/execute-rule" "^17.4.0" + "@commitlint/resolve-extends" "^17.4.0" + "@commitlint/types" "^17.4.0" + "@types/node" "*" chalk "^4.1.0" - cosmiconfig "^7.0.0" + cosmiconfig "^8.0.0" cosmiconfig-typescript-loader "^4.0.0" lodash.isplainobject "^4.0.6" lodash.merge "^4.6.2" @@ -500,70 +500,70 @@ ts-node "^10.8.1" typescript "^4.6.4" -"@commitlint/message@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-17.2.0.tgz#c546b7a441b9f69493257f9fe0c3c8fc37933b27" - integrity sha512-/4l2KFKxBOuoEn1YAuuNNlAU05Zt7sNsC9H0mPdPm3chOrT4rcX0pOqrQcLtdMrMkJz0gC7b3SF80q2+LtdL9Q== +"@commitlint/message@^17.4.2": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-17.4.2.tgz#f4753a79701ad6db6db21f69076e34de6580e22c" + integrity sha512-3XMNbzB+3bhKA1hSAWPCQA3lNxR4zaeQAQcHj0Hx5sVdO6ryXtgUBGGv+1ZCLMgAPRixuc6en+iNAzZ4NzAa8Q== -"@commitlint/parse@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-17.2.0.tgz#d87b09436ec741c2267b76a41972b34e53459a81" - integrity sha512-vLzLznK9Y21zQ6F9hf8D6kcIJRb2haAK5T/Vt1uW2CbHYOIfNsR/hJs0XnF/J9ctM20Tfsqv4zBitbYvVw7F6Q== +"@commitlint/parse@^17.4.2": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-17.4.2.tgz#b0f8a257a1f93387a497408b0b4cadba60ee3359" + integrity sha512-DK4EwqhxfXpyCA+UH8TBRIAXAfmmX4q9QRBz/2h9F9sI91yt6mltTrL6TKURMcjUVmgaB80wgS9QybNIyVBIJA== dependencies: - "@commitlint/types" "^17.0.0" + "@commitlint/types" "^17.4.0" conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.2.2" -"@commitlint/read@^17.2.0": - version "17.2.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-17.2.0.tgz#7a67b7b611d978a344c2430cba030252c2170723" - integrity sha512-bbblBhrHkjxra3ptJNm0abxu7yeAaxumQ8ZtD6GIVqzURCETCP7Dm0tlVvGRDyXBuqX6lIJxh3W7oyKqllDsHQ== +"@commitlint/read@^17.4.0": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-17.4.2.tgz#4880a05271fb44cefa54d365a17d5753496a6de0" + integrity sha512-hasYOdbhEg+W4hi0InmXHxtD/1favB4WdwyFxs1eOy/DvMw6+2IZBmATgGOlqhahsypk4kChhxjAFJAZ2F+JBg== dependencies: - "@commitlint/top-level" "^17.0.0" - "@commitlint/types" "^17.0.0" - fs-extra "^10.0.0" + "@commitlint/top-level" "^17.4.0" + "@commitlint/types" "^17.4.0" + fs-extra "^11.0.0" git-raw-commits "^2.0.0" minimist "^1.2.6" -"@commitlint/resolve-extends@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.3.0.tgz#413a9ec393266d0673e6b9ec2f0974c358ed662d" - integrity sha512-Lf3JufJlc5yVEtJWC8o4IAZaB8FQAUaVlhlAHRACd0TTFizV2Lk2VH70et23KgvbQNf7kQzHs/2B4QZalBv6Cg== +"@commitlint/resolve-extends@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-17.4.0.tgz#9023da6c70c4ebd173b4b0995fe29f27051da2d3" + integrity sha512-3JsmwkrCzoK8sO22AzLBvNEvC1Pmdn/65RKXzEtQMy6oYMl0Snrq97a5bQQEFETF0VsvbtUuKttLqqgn99OXRQ== dependencies: - "@commitlint/config-validator" "^17.1.0" - "@commitlint/types" "^17.0.0" + "@commitlint/config-validator" "^17.4.0" + "@commitlint/types" "^17.4.0" import-fresh "^3.0.0" lodash.mergewith "^4.6.2" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^17.3.0": - version "17.3.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-17.3.0.tgz#4b31d6739f7eb8c7222b323b0bc2b63bd298a4ad" - integrity sha512-s2UhDjC5yP2utx3WWqsnZRzjgzAX8BMwr1nltC0u0p8T/nzpkx4TojEfhlsOUj1t7efxzZRjUAV0NxNwdJyk+g== +"@commitlint/rules@^17.4.2": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-17.4.2.tgz#cdf203bc82af979cb319210ef9215cb1de216a9b" + integrity sha512-OGrPsMb9Fx3/bZ64/EzJehY9YDSGWzp81Pj+zJiY+r/NSgJI3nUYdlS37jykNIugzazdEXfMtQ10kmA+Kx2pZQ== dependencies: - "@commitlint/ensure" "^17.3.0" - "@commitlint/message" "^17.2.0" - "@commitlint/to-lines" "^17.0.0" - "@commitlint/types" "^17.0.0" + "@commitlint/ensure" "^17.4.0" + "@commitlint/message" "^17.4.2" + "@commitlint/to-lines" "^17.4.0" + "@commitlint/types" "^17.4.0" execa "^5.0.0" -"@commitlint/to-lines@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-17.0.0.tgz#5766895836b8085b099a098482f88a03f070b411" - integrity sha512-nEi4YEz04Rf2upFbpnEorG8iymyH7o9jYIVFBG1QdzebbIFET3ir+8kQvCZuBE5pKCtViE4XBUsRZz139uFrRQ== +"@commitlint/to-lines@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-17.4.0.tgz#9bd02e911e7d4eab3fb4a50376c4c6d331e10d8d" + integrity sha512-LcIy/6ZZolsfwDUWfN1mJ+co09soSuNASfKEU5sCmgFCvX5iHwRYLiIuoqXzOVDYOy7E7IcHilr/KS0e5T+0Hg== -"@commitlint/top-level@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-17.0.0.tgz#ebd0df4c703c026c2fbdc20fa746836334f4ed15" - integrity sha512-dZrEP1PBJvodNWYPOYiLWf6XZergdksKQaT6i1KSROLdjf5Ai0brLOv5/P+CPxBeoj3vBxK4Ax8H1Pg9t7sHIQ== +"@commitlint/top-level@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-17.4.0.tgz#540cac8290044cf846fbdd99f5cc51e8ac5f27d6" + integrity sha512-/1loE/g+dTTQgHnjoCy0AexKAEFyHsR2zRB4NWrZ6lZSMIxAhBJnmCqwao7b4H8888PsfoTBCLBYIw8vGnej8g== dependencies: find-up "^5.0.0" -"@commitlint/types@^17.0.0": - version "17.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-17.0.0.tgz#3b4604c1a0f06c340ce976e6c6903d4f56e3e690" - integrity sha512-hBAw6U+SkAT5h47zDMeOu3HSiD0SODw4Aq7rRNh1ceUmL7GyLKYhPbUvlRWqZ65XjBLPHZhFyQlRaPNz8qvUyQ== +"@commitlint/types@^17.4.0": + version "17.4.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-17.4.0.tgz#c7c2b97b959f6175c164632bf26208ce417b3f31" + integrity sha512-2NjAnq5IcxY9kXtUeO2Ac0aPpvkuOmwbH/BxIm36XXK5LtWFObWJWjXOA+kcaABMrthjWu6la+FUpyYFMHRvbA== dependencies: chalk "^4.1.0" @@ -579,7 +579,7 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz#90420f9f9c6d3987f176a19a7d8e764271a2f55d" integrity sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g== -"@eslint/eslintrc@^1.4.0": +"@eslint/eslintrc@^1.4.1": version "1.4.1" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.4.1.tgz#af58772019a2d271b7e2d4c23ff4ddcba3ccfb3e" integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== @@ -1529,11 +1529,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.6.tgz#0ba49ac517ad69abe7a1508bc9b3a5483df9d5d7" integrity sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw== -"@types/node@^14.0.0": - version "14.18.26" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.26.tgz#239e19f8b4ea1a9eb710528061c1d733dc561996" - integrity sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -1710,14 +1705,14 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.45.1.tgz#ee5b51405f6c9ee7e60e4006d68c69450d3b4536" - integrity sha512-cOizjPlKEh0bXdFrBLTrI/J6B/QMlhwE9auOov53tgB+qMukH6/h8YAK/qw+QJGct/PTbdh2lytGyipxCcEtAw== +"@typescript-eslint/eslint-plugin@^5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz#54f8368d080eb384a455f60c2ee044e948a8ce67" + integrity sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ== dependencies: - "@typescript-eslint/scope-manager" "5.45.1" - "@typescript-eslint/type-utils" "5.45.1" - "@typescript-eslint/utils" "5.45.1" + "@typescript-eslint/scope-manager" "5.48.0" + "@typescript-eslint/type-utils" "5.48.0" + "@typescript-eslint/utils" "5.48.0" debug "^4.3.4" ignore "^5.2.0" natural-compare-lite "^1.4.0" @@ -1725,72 +1720,72 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.45.1.tgz#6440ec283fa1373a12652d4e2fef4cb6e7b7e8c6" - integrity sha512-JQ3Ep8bEOXu16q0ztsatp/iQfDCtvap7sp/DKo7DWltUquj5AfCOpX2zSzJ8YkAVnrQNqQ5R62PBz2UtrfmCkA== +"@typescript-eslint/parser@^5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.48.0.tgz#02803355b23884a83e543755349809a50b7ed9ba" + integrity sha512-1mxNA8qfgxX8kBvRDIHEzrRGrKHQfQlbW6iHyfHYS0Q4X1af+S6mkLNtgCOsGVl8+/LUPrqdHMssAemkrQ01qg== dependencies: - "@typescript-eslint/scope-manager" "5.45.1" - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/typescript-estree" "5.45.1" + "@typescript-eslint/scope-manager" "5.48.0" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/typescript-estree" "5.48.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.45.1.tgz#5b87d025eec7035d879b99c260f03be5c247883c" - integrity sha512-D6fCileR6Iai7E35Eb4Kp+k0iW7F1wxXYrOhX/3dywsOJpJAQ20Fwgcf+P/TDtvQ7zcsWsrJaglaQWDhOMsspQ== +"@typescript-eslint/scope-manager@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.48.0.tgz#607731cb0957fbc52fd754fd79507d1b6659cecf" + integrity sha512-0AA4LviDtVtZqlyUQnZMVHydDATpD9SAX/RC5qh6cBd3xmyWvmXYF+WT1oOmxkeMnWDlUVTwdODeucUnjz3gow== dependencies: - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/visitor-keys" "5.45.1" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/visitor-keys" "5.48.0" -"@typescript-eslint/type-utils@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.45.1.tgz#cb7d300c3c95802cea9f87c7f8be363cf8f8538c" - integrity sha512-aosxFa+0CoYgYEl3aptLe1svP910DJq68nwEJzyQcrtRhC4BN0tJAvZGAe+D0tzjJmFXe+h4leSsiZhwBa2vrA== +"@typescript-eslint/type-utils@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz#40496dccfdc2daa14a565f8be80ad1ae3882d6d6" + integrity sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g== dependencies: - "@typescript-eslint/typescript-estree" "5.45.1" - "@typescript-eslint/utils" "5.45.1" + "@typescript-eslint/typescript-estree" "5.48.0" + "@typescript-eslint/utils" "5.48.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.45.1.tgz#8e1883041cee23f1bb7e1343b0139f97f6a17c14" - integrity sha512-HEW3U0E5dLjUT+nk7b4lLbOherS1U4ap+b9pfu2oGsW3oPu7genRaY9dDv3nMczC1rbnRY2W/D7SN05wYoGImg== +"@typescript-eslint/types@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.48.0.tgz#d725da8dfcff320aab2ac6f65c97b0df30058449" + integrity sha512-UTe67B0Ypius0fnEE518NB2N8gGutIlTojeTg4nt0GQvikReVkurqxd2LvYa9q9M5MQ6rtpNyWTBxdscw40Xhw== -"@typescript-eslint/typescript-estree@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.45.1.tgz#b3dc37f0c4f0fe73e09917fc735e6f96eabf9ba4" - integrity sha512-76NZpmpCzWVrrb0XmYEpbwOz/FENBi+5W7ipVXAsG3OoFrQKJMiaqsBMbvGRyLtPotGqUfcY7Ur8j0dksDJDng== +"@typescript-eslint/typescript-estree@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.48.0.tgz#a7f04bccb001003405bb5452d43953a382c2fac2" + integrity sha512-7pjd94vvIjI1zTz6aq/5wwE/YrfIyEPLtGJmRfyNR9NYIW+rOvzzUv3Cmq2hRKpvt6e9vpvPUQ7puzX7VSmsEw== dependencies: - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/visitor-keys" "5.45.1" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/visitor-keys" "5.48.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.45.1.tgz#39610c98bde82c4792f2a858b29b7d0053448be2" - integrity sha512-rlbC5VZz68+yjAzQBc4I7KDYVzWG2X/OrqoZrMahYq3u8FFtmQYc+9rovo/7wlJH5kugJ+jQXV5pJMnofGmPRw== +"@typescript-eslint/utils@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.48.0.tgz#eee926af2733f7156ad8d15e51791e42ce300273" + integrity sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ== dependencies: "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.45.1" - "@typescript-eslint/types" "5.45.1" - "@typescript-eslint/typescript-estree" "5.45.1" + "@typescript-eslint/scope-manager" "5.48.0" + "@typescript-eslint/types" "5.48.0" + "@typescript-eslint/typescript-estree" "5.48.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.45.1": - version "5.45.1" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.45.1.tgz#204428430ad6a830d24c5ac87c71366a1cfe1948" - integrity sha512-cy9ln+6rmthYWjH9fmx+5FU/JDpjQb586++x2FZlveq7GdGuLLW9a2Jcst2TGekH82bXpfmRNSwP9tyEs6RjvQ== +"@typescript-eslint/visitor-keys@5.48.0": + version "5.48.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.48.0.tgz#4446d5e7f6cadde7140390c0e284c8702d944904" + integrity sha512-5motVPz5EgxQ0bHjut3chzBkJ3Z3sheYVcSwS5BpHZpLqSptSmELNtGixmgj65+rIfhvtQTz5i9OP2vtzdDH7Q== dependencies: - "@typescript-eslint/types" "5.45.1" + "@typescript-eslint/types" "5.48.0" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.11.1": @@ -3178,7 +3173,7 @@ cosmiconfig-typescript-loader@^4.0.0: resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.0.0.tgz#4a6d856c1281135197346a6f64dfa73a9cd9fefa" integrity sha512-cVpucSc2Tf+VPwCCR7SZzmQTQkPbkk4O01yXsYqXBIbjE1bhwqSyAgYQkRK1un4i0OPziTleqFhdkmOc4RQ/9g== -cosmiconfig@8.0.0: +cosmiconfig@8.0.0, cosmiconfig@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.0.0.tgz#e9feae014eab580f858f8a0288f38997a7bebe97" integrity sha512-da1EafcpH6b/TD8vDRaWV7xFINlHlF6zKsGwS1TsuVJTZRkquaS5HTMq7uq6h31619QjbsYl21gVDOm32KM1vQ== @@ -4037,10 +4032,10 @@ escodegen@^2.0.0: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^8.5.0: - version "8.5.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz#5a81680ec934beca02c7b1a61cf8ca34b66feab1" - integrity sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q== +eslint-config-prettier@^8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" + integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== eslint-import-resolver-node@^0.3.6: version "0.3.6" @@ -4136,12 +4131,12 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.30.0: - version "8.30.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.30.0.tgz#83a506125d089eef7c5b5910eeea824273a33f50" - integrity sha512-MGADB39QqYuzEGov+F/qb18r4i7DohCDOfatHaxI2iGlPuC65bwG2gxgO+7DkyL38dRFaRH7RaRAgU6JKL9rMQ== +eslint@^8.31.0: + version "8.31.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" + integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== dependencies: - "@eslint/eslintrc" "^1.4.0" + "@eslint/eslintrc" "^1.4.1" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -4563,7 +4558,7 @@ fs-constants@^1.0.0: resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== -fs-extra@^10.0.0, fs-extra@^10.1.0: +fs-extra@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== @@ -5091,10 +5086,10 @@ human-signals@^3.0.1: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-3.0.1.tgz#c740920859dafa50e5a3222da9d3bf4bb0e5eef5" integrity sha512-rQLskxnM/5OCldHo+wNXbpVgDn5A17CUoKX+7Sokwaknlq7CdSnphy0W39GU8dw59XiCXmFXDg4fRuckQRKewQ== -husky@^8.0.2: - version "8.0.2" - resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.2.tgz#5816a60db02650f1f22c8b69b928fd6bcd77a236" - integrity sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg== +husky@^8.0.3: + version "8.0.3" + resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184" + integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg== i18next-browser-languagedetector@^7.0.1: version "7.0.1" @@ -7662,10 +7657,10 @@ postcss@^8.4.18, postcss@^8.4.19: picocolors "^1.0.0" source-map-js "^1.0.2" -postcss@^8.4.20: - version "8.4.20" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.20.tgz#64c52f509644cecad8567e949f4081d98349dc56" - integrity sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g== +postcss@^8.4.21: + version "8.4.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" + integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== dependencies: nanoid "^3.3.4" picocolors "^1.0.0" @@ -8400,10 +8395,10 @@ selfsigned@^2.1.1: resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.3.7, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: - version "7.3.7" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" - integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== +semver@7.3.8, semver@^7.3.8: + version "7.3.8" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" + integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" @@ -8412,10 +8407,10 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.3.8: - version "7.3.8" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== +semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" From 861409d9555a85cb2d9e9ddaa20bf5bd2453c9d3 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Mon, 16 Jan 2023 12:19:57 +0700 Subject: [PATCH 039/123] fix: make account menu width responsive --- src/app/components/AccountMenu/index.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index fa9526957d..3e52d684b6 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -12,6 +12,7 @@ import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import { useAccount } from "~/app/context/AccountContext"; import { useAccounts } from "~/app/context/AccountsContext"; +import { classNames } from "~/app/utils"; import msg from "~/common/lib/msg"; import utils from "~/common/lib/utils"; @@ -72,8 +73,19 @@ function AccountMenu({ showOptions = true }: Props) { } } + // account menu width: + // - ensure space for menu icon (24px) and left padding (pl-2) + // - expand to take up full possible width on mobile + // - constrain width on desktop screens to fit with the navbar + const accountNameWidthClassname = "calc(100%-theme(space.2)-24px)"; + const accountMenuWidthClassname = `max-w-[${accountNameWidthClassname}] md:max-w-[300px] lg:max-w-[400px] xl:max-w-[500px]`; return ( -
+

From 181b0a40d86a14fac99f48eb3b91e7b93095542e Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Mon, 16 Jan 2023 12:25:22 +0700 Subject: [PATCH 040/123] fix: tweak account menu width on md breakpoint --- src/app/components/AccountMenu/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 3e52d684b6..ae510c4321 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -78,7 +78,7 @@ function AccountMenu({ showOptions = true }: Props) { // - expand to take up full possible width on mobile // - constrain width on desktop screens to fit with the navbar const accountNameWidthClassname = "calc(100%-theme(space.2)-24px)"; - const accountMenuWidthClassname = `max-w-[${accountNameWidthClassname}] md:max-w-[300px] lg:max-w-[400px] xl:max-w-[500px]`; + const accountMenuWidthClassname = `max-w-[${accountNameWidthClassname}] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; return (
Date: Mon, 16 Jan 2023 12:28:11 +0700 Subject: [PATCH 041/123] chore: rename classnames --- src/app/components/AccountMenu/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index ae510c4321..83b1a127c1 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -77,8 +77,8 @@ function AccountMenu({ showOptions = true }: Props) { // - ensure space for menu icon (24px) and left padding (pl-2) // - expand to take up full possible width on mobile // - constrain width on desktop screens to fit with the navbar - const accountNameWidthClassname = "calc(100%-theme(space.2)-24px)"; - const accountMenuWidthClassname = `max-w-[${accountNameWidthClassname}] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; + const accountMenuWidthClassnameMobile = "calc(100%-theme(space.2)-24px)"; + const accountMenuWidthClassname = `max-w-[${accountMenuWidthClassnameMobile}] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; return (
Date: Mon, 16 Jan 2023 12:41:26 +0700 Subject: [PATCH 042/123] fix: wrap account names on account page --- src/app/screens/Accounts/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/screens/Accounts/index.tsx b/src/app/screens/Accounts/index.tsx index 7bcc74fb05..1bbf0b7588 100644 --- a/src/app/screens/Accounts/index.tsx +++ b/src/app/screens/Accounts/index.tsx @@ -135,7 +135,7 @@ function AccountsScreen() {
-

+

{account.name}

From f46340224b09a1c43b5fdb2844cb8a968b6cecf4 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Mon, 16 Jan 2023 12:58:37 +0700 Subject: [PATCH 043/123] fix: minimum account menu width --- src/app/components/AccountMenu/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 83b1a127c1..6ba2e4c9d0 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -77,8 +77,9 @@ function AccountMenu({ showOptions = true }: Props) { // - ensure space for menu icon (24px) and left padding (pl-2) // - expand to take up full possible width on mobile // - constrain width on desktop screens to fit with the navbar + // - add a minimum width to match the dropdown menu const accountMenuWidthClassnameMobile = "calc(100%-theme(space.2)-24px)"; - const accountMenuWidthClassname = `max-w-[${accountMenuWidthClassnameMobile}] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; + const accountMenuWidthClassname = `min-w-[theme(space.56)] max-w-[${accountMenuWidthClassnameMobile}] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; return (

Date: Thu, 19 Jan 2023 12:21:28 +0700 Subject: [PATCH 044/123] fix: max-width class not applying --- src/app/components/AccountMenu/index.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 6ba2e4c9d0..9b84b164fc 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -78,8 +78,7 @@ function AccountMenu({ showOptions = true }: Props) { // - expand to take up full possible width on mobile // - constrain width on desktop screens to fit with the navbar // - add a minimum width to match the dropdown menu - const accountMenuWidthClassnameMobile = "calc(100%-theme(space.2)-24px)"; - const accountMenuWidthClassname = `min-w-[theme(space.56)] max-w-[${accountMenuWidthClassnameMobile}] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; + const accountMenuWidthClassname = `min-w-[theme(space.56)] max-w-[calc(100%-theme(space.2)-24px)] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; return (
Date: Thu, 19 Jan 2023 12:31:21 +0700 Subject: [PATCH 045/123] fix: match menulist and account menu width --- src/app/components/AccountMenu/index.tsx | 2 +- src/app/components/Menu/MenuList.tsx | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 9b84b164fc..2994fbd010 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -124,7 +124,7 @@ function AccountMenu({ showOptions = true }: Props) { {t("screen_reader")} - + {t("title")} {Object.keys(accounts).map((accountId) => { diff --git a/src/app/components/Menu/MenuList.tsx b/src/app/components/Menu/MenuList.tsx index a59b368a31..c5749c8bfd 100644 --- a/src/app/components/Menu/MenuList.tsx +++ b/src/app/components/Menu/MenuList.tsx @@ -1,12 +1,14 @@ import { Menu, Transition } from "@headlessui/react"; import { Fragment } from "react"; +import { classNames } from "~/app/utils"; type Props = { position?: string; children: React.ReactNode; + fullWidth?: boolean; }; -function List({ position = "left", children }: Props) { +function List({ position = "left", fullWidth, children }: Props) { return ( {children} From e11fefff55f3484959862dcacebb1ca452b39613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Sat, 14 Jan 2023 22:18:25 +0100 Subject: [PATCH 046/123] fix: increase spacing --- src/app/components/AccountMenu/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 2994fbd010..048473791c 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -78,7 +78,7 @@ function AccountMenu({ showOptions = true }: Props) { // - expand to take up full possible width on mobile // - constrain width on desktop screens to fit with the navbar // - add a minimum width to match the dropdown menu - const accountMenuWidthClassname = `min-w-[theme(space.56)] max-w-[calc(100%-theme(space.2)-24px)] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; + const accountMenuWidthClassname = `min-w-[theme(space.56)] max-w-[calc(100%-theme(space.2)-32px)] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; return (
Date: Sun, 15 Jan 2023 00:37:24 +0100 Subject: [PATCH 047/123] fix: remove window or tab based on what the browser opens Normally when we open a new window the prompt is the only tab in this window If that's the case we have to close the prompt using windows.remove() Some browsers force the new window to open in a tab. In this case we have to close the prompt using tabs.remove() Some browsers actually can close the window when tabs.remove() removes the only/last tab. But Opera fails with the following error: "Tabs cannot be edited right now (user may be dragging a tab)" --- src/common/lib/utils.ts | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/src/common/lib/utils.ts b/src/common/lib/utils.ts index 6d1d0adc89..a84a27e60a 100644 --- a/src/common/lib/utils.ts +++ b/src/common/lib/utils.ts @@ -83,6 +83,7 @@ const utils = { left: left, }) .then((window) => { + let closeWindow = true; // by default we call remove.window (except the browser forces this prompt to open in a tab) let tabId: number | undefined; if (window.tabs) { tabId = window.tabs[0].id; @@ -92,6 +93,7 @@ const utils = { // Find the currently active tab to validate messages if (window.tabs && window.tabs?.length > 1) { tabId = window.tabs?.find((x) => x.active)?.id; + closeWindow = false; // we'll only remove the tab and not the window further down } // this interval hightlights the popup in the taskbar @@ -116,21 +118,30 @@ const utils = { responseMessage && responseMessage.response && sender.tab && - sender.tab.id === tabId + sender.tab.id === tabId && + sender.tab.windowId ) { clearInterval(focusInterval); browser.tabs.onRemoved.removeListener(onRemovedListener); - if (sender.tab.id) { - return browser.tabs.remove(sender.tab.id).then(() => { - // in the future actual "remove" (closing prompt) will be moved to component for i.e. budget flow - // https://github.com/getAlby/lightning-browser-extension/issues/1197 - if (responseMessage.error) { - return reject(new Error(responseMessage.error)); - } else { - return resolve(responseMessage); - } - }); + // if the window was opened as tab we remove the tab + // otherwise if a window was opened we have to remove the window. + // Opera fails to close the window with tabs.remove - it fails with: "Tabs cannot be edited right now (user may be dragging a tab)" + let closePromise; + if (closeWindow) { + closePromise = browser.windows.remove(sender.tab.windowId); + } else { + closePromise = browser.tabs.remove(sender.tab.id as number); // as number only for TS - we check for sender.tab.id in the if above } + + return closePromise.then(() => { + // in the future actual "remove" (closing prompt) will be moved to component for i.e. budget flow + // https://github.com/getAlby/lightning-browser-extension/issues/1197 + if (responseMessage.error) { + return reject(new Error(responseMessage.error)); + } else { + return resolve(responseMessage); + } + }); } }; From f1c406744833a50c12bd4a032d6701344484b410 Mon Sep 17 00:00:00 2001 From: Roland <33993199+rolznz@users.noreply.github.com> Date: Sun, 15 Jan 2023 19:41:17 +0700 Subject: [PATCH 048/123] Fix: Connect/Onboarding responsiveness (#1969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: restructure navbar * fix: navbar styles from getalby.com * fix: remove avatar * fix: hide nav on mobile * fix: connector responsiveness * fix: set password image alignment * fix: other wallets title casing * fix: pass className to Button classes * fix: mobile connector form width and Alby logo location * fix: mobile set password screenshot location * fix: set password input width and title centering * fix: move connector media underneath title in mobile view * fix: set password form screenshot Co-authored-by: René Aaron --- src/app/components/AccountMenu/index.tsx | 4 +- src/app/components/Button/index.tsx | 4 +- src/app/components/ConnectorForm/index.tsx | 67 ++++++++++--------- src/app/components/ConnectorPath/index.tsx | 6 +- src/app/components/LinkButton/index.tsx | 4 +- src/app/components/Navbar/Navbar.tsx | 10 ++- src/app/components/Navbar/NavbarLink.tsx | 11 +-- src/app/components/UserMenu/index.tsx | 2 +- src/app/screens/Onboard/SetPassword/index.tsx | 30 ++++++--- .../connectors/ChooseConnector/index.tsx | 10 +-- .../connectors/ChooseConnectorPath/index.tsx | 6 +- src/i18n/locales/en/translation.json | 2 +- 12 files changed, 91 insertions(+), 65 deletions(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 913f14984c..fa9526957d 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -1,11 +1,11 @@ import { AddressBookIcon, CaretDownIcon, + CheckIcon, PlusIcon, } from "@bitcoin-design/bitcoin-icons-react/filled"; -import { CheckIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; import { WalletIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import Skeleton from "react-loading-skeleton"; import { useNavigate } from "react-router-dom"; diff --git a/src/app/components/Button/index.tsx b/src/app/components/Button/index.tsx index 34b5900012..71e26a0766 100644 --- a/src/app/components/Button/index.tsx +++ b/src/app/components/Button/index.tsx @@ -31,6 +31,7 @@ const Button = forwardRef( outline = false, loading = false, flex = false, + className, }: Props, ref: Ref ) => { @@ -54,7 +55,8 @@ const Button = forwardRef( "hover:bg-gray-50 dark:hover:bg-surface-16dp", disabled ? "cursor-default opacity-60" : "cursor-pointer", flex && "flex-1", - "inline-flex justify-center items-center font-medium rounded-md shadow focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-orange-bitcoin transition duration-150" + "inline-flex justify-center items-center font-medium rounded-md shadow focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-orange-bitcoin transition duration-150", + !!className && className )} onClick={onClick} disabled={disabled} diff --git a/src/app/components/ConnectorForm/index.tsx b/src/app/components/ConnectorForm/index.tsx index efeab321d4..07290d1cf2 100644 --- a/src/app/components/ConnectorForm/index.tsx +++ b/src/app/components/ConnectorForm/index.tsx @@ -29,15 +29,46 @@ function ConnectorForm({ const { t: tCommon } = useTranslation("common"); const navigate = useNavigate(); + const media = ( +
+ {video ? ( +
+ +
+ ) : ( + <> +
+ Alby + Alby +
+ + )} +
+ ); + return ( -
+
{typeof title === "string" ? (

{title}

) : ( title )} +
{media}
{description && (
{typeof description === "string" ? ( @@ -47,42 +78,17 @@ function ConnectorForm({ )}
)} -
{children}
-
-
-
- {video ? ( -
- -
- ) : ( - <> - Alby - Alby - - )} -
+
{children}
+
{media}
-
+
diff --git a/src/app/components/ConnectorPath/index.tsx b/src/app/components/ConnectorPath/index.tsx index 9fdf1af5d1..3534266c71 100644 --- a/src/app/components/ConnectorPath/index.tsx +++ b/src/app/components/ConnectorPath/index.tsx @@ -7,13 +7,13 @@ type Props = { function ConnectorPath({ title, description, content, actions }: Props) { return ( -
+

{title}

{description}

-
+
{content}
-
{actions}
+
{actions}
); } diff --git a/src/app/components/LinkButton/index.tsx b/src/app/components/LinkButton/index.tsx index eeea65f5ca..cb8701b239 100644 --- a/src/app/components/LinkButton/index.tsx +++ b/src/app/components/LinkButton/index.tsx @@ -9,8 +9,8 @@ type Props = { export default function LinkButton({ to, title, logo }: Props) { return ( -
-
+
+
logo
diff --git a/src/app/components/Navbar/Navbar.tsx b/src/app/components/Navbar/Navbar.tsx index 7e7168f0c9..3478de7107 100644 --- a/src/app/components/Navbar/Navbar.tsx +++ b/src/app/components/Navbar/Navbar.tsx @@ -8,10 +8,14 @@ type Props = { export default function Navbar({ children }: Props) { return (
-
+
+
+ + {children && ( + + )} +
- {children && } -
); diff --git a/src/app/components/Navbar/NavbarLink.tsx b/src/app/components/Navbar/NavbarLink.tsx index 954add7dd5..7685ee6a9a 100644 --- a/src/app/components/Navbar/NavbarLink.tsx +++ b/src/app/components/Navbar/NavbarLink.tsx @@ -1,4 +1,5 @@ import { NavLink } from "react-router-dom"; +import { classNames } from "~/app/utils"; type Props = { children: React.ReactNode; @@ -12,10 +13,12 @@ function NavbarLink({ children, end = false, href }: Props) { end={end} to={href} className={({ isActive }) => - "block px-1 font-semibold transition-colors duration-200" + - (isActive - ? " text-orange-bitcoin hover:text-orange-bitcoin dark:text-orange-bitcoin" - : " text-gray-500 dark:text-neutral-400 hover:text-gray-700") + classNames( + "block font-semibold px-1 text-md transition-colors duration-200 hover:text-orange-bitcoin dark:hover:text-orange-bitcoin", + isActive + ? " text-gray-900 dark:text-gray-100" + : " text-gray-400 dark:text-gray-400" + ) } > {children} diff --git a/src/app/components/UserMenu/index.tsx b/src/app/components/UserMenu/index.tsx index 5f2fb43a60..6afaee66b4 100644 --- a/src/app/components/UserMenu/index.tsx +++ b/src/app/components/UserMenu/index.tsx @@ -47,7 +47,7 @@ export default function UserMenu() { - + { openOptions("discover"); diff --git a/src/app/screens/Onboard/SetPassword/index.tsx b/src/app/screens/Onboard/SetPassword/index.tsx index 7335c0dcaa..f6be080030 100644 --- a/src/app/screens/Onboard/SetPassword/index.tsx +++ b/src/app/screens/Onboard/SetPassword/index.tsx @@ -32,15 +32,28 @@ export default function SetPassword() { } } + const unlockScreenshot = ( + Unlock screen + ); + return (
-
+
-

{t("title")}

+

+ {t("title")} +

+
+ {unlockScreenshot} +

{t("description")}

-
+
-
-
- Unlock screen -
+
+ {unlockScreenshot}
@@ -67,6 +74,7 @@ export default function SetPassword() { !formData.password || formData.password !== formData.passwordConfirmation } + className="max-sm:w-full" />
diff --git a/src/app/screens/connectors/ChooseConnector/index.tsx b/src/app/screens/connectors/ChooseConnector/index.tsx index 38c2a3819e..b9416efa3e 100644 --- a/src/app/screens/connectors/ChooseConnector/index.tsx +++ b/src/app/screens/connectors/ChooseConnector/index.tsx @@ -13,17 +13,19 @@ export default function ChooseConnector({ title, description }: Props) { connectorRoutes = getConnectorRoutes(); }); return ( -
+
-
-

{title}

+
+

+ {title} +

{description && (

{description}

)}
-
+
{connectorRoutes.map(({ path, title, logo }) => ( ))} diff --git a/src/app/screens/connectors/ChooseConnectorPath/index.tsx b/src/app/screens/connectors/ChooseConnectorPath/index.tsx index 5f6f427593..d26a5c546e 100644 --- a/src/app/screens/connectors/ChooseConnectorPath/index.tsx +++ b/src/app/screens/connectors/ChooseConnectorPath/index.tsx @@ -22,7 +22,7 @@ export default function ChooseConnectorPath({ title, description }: Props) { }); const { t: tCommon } = useTranslation("common"); return ( -
+

{title}

@@ -35,7 +35,7 @@ export default function ChooseConnectorPath({ title, description }: Props) { )}
-
+
+
{connectorRoutes.slice(0, 7).map(({ path, title, logo }) => ( Date: Sun, 15 Jan 2023 16:21:08 +0100 Subject: [PATCH 049/123] chore: update nostr event validation keep event validation in sync with nostr-tools thogh we do not add nostr-tools to avoid the additional dependency. --- .../actions/nostr/helpers.ts | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/src/extension/background-script/actions/nostr/helpers.ts b/src/extension/background-script/actions/nostr/helpers.ts index 64a077f0e1..4278d69be9 100644 --- a/src/extension/background-script/actions/nostr/helpers.ts +++ b/src/extension/background-script/actions/nostr/helpers.ts @@ -45,13 +45,17 @@ export async function addPermissionFor(method: string, host: string) { return !!permissionIsAdded && (await db.saveToStorage()); } -export function validateEvent(event: Event) { - if (event.id !== getEventHash(event)) return false; +// from: https://github.com/nbd-wtf/nostr-tools/blob/160987472fd4922dd80c75648ca8939dd2d96cc0/event.ts#L61 +// to avoid the additional dependency +export function validateEvent(event: Event): boolean { if (typeof event.content !== "string") return false; if (typeof event.created_at !== "number") return false; + if (typeof event.pubkey !== "string") return false; + if (!event.pubkey.match(/^[a-f0-9]{64}$/)) return false; if (!Array.isArray(event.tags)) return false; - for (const tag of event.tags) { + for (let i = 0; i < event.tags.length; i++) { + const tag = event.tags[i]; if (!Array.isArray(tag)) return false; for (let j = 0; j < tag.length; j++) { if (typeof tag[j] === "object") return false; @@ -61,12 +65,12 @@ export function validateEvent(event: Event) { return true; } -export async function signEvent(event: Event, key: string) { - const signedEvent = await secp256k1.schnorr.sign(getEventHash(event), key); - return secp256k1.utils.bytesToHex(signedEvent); -} +// from: https://github.com/nbd-wtf/nostr-tools/blob/160987472fd4922dd80c75648ca8939dd2d96cc0/event.ts#L42 +// to avoid the additional dependency +export function serializeEvent(evt: Event): string { + if (!validateEvent(evt)) + throw new Error("can't serialize event with wrong or missing properties"); -export function serializeEvent(evt: Event) { return JSON.stringify([ 0, evt.pubkey, @@ -77,6 +81,11 @@ export function serializeEvent(evt: Event) { ]); } +export async function signEvent(event: Event, key: string) { + const signedEvent = await secp256k1.schnorr.sign(getEventHash(event), key); + return secp256k1.utils.bytesToHex(signedEvent); +} + export function getEventHash(event: Event): string { return sha256(serializeEvent(event)).toString(Hex); } From 59600047557090c8e3bbfa132ea607ce3eddcc27 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sun, 15 Jan 2023 20:12:47 +0000 Subject: [PATCH 050/123] Update @noble/secp256k1 to version 1.7.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bd90cb61a3..a7cdb23613 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dependencies": { "@bitcoin-design/bitcoin-icons-react": "^0.1.9", "@headlessui/react": "^1.7.7", - "@noble/secp256k1": "^1.7.0", + "@noble/secp256k1": "^1.7.1", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/line-clamp": "^0.4.2", "axios": "^1.2.2", diff --git a/yarn.lock b/yarn.lock index 7f350ebccb..b8397cc109 100644 --- a/yarn.lock +++ b/yarn.lock @@ -960,10 +960,10 @@ strict-event-emitter "^0.2.4" web-encoding "^1.1.5" -"@noble/secp256k1@^1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.0.tgz#d15357f7c227e751d90aa06b05a0e5cf993ba8c1" - integrity sha512-kbacwGSsH/CTout0ZnZWxnW1B+jH/7r/WAAKLBtrRJ/+CUH7lgmQzl3GTrQua3SGKWNSDsS6lmjnDpIJ5Dxyaw== +"@noble/secp256k1@^1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" + integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== "@nodelib/fs.scandir@2.1.5": version "2.1.5" From de54508271aaff363cc2f90967cdbd063cb8acc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Sun, 15 Jan 2023 23:35:13 +0100 Subject: [PATCH 051/123] feat: improve navigation (#1955) * fix: restructure navbar * fix: navbar styles from getalby.com * fix: remove avatar * fix: hide nav on mobile From a66264005d6f8c5c1f638f3dc94e433f2e689348 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 16 Jan 2023 10:21:41 +0100 Subject: [PATCH 052/123] feat(nostr): prefill event id and pubkey if not set this automatically adds the event ID and pubkey if not provided. making it easier for the webapp --- .../background-script/actions/nostr/helpers.ts | 5 +++-- .../actions/nostr/signEventOrPrompt.ts | 14 +++++++++----- src/extension/background-script/nostr/index.ts | 6 +++++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/extension/background-script/actions/nostr/helpers.ts b/src/extension/background-script/actions/nostr/helpers.ts index 4278d69be9..da322079db 100644 --- a/src/extension/background-script/actions/nostr/helpers.ts +++ b/src/extension/background-script/actions/nostr/helpers.ts @@ -50,8 +50,9 @@ export async function addPermissionFor(method: string, host: string) { export function validateEvent(event: Event): boolean { if (typeof event.content !== "string") return false; if (typeof event.created_at !== "number") return false; - if (typeof event.pubkey !== "string") return false; - if (!event.pubkey.match(/^[a-f0-9]{64}$/)) return false; + // ignore these checks because if the pubkey is not set we add it to the event. same for the ID. + // if (typeof event.pubkey !== "string") return false; + // if (!event.pubkey.match(/^[a-f0-9]{64}$/)) return false; if (!Array.isArray(event.tags)) return false; for (let i = 0; i < event.tags.length; i++) { diff --git a/src/extension/background-script/actions/nostr/signEventOrPrompt.ts b/src/extension/background-script/actions/nostr/signEventOrPrompt.ts index 64188f4193..c6e0373b08 100644 --- a/src/extension/background-script/actions/nostr/signEventOrPrompt.ts +++ b/src/extension/background-script/actions/nostr/signEventOrPrompt.ts @@ -12,7 +12,14 @@ const signEventOrPrompt = async (message: MessageSignEvent) => { return; } - if (!validateEvent(message.args.event)) { + const nostr = state.getState().getNostr(); + + // check event and add an ID and pubkey if not present + const event = message.args.event; + if (!event.pubkey) event.pubkey = nostr.getPublicKey(); + if (!event.id) event.id = nostr.getEventHash(event); + + if (!validateEvent(event)) { console.error("Invalid event"); return { error: "Invalid event.", @@ -42,10 +49,7 @@ const signEventOrPrompt = async (message: MessageSignEvent) => { } } - const signedEvent = await state - .getState() - .getNostr() - .signEvent(message.args.event); + const signedEvent = await nostr.signEvent(event); return { data: signedEvent }; } catch (e) { diff --git a/src/extension/background-script/nostr/index.ts b/src/extension/background-script/nostr/index.ts index b2b2bde247..4fb1bc9137 100644 --- a/src/extension/background-script/nostr/index.ts +++ b/src/extension/background-script/nostr/index.ts @@ -8,7 +8,7 @@ import Utf8 from "crypto-js/enc-utf8"; import { decryptData, encryptData } from "~/common/lib/crypto"; import { Event } from "~/extension/ln/nostr/types"; -import { signEvent } from "../actions/nostr/helpers"; +import { signEvent, getEventHash } from "../actions/nostr/helpers"; import state from "../state"; class Nostr { @@ -76,6 +76,10 @@ class Nostr { return Utf8.stringify(decrypted); } + + getEventHash(event: Event) { + return getEventHash(event); + } } export default Nostr; From e09ea2ebf7762aa4b3611e032dfa8a3c16c4178e Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 09:24:32 +0000 Subject: [PATCH 053/123] Update @types/webextension-polyfill to version 0.10.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bd90cb61a3..474187b740 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@types/react-dom": "^18.0.10", "@types/react-modal": "^3.13.1", "@types/uuid": "^9.0.0", - "@types/webextension-polyfill": "^0.9.2", + "@types/webextension-polyfill": "^0.10.0", "@typescript-eslint/eslint-plugin": "^5.48.0", "@typescript-eslint/parser": "^5.48.0", "autoprefixer": "^10.4.13", diff --git a/yarn.lock b/yarn.lock index 7f350ebccb..7a83003c4c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1660,10 +1660,10 @@ resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.0.tgz#53ef263e5239728b56096b0a869595135b7952d2" integrity sha512-kr90f+ERiQtKWMz5rP32ltJ/BtULDI5RVO0uavn1HQUOwjx0R1h0rnDYNL0CepF1zL5bSY6FISAfd9tOdDhU5Q== -"@types/webextension-polyfill@^0.9.2": - version "0.9.2" - resolved "https://registry.yarnpkg.com/@types/webextension-polyfill/-/webextension-polyfill-0.9.2.tgz#4459174d25e83b38fd6d2b2cacb0fc87ad99dfa4" - integrity sha512-op8YeoK60K6/GIx3snWs3JowBZ+/aeSnZzZuuwynA7VARWfzr3st9aQNk9RWfoBx5xqlNZjAsh2QttPUZnabCw== +"@types/webextension-polyfill@^0.10.0": + version "0.10.0" + resolved "https://registry.yarnpkg.com/@types/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz#e87b5e2c101599779a584cdb043887ad73b37b0e" + integrity sha512-If4EcaHzYTqcbNMp/FdReVdRmLL/Te42ivnJII551bYjhX19bWem5m14FERCqdJA732OloGuxCRvLBvcMGsn4A== "@types/ws@^8.5.1": version "8.5.3" From a5958f01061a84fc112a7c70c382f95510f29909 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:11:49 +0000 Subject: [PATCH 054/123] Update i18next to version 22.4.9 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bd90cb61a3..2065611962 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "dexie": "^3.2.2", "elliptic": "^6.5.4", "html5-qrcode": "^2.3.1", - "i18next": "^22.4.6", + "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", "lnmessage": "^0.0.14", "lodash.merge": "^4.6.2", diff --git a/yarn.lock b/yarn.lock index 7f350ebccb..6fa6e0692b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5098,10 +5098,10 @@ i18next-browser-languagedetector@^7.0.1: dependencies: "@babel/runtime" "^7.19.4" -i18next@^22.4.6: - version "22.4.6" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.4.6.tgz#876352c3ba81bdfedc38eeda124e2bbd05f46988" - integrity sha512-9Tm1ezxWyzV+306CIDMBbYBitC1jedQyYuuLtIv7oxjp2ohh8eyxP9xytIf+2bbQfhH784IQKPSYp+Zq9+YSbw== +i18next@^22.4.9: + version "22.4.9" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-22.4.9.tgz#98c8384c6bd41ff937da98b1e809ba03d3b41053" + integrity sha512-8gWMmUz460KJDQp/ob3MNUX84cVuDRY9PLFPnV8d+Qezz/6dkjxwOaH70xjrCNDO+JrUL25iXfAIN9wUkInNZw== dependencies: "@babel/runtime" "^7.20.6" From 92f86723c434e1e567356f14d5ff77c3b265cb3f Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 16 Jan 2023 10:25:19 +0000 Subject: [PATCH 055/123] Update html5-qrcode to version 2.3.4 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 717f2902ab..14d64a5314 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "dayjs": "^1.11.7", "dexie": "^3.2.2", "elliptic": "^6.5.4", - "html5-qrcode": "^2.3.1", + "html5-qrcode": "^2.3.4", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", "lnmessage": "^0.0.14", diff --git a/yarn.lock b/yarn.lock index 4019b9eebe..870eaebba7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4993,10 +4993,10 @@ html-webpack-plugin@^5.5.0: pretty-error "^4.0.0" tapable "^2.0.0" -html5-qrcode@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.1.tgz#81861de0feb006de5aa6a1dbe8d301b244a7bb6f" - integrity sha512-sSAgpmmUlssKm9az18I6d7fytH5jPq4xG7E4mCuhsGpMsDwk05AumKNsag5rfxwgMFPiUQg7CcRiOCXlgSJxmg== +html5-qrcode@^2.3.4: + version "2.3.4" + resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.3.4.tgz#7e2b4575a23b10ff5e26d2bf147c8027c1ece389" + integrity sha512-VPZrOTG8XR9HmIAhSSiGtJVPErZxKy/DuGc9cPQLburCWZEbvxQGJP9y4K4P+8vdalLtYB/vM5YP1BdWQKZ8jQ== htmlparser2@^6.1.0: version "6.1.0" From 99187ba407d2ab8210fe57d4e73874bbcbd0ccda Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 16 Jan 2023 16:22:21 +0530 Subject: [PATCH 056/123] chore: nostr i18n strings --- src/app/screens/Nostr/Confirm.tsx | 2 +- src/app/screens/Nostr/ConfirmGetPublicKey.tsx | 5 ++-- src/app/screens/Nostr/ConfirmSignMessage.tsx | 4 ++-- .../actions/nostr/decryptOrPrompt.ts | 4 ++-- .../actions/nostr/encryptOrPrompt.ts | 4 ++-- src/i18n/locales/en/translation.json | 23 +++++++------------ 6 files changed, 18 insertions(+), 24 deletions(-) diff --git a/src/app/screens/Nostr/Confirm.tsx b/src/app/screens/Nostr/Confirm.tsx index 753f4dd59c..d99e41e6f2 100644 --- a/src/app/screens/Nostr/Confirm.tsx +++ b/src/app/screens/Nostr/Confirm.tsx @@ -91,7 +91,7 @@ function NostrConfirm() { htmlFor="remember_permission" className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white" > - {t("permissions.remember.label")} + {tCommon("actions.remember")}
diff --git a/src/app/screens/Nostr/ConfirmGetPublicKey.tsx b/src/app/screens/Nostr/ConfirmGetPublicKey.tsx index e3d09d8427..14b186819c 100644 --- a/src/app/screens/Nostr/ConfirmGetPublicKey.tsx +++ b/src/app/screens/Nostr/ConfirmGetPublicKey.tsx @@ -16,6 +16,7 @@ function NostrConfirmGetPublicKey() { keyPrefix: "nostr", }); const { t: tCommon } = useTranslation("common"); + const { t: tPermissions } = useTranslation("permissions"); const navState = useNavigationState(); const origin = navState.origin as OriginData; const [loading, setLoading] = useState(false); @@ -67,7 +68,7 @@ function NostrConfirmGetPublicKey() {

- {t("permissions.read_public_key")} + {tPermissions("nostr.getpublickey")}

@@ -87,7 +88,7 @@ function NostrConfirmGetPublicKey() { htmlFor="remember_permission" className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white" > - {t("permissions.remember.label")} + {tCommon("actions.remember")}
diff --git a/src/app/screens/Nostr/ConfirmSignMessage.tsx b/src/app/screens/Nostr/ConfirmSignMessage.tsx index cfe7f1602a..0d63ae2b0d 100644 --- a/src/app/screens/Nostr/ConfirmSignMessage.tsx +++ b/src/app/screens/Nostr/ConfirmSignMessage.tsx @@ -78,7 +78,7 @@ function ConfirmSignMessage() { url={origin.host} />
@@ -94,7 +94,7 @@ function ConfirmSignMessage() { htmlFor="remember_permission" className="cursor-pointer ml-2 block text-sm text-gray-900 font-medium dark:text-white" > - {t("permissions.remember.label")} + {tCommon("actions.remember")}
diff --git a/src/extension/background-script/actions/nostr/decryptOrPrompt.ts b/src/extension/background-script/actions/nostr/decryptOrPrompt.ts index 969ba23bde..373c075f7e 100644 --- a/src/extension/background-script/actions/nostr/decryptOrPrompt.ts +++ b/src/extension/background-script/actions/nostr/decryptOrPrompt.ts @@ -3,7 +3,7 @@ import state from "~/extension/background-script/state"; import i18n from "~/i18n/i18nConfig"; import { MessageDecryptGet, PermissionMethodNostr } from "~/types"; -import { hasPermissionFor, addPermissionFor } from "./helpers"; +import { addPermissionFor, hasPermissionFor } from "./helpers"; const decryptOrPrompt = async (message: MessageDecryptGet) => { if (!("host" in message.origin)) { @@ -32,7 +32,7 @@ const decryptOrPrompt = async (message: MessageDecryptGet) => { ...message, action: "public/nostr/confirm", args: { - description: i18n.t("translation:nostr.permissions.decrypt"), + description: i18n.t("permissions:nostr.nip04decrypt"), }, }); diff --git a/src/extension/background-script/actions/nostr/encryptOrPrompt.ts b/src/extension/background-script/actions/nostr/encryptOrPrompt.ts index c2c913db27..2d5eefc31d 100644 --- a/src/extension/background-script/actions/nostr/encryptOrPrompt.ts +++ b/src/extension/background-script/actions/nostr/encryptOrPrompt.ts @@ -3,7 +3,7 @@ import state from "~/extension/background-script/state"; import i18n from "~/i18n/i18nConfig"; import { MessageEncryptGet, PermissionMethodNostr } from "~/types"; -import { hasPermissionFor, addPermissionFor } from "./helpers"; +import { addPermissionFor, hasPermissionFor } from "./helpers"; const encryptOrPrompt = async (message: MessageEncryptGet) => { if (!("host" in message.origin)) { @@ -32,7 +32,7 @@ const encryptOrPrompt = async (message: MessageEncryptGet) => { ...message, action: "public/nostr/confirm", args: { - description: i18n.t("translation:nostr.permissions.encrypt"), + description: i18n.t("permissions:nostr.nip04encrypt"), }, }); diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 32296ab34b..06a85c558a 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -676,17 +676,9 @@ "title": "Nostr", "allow": "Allow this website to:", "content": "This website asks you to sign:", + "allow_sign": "Allow {{host}} to sign:", "block_and_ignore": "Block and ignore {{host}}", - "block_added": "Added {{host}} to the blocklist, please reload the website.", - "permissions": { - "decrypt": "Decrypt data", - "encrypt": "Encrypt data", - "allow_sign": "Allow {{host}} to sign:", - "read_public_key": "Read your public key", - "remember": { - "label": "Remember my choice and don't ask again" - } - } + "block_added": "Added {{host}} to the blocklist, please reload the website." } }, "common": { @@ -730,7 +722,8 @@ "export": "Export", "remove": "Remove", "copy": "Copy", - "log_in": "Log in" + "log_in": "Log in", + "remember": "Remember my choice and don't ask again" }, "errors": { "connection_failed": "Connection failed", @@ -832,10 +825,10 @@ }, "permissions": { "nostr": { - "getpublickey": "", - "nip04encrypt": "", - "nip04decrypt": "", - "signmessage": "" + "getpublickey": "Read your public key.", + "nip04encrypt": "Encrypt Data.", + "nip04decrypt": "Decrypt Data.", + "signmessage": "Sign message with your key." }, "commando": { "bkpr-listbalances": "List of all current and historical account balances.", From 80b98cdd7b75663bbe05c091ffbbfc85bf4646dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Mon, 16 Jan 2023 13:12:45 +0100 Subject: [PATCH 057/123] fix: navbar container (#1981) --- src/app/components/Header/index.tsx | 10 ++++++---- src/app/components/Navbar/NavbarLink.tsx | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/components/Header/index.tsx b/src/app/components/Header/index.tsx index 8733c54636..912def1737 100644 --- a/src/app/components/Header/index.tsx +++ b/src/app/components/Header/index.tsx @@ -6,10 +6,12 @@ type Props = { function Header({ title, headerLeft, headerRight }: Props) { return ( -
-
{headerLeft}
-

{title}

-
{headerRight}
+
+
+
{headerLeft}
+

{title}

+
{headerRight}
+
); } diff --git a/src/app/components/Navbar/NavbarLink.tsx b/src/app/components/Navbar/NavbarLink.tsx index 7685ee6a9a..c61ce78441 100644 --- a/src/app/components/Navbar/NavbarLink.tsx +++ b/src/app/components/Navbar/NavbarLink.tsx @@ -14,7 +14,7 @@ function NavbarLink({ children, end = false, href }: Props) { to={href} className={({ isActive }) => classNames( - "block font-semibold px-1 text-md transition-colors duration-200 hover:text-orange-bitcoin dark:hover:text-orange-bitcoin", + "block font-semibold px-1 text-md", isActive ? " text-gray-900 dark:text-gray-100" : " text-gray-400 dark:text-gray-400" From b38901a9dd5fe70199f367776880ee661a044c33 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 16 Jan 2023 17:57:26 +0530 Subject: [PATCH 058/123] fix: add migration for legacy webln permissions --- src/extension/background-script/migrations/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/extension/background-script/migrations/index.ts b/src/extension/background-script/migrations/index.ts index ea52c51279..ddec35b1dc 100644 --- a/src/extension/background-script/migrations/index.ts +++ b/src/extension/background-script/migrations/index.ts @@ -26,6 +26,12 @@ const setMigrated = (name: Migration): Promise => { }; const migrations = { + migratedeleteLegacyWeblnPermissions: async () => { + await db.permissions + .where("method") + .startsWithIgnoreCase("webln/") + .delete(); + }, migrateisUsingLegacyLnurlAuthKeySetting: async () => { const { settings } = state.getState(); const allowances = await db.allowances @@ -58,6 +64,11 @@ const migrate = async () => { await migrations["migrateisUsingLegacyLnurlAuthKeySetting"](); await setMigrated("migrateisUsingLegacyLnurlAuthKeySetting"); } + if (shouldMigrate("migratedeleteLegacyWeblnPermissions")) { + console.info("Running migration for: migratedeleteLegacyWeblnPermissions"); + await migrations["migratedeleteLegacyWeblnPermissions"](); + await setMigrated("migratedeleteLegacyWeblnPermissions"); + } }; export default migrate; From 5715bb6fa927a94bff42e24f21cbdd46959348e3 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Mon, 16 Jan 2023 18:20:36 +0530 Subject: [PATCH 059/123] fix: modify tests for new permission methods --- .../actions/ln/__tests__/request.test.ts | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/extension/background-script/actions/ln/__tests__/request.test.ts b/src/extension/background-script/actions/ln/__tests__/request.test.ts index ab065a9c6f..9e8c059503 100644 --- a/src/extension/background-script/actions/ln/__tests__/request.test.ts +++ b/src/extension/background-script/actions/ln/__tests__/request.test.ts @@ -43,7 +43,7 @@ const permissionInDB = { allowanceId: allowanceInDB.id, createdAt: "1487076708000", host: allowanceInDB.host, - method: "webln/makeinvoice", + method: "webln/lnd/makeinvoice", blocked: false, enabled: true, }; @@ -59,6 +59,10 @@ const message: MessageGenericRequest = { const requestResponse = { data: [] }; const fullConnector = { + // hacky fix because Jest doesn't return constructor name + constructor: { + name: "lnd", + }, requestMethod: jest.fn(() => Promise.resolve(requestResponse)), supportedMethods: [ // saved and compared in lowercase @@ -197,7 +201,7 @@ describe("ln request", () => { args: { requestPermission: { method: message.args.method.toLowerCase(), - description: "object.makeinvoice", // jest doesn't give back the constructor's name? + description: "lnd.makeinvoice", }, }, origin: message.origin, @@ -224,7 +228,7 @@ describe("ln request", () => { args: { requestPermission: { method: message.args.method.toLowerCase(), - description: "object.makeinvoice", // jest doesn't give back the constructor's name? + description: "lnd.makeinvoice", }, }, origin: message.origin, @@ -256,7 +260,7 @@ describe("ln request", () => { expect(await db.permissions.toArray()).toHaveLength(1); expect( - await db.permissions.get({ method: "webln/getinfo" }) + await db.permissions.get({ method: "webln/lnd/getinfo" }) ).toBeUndefined(); const result = await request(messageWithGetInfo); @@ -271,11 +275,11 @@ describe("ln request", () => { expect(await db.permissions.toArray()).toHaveLength(2); const addedPermission = await db.permissions.get({ - method: "webln/getinfo", + method: "webln/lnd/getinfo", }); expect(addedPermission).toEqual( expect.objectContaining({ - method: "webln/getinfo", + method: "webln/lnd/getinfo", enabled: true, allowanceId: allowanceInDB.id, host: allowanceInDB.host, @@ -303,7 +307,7 @@ describe("ln request", () => { expect(await db.permissions.toArray()).toHaveLength(1); expect( - await db.permissions.get({ method: "webln/sendpayment" }) + await db.permissions.get({ method: "webln/lnd/sendpayment" }) ).toBeUndefined(); const result = await request(messageWithOtherPermission); @@ -317,7 +321,7 @@ describe("ln request", () => { expect(await db.permissions.toArray()).toHaveLength(1); expect( - await db.permissions.get({ method: "webln/sendpayment" }) + await db.permissions.get({ method: "webln/lnd/sendpayment" }) ).toBeUndefined(); expect(result).toStrictEqual(requestResponse); From fa8db34d28ae0b29150ce7069949b9c9e6100ab9 Mon Sep 17 00:00:00 2001 From: Techy Mohit Date: Sun, 15 Jan 2023 13:32:39 +0000 Subject: [PATCH 060/123] Translated using Weblate (Hindi) Currently translated at 7.1% (33 of 461 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/hi/ --- src/i18n/locales/hi/translation.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/i18n/locales/hi/translation.json b/src/i18n/locales/hi/translation.json index 2c1a253e8f..fcea7d4742 100644 --- a/src/i18n/locales/hi/translation.json +++ b/src/i18n/locales/hi/translation.json @@ -62,6 +62,10 @@ }, "choose_connector": { "description": "आपको पहले एक लाइटनिंग वॉलेट से कनेक्ट करने की आवश्यकता है ताकि आप अपनी पसंदीदा वेबसाइटों से बातचीत कर सकें जो बिटकॉइन लाइटनिंग भुगतान स्वीकार करते हैं!" + }, + "choose_path": { + "title": "जुड़ें", + "description": "ऑनलाइन भुगतान करने के लिए एल्बी का उपयोग शुरू करने के लिए, अपने लाइटनिंग वॉलेट को एक्सटेंशन से कनेक्ट करें।" } } } From 4d795baba2caa1ed7f3afd1daa11654bd11ebaeb Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 16 Jan 2023 19:15:30 +0100 Subject: [PATCH 061/123] fix: remove legacy webln permission lookup --- src/extension/background-script/actions/ln/request.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/extension/background-script/actions/ln/request.ts b/src/extension/background-script/actions/ln/request.ts index 441d4066f0..ab6ffe4602 100644 --- a/src/extension/background-script/actions/ln/request.ts +++ b/src/extension/background-script/actions/ln/request.ts @@ -45,13 +45,12 @@ const request = async ( const connectorName = connector.constructor.name.toLowerCase(); // prefix method with webln to prevent potential naming conflicts (e.g. with nostr calls that also use the permissions) - const legacyWeblnMethod = `${WEBLN_PREFIX}${methodInLowerCase}`; const weblnMethod = `${WEBLN_PREFIX}${connectorName}/${methodInLowerCase}`; const permission = await db.permissions .where("host") .equalsIgnoreCase(origin.host) - .and((p) => p.method === legacyWeblnMethod || p.method === weblnMethod) + .and((p) => p.method === weblnMethod) .first(); // request method is allowed to be called @@ -66,6 +65,7 @@ const request = async ( ); return response; } else { + // throws an error if the user rejects const promptResponse = await utils.openPrompt<{ enabled: boolean; blocked: boolean; From d70bd5cd5a3d19b5d7cb9b919d70f234f70c678b Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 16 Jan 2023 20:58:55 +0100 Subject: [PATCH 062/123] chore: lowercase second word --- src/i18n/locales/en/translation.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 08ddd47742..c76eb4ec41 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -826,8 +826,8 @@ "permissions": { "nostr": { "getpublickey": "Read your public key.", - "nip04encrypt": "Encrypt Data.", - "nip04decrypt": "Decrypt Data.", + "nip04encrypt": "Encrypt data.", + "nip04decrypt": "Decrypt data.", "signmessage": "Sign message with your key." }, "commando": { From 5a3ceecd8087a5067a9a5fd785aee8f6b46f828b Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Mon, 16 Jan 2023 21:11:38 +0100 Subject: [PATCH 063/123] v1.24.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8626b4c67a..3aca624a00 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lightning-browser-extension", - "version": "1.23.0", + "version": "1.24.0", "description": "Lightning browser extension", "private": true, "repository": "https://github.com/bumi/lightning-browser-extension.git", From b4507e271a49caa512f205f1ca414ec343a58470 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 16 Jan 2023 19:47:32 +0100 Subject: [PATCH 064/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 1 - src/i18n/locales/de/translation.json | 5 +---- src/i18n/locales/eo/translation.json | 1 - src/i18n/locales/fi/translation.json | 1 - src/i18n/locales/it/translation.json | 1 - src/i18n/locales/nl/translation.json | 7 ------- src/i18n/locales/pt_BR/translation.json | 10 +--------- src/i18n/locales/sv/translation.json | 1 - src/i18n/locales/zh_Hans/translation.json | 7 ------- 9 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index cdfccac218..ae9067cc6a 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -577,7 +577,6 @@ "nostr": { "title": "", "allow": "", - "read_public_key": "", "block_and_ignore": "" } }, diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index d092f0eb45..ce55ab11aa 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -516,13 +516,10 @@ "title": "Nostr", "allow": "Erlaube dieser Website:", "content": "Auf dieser Website wirst du aufgefordert zu signieren:", - "read_public_key": "Lese deinen öffentlichen Schlüssel", "block_and_ignore": "Blockieren und Ignorieren von {{host}}", "block_added": "{{host}} zur Blockliste hinzugefügt, bitte lade deine Website neu.", "permissions": { - "decrypt": "Daten entschlüsseln", - "encrypt": "Daten verschlüsseln", - "allow_sign": "Erlaube {{host}} zu unterschreiben:" + "encrypt": "Daten verschlüsseln" } }, "confirm_request_permission": { diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index f0fbcfe84d..560bb7dc5c 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -577,7 +577,6 @@ "nostr": { "title": "Nostr", "allow": "", - "read_public_key": "", "block_and_ignore": "" } }, diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index 7387dd4bf6..4ffc87b6b6 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -577,7 +577,6 @@ "nostr": { "title": "Nostr", "allow": "Salli {{host}}:", - "read_public_key": "Lue julkinen avaimesi", "block_and_ignore": "Estä ja jätä huomiotta {{host}}" } }, diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index 82799219c1..3398d3e513 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -540,7 +540,6 @@ "nostr": { "title": "Nostr", "allow": "Consenti a {{host}} di:", - "read_public_key": "Leggere la propria chiave pubblica", "block_and_ignore": "Blocca e ignora {{host}}" }, "alby": { diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index 158b7b828e..d2d7ba0004 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -580,17 +580,10 @@ "title": "", "allow": "", "content": "", - "read_public_key": "", "block_and_ignore": "", "block_added": "", - "confirm_sign_message": { - "remember": { - "label": "" - } - }, "permissions": { "decrypt": "", - "encrypt": "", "allow_sign": "" } } diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index e573bc40cb..f74c5bcb37 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -577,18 +577,10 @@ "nostr": { "allow": "Permitir este site:", "block_and_ignore": "Bloquear e ignorar {{host}}", - "read_public_key": "Ler sua chave pública", "title": "Nostr", - "confirm_sign_message": { - "remember": { - "label": "Lembrar minha escolha e não perguntar novamente" - } - }, "content": "Este site solicita que você assine:", "permissions": { - "decrypt": "Descriptografar dados", - "encrypt": "Criptografar dados", - "allow_sign": "Permitir {{host}} assinar:" + "encrypt": "Criptografar dados" }, "block_added": "{{host}} adicionado na lista de bloqueio, por favor recarregue o site." }, diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index bff474c880..8203020b91 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -540,7 +540,6 @@ "nostr": { "title": "Nostr", "allow": "Tillåt {{host}} att:", - "read_public_key": "Visa din publika nyckel", "block_and_ignore": "Blockera och ignorera {{host}}" } }, diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 12ac685c84..d0f9e6e947 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -538,16 +538,9 @@ "nostr": { "title": "Nostr", "allow": "允许{{host}}进行:", - "read_public_key": "读取你的公钥", "block_and_ignore": "阻止并忽略 {{host}}", - "confirm_sign_message": { - "remember": { - "label": "记住,不要再问" - } - }, "permissions": { "allow_sign": "允许{{host}}签署:", - "decrypt": "解密数据", "encrypt": "加密数据" }, "content": "{{host}} 要求你签署:" From 7c91fddd41160cdc31538f839f824d7e874d7049 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 16 Jan 2023 20:59:09 +0100 Subject: [PATCH 065/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/de/translation.json | 5 +---- src/i18n/locales/nl/translation.json | 1 - src/i18n/locales/pt_BR/translation.json | 3 --- src/i18n/locales/zh_Hans/translation.json | 1 - 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index ce55ab11aa..032a3356b6 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -517,10 +517,7 @@ "allow": "Erlaube dieser Website:", "content": "Auf dieser Website wirst du aufgefordert zu signieren:", "block_and_ignore": "Blockieren und Ignorieren von {{host}}", - "block_added": "{{host}} zur Blockliste hinzugefügt, bitte lade deine Website neu.", - "permissions": { - "encrypt": "Daten verschlüsseln" - } + "block_added": "{{host}} zur Blockliste hinzugefügt, bitte lade deine Website neu." }, "confirm_request_permission": { "title": "Antrag genehmigen", diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index d2d7ba0004..6541f7570a 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -583,7 +583,6 @@ "block_and_ignore": "", "block_added": "", "permissions": { - "decrypt": "", "allow_sign": "" } } diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index f74c5bcb37..b84b2d70e9 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -579,9 +579,6 @@ "block_and_ignore": "Bloquear e ignorar {{host}}", "title": "Nostr", "content": "Este site solicita que você assine:", - "permissions": { - "encrypt": "Criptografar dados" - }, "block_added": "{{host}} adicionado na lista de bloqueio, por favor recarregue o site." }, "confirm_request_permission": { diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index d0f9e6e947..6151b2ea54 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -540,7 +540,6 @@ "allow": "允许{{host}}进行:", "block_and_ignore": "阻止并忽略 {{host}}", "permissions": { - "allow_sign": "允许{{host}}签署:", "encrypt": "加密数据" }, "content": "{{host}} 要求你签署:" From 729667fe74b175c7939aa1b2b3be39abf582b94e Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Mon, 16 Jan 2023 21:11:56 +0100 Subject: [PATCH 066/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/nl/translation.json | 5 +---- src/i18n/locales/zh_Hans/translation.json | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index 6541f7570a..3aa65d9d06 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -581,10 +581,7 @@ "allow": "", "content": "", "block_and_ignore": "", - "block_added": "", - "permissions": { - "allow_sign": "" - } + "block_added": "" } }, "common": { diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 6151b2ea54..df2061f719 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -539,9 +539,6 @@ "title": "Nostr", "allow": "允许{{host}}进行:", "block_and_ignore": "阻止并忽略 {{host}}", - "permissions": { - "encrypt": "加密数据" - }, "content": "{{host}} 要求你签署:" }, "lnurlpay": { From c75aedaf18155f5dc3fa3480774fd0d19fb81e25 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Tue, 17 Jan 2023 20:18:12 +0100 Subject: [PATCH 067/123] chore: use our lnc-web fork --- package.json | 2 +- src/extension/background-script/connectors/lnc.ts | 4 ++-- yarn.lock | 15 +++++++-------- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 0bb5ec030d..22007f7383 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "dependencies": { "@bitcoin-design/bitcoin-icons-react": "^0.1.9", "@headlessui/react": "^1.7.7", - "@lightninglabs/lnc-web": "^0.2.1-alpha", + "lnc-web": "git+https://github.com/bumi/lnc-web.git#remove-window-dependency", "@noble/secp256k1": "^1.7.0", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/line-clamp": "^0.4.2", diff --git a/src/extension/background-script/connectors/lnc.ts b/src/extension/background-script/connectors/lnc.ts index badd1c4e8c..41b05f2f45 100644 --- a/src/extension/background-script/connectors/lnc.ts +++ b/src/extension/background-script/connectors/lnc.ts @@ -1,10 +1,10 @@ -import LNC from "@lightninglabs/lnc-web"; -import { CredentialStore } from "@lightninglabs/lnc-web"; import Base64 from "crypto-js/enc-base64"; import Hex from "crypto-js/enc-hex"; import UTF8 from "crypto-js/enc-utf8"; import WordArray from "crypto-js/lib-typedarrays"; import SHA256 from "crypto-js/sha256"; +import LNC from "lnc-web"; +import { CredentialStore } from "lnc-web"; import snakeCase from "lodash.snakecase"; import { encryptData } from "~/common/lib/crypto"; import utils from "~/common/lib/utils"; diff --git a/yarn.lock b/yarn.lock index cbd12bd5a6..29fff718c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -943,14 +943,6 @@ resolved "https://registry.yarnpkg.com/@lightninglabs/lnc-core/-/lnc-core-0.2.1-alpha.tgz#b381ea29fb7bc20a7dd10334bb913bb50f6dac36" integrity sha512-H297V3seL+PE786HcuAQiSass/3y0NSYCy3b4hNTZL4Io80Oy4WY49s08CpRuV8cNfjAzWjYSXkhorALjaRdwA== -"@lightninglabs/lnc-web@^0.2.1-alpha": - version "0.2.1-alpha" - resolved "https://registry.yarnpkg.com/@lightninglabs/lnc-web/-/lnc-web-0.2.1-alpha.tgz#731d0938d34767cbd0fddf0b97d05cdd52ee9023" - integrity sha512-bKBUcGdhJUjAQ4G80RX5ygMDROPhg1VMkTIZXJDsOKfpdZ30YCng5bzdcaYigm4CmieONKnH/8JSF7hiF40/SQ== - dependencies: - "@lightninglabs/lnc-core" "0.2.1-alpha" - crypto-js "4.1.1" - "@mswjs/cookies@^0.2.2": version "0.2.2" resolved "https://registry.yarnpkg.com/@mswjs/cookies/-/cookies-0.2.2.tgz#b4e207bf6989e5d5427539c2443380a33ebb922b" @@ -6290,6 +6282,13 @@ listr2@^5.0.5: through "^2.3.8" wrap-ansi "^7.0.0" +"lnc-web@git+https://github.com/bumi/lnc-web.git#remove-window-dependency": + version "0.2.1-alpha" + resolved "git+https://github.com/bumi/lnc-web.git#0b312e8c131d6093a498bf5f4e4642196984ca1f" + dependencies: + "@lightninglabs/lnc-core" "0.2.1-alpha" + crypto-js "4.1.1" + lnmessage@^0.0.14: version "0.0.14" resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.14.tgz#0c9c96802ad61d0feceb9751b77f3195f7b7056a" From 8c2a16c9ee09d6b24602ceea22d16855d1fb715d Mon Sep 17 00:00:00 2001 From: Lukas Jakob Date: Wed, 18 Jan 2023 08:10:30 -0600 Subject: [PATCH 068/123] feat: add account menu avatars --- package.json | 1 + src/app/components/AccountMenu/index.tsx | 8 ++++---- yarn.lock | 12 ++++++++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 3aca624a00..113b438d07 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@noble/secp256k1": "^1.7.1", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/line-clamp": "^0.4.2", + "avvvatars-react": "^0.4.2", "axios": "^1.2.2", "bech32": "^2.0.0", "bolt11": "^1.4.0", diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index fa9526957d..675fec1d51 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -4,7 +4,7 @@ import { CheckIcon, PlusIcon, } from "@bitcoin-design/bitcoin-icons-react/filled"; -import { WalletIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; +import Avvvatars from "avvvatars-react"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import Skeleton from "react-loading-skeleton"; @@ -75,7 +75,7 @@ function AccountMenu({ showOptions = true }: Props) { return (

- +

- - + + {account.name}  {accountId === authAccount?.id && ( diff --git a/yarn.lock b/yarn.lock index 29afd1314b..e34bc419fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2347,6 +2347,13 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== +avvvatars-react@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/avvvatars-react/-/avvvatars-react-0.4.2.tgz#9569c16ae9a4925f898539ff98c6f734b6a4fe1b" + integrity sha512-D/bnSM+P6pQi71dFeFVqQsqmv+ct5XG7uO2lvJoiksALpXLd6kPgpRR1SUQxFZJkJNrkmg0NPgbhIgJgOsDYRQ== + dependencies: + goober "^2.1.8" + axios@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.2.tgz#72681724c6e6a43a9fea860fc558127dbe32f9f1" @@ -4794,6 +4801,11 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" +goober@^2.1.8: + version "2.1.11" + resolved "https://registry.yarnpkg.com/goober/-/goober-2.1.11.tgz#bbd71f90d2df725397340f808dbe7acc3118e610" + integrity sha512-5SS2lmxbhqH0u9ABEWq7WPU69a4i2pYcHeCxqaNq6Cw3mnrF0ghWNM4tEGid4dKy8XNIAUbuThuozDHHKJVh3A== + graceful-fs@^4.1.2, graceful-fs@^4.2.4: version "4.2.6" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz" From 296b48616e71b02a7311436a840667b9b11dea99 Mon Sep 17 00:00:00 2001 From: James Charlesworth <666455+jamescharlesworth@users.noreply.github.com> Date: Wed, 18 Jan 2023 17:39:36 -0500 Subject: [PATCH 069/123] feat(options): add closeable tab actions on Websites screen #1849 (#1892) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(options): add closeable tab actions on Websites screen #1849 * fix: typo * fix: dark mode * fix: typo * fix: adds demo link * fix: changes from pr comments * fix: tips component * fix: abstracts tips business logic for showing tips like firefox needed to be applied in other places such as publishers page. * fix: adds tests * fix: tips * fix: add tips back * fix: messaging * fix: messaging * fix: feedback * fix: target blank * fix: moved tips to discover * fix: e2e test * fix: e2e test * fix: adds extension icon * fix: inline image Adds Trans component and inlines image * fix: whitespace * fix: adds fragment replaces text with empty fragment per feedback * fix: closeTip renames filterTip to closeTip per comment * fix: comments puzzle for dark mode and noreferrer on link * fix: translation Co-authored-by: René Aaron Co-authored-by: René Aaron <100827540+reneaaron@users.noreply.github.com> --- .../components/CloseableCard/index.test.tsx | 23 ++++ src/app/components/CloseableCard/index.tsx | 44 +++++++ src/app/components/Tips/index.test.tsx | 32 +++++ src/app/components/Tips/index.tsx | 113 ++++++++++++++++++ src/app/context/SettingsContext.tsx | 4 +- src/app/hooks/useTips.test.ts | 56 +++++++++ src/app/hooks/useTips.ts | 34 ++++++ src/app/screens/Discover/index.tsx | 27 ++++- src/app/screens/Home/DefaultView/index.tsx | 6 +- src/app/screens/Publishers/index.test.tsx | 4 +- src/app/utils/index.ts | 14 +++ src/common/constants.ts | 7 ++ .../events/__test__/notifications.test.ts | 3 +- src/extension/background-script/state.ts | 1 + src/i18n/locales/en/translation.json | 28 ++++- src/types.ts | 5 +- static/assets/icons/puzzle.svg | 1 + tests/e2e/002-walletFeatures.spec.ts | 2 +- 18 files changed, 387 insertions(+), 17 deletions(-) create mode 100644 src/app/components/CloseableCard/index.test.tsx create mode 100644 src/app/components/CloseableCard/index.tsx create mode 100644 src/app/components/Tips/index.test.tsx create mode 100644 src/app/components/Tips/index.tsx create mode 100644 src/app/hooks/useTips.test.ts create mode 100644 src/app/hooks/useTips.ts create mode 100644 static/assets/icons/puzzle.svg diff --git a/src/app/components/CloseableCard/index.test.tsx b/src/app/components/CloseableCard/index.test.tsx new file mode 100644 index 0000000000..0bc0452546 --- /dev/null +++ b/src/app/components/CloseableCard/index.test.tsx @@ -0,0 +1,23 @@ +import { render, screen } from "@testing-library/react"; +import { MemoryRouter } from "react-router-dom"; + +import type { Props } from "./index"; +import CloseableCard from "./index"; + +const props: Props = { + title: "Card Title", + description: "Card description", + handleClose: () => ({}), +}; + +describe("CloseableCard", () => { + test("render label", async () => { + render( + + + + ); + + expect(await screen.findByText("Card Title")).toBeInTheDocument(); + }); +}); diff --git a/src/app/components/CloseableCard/index.tsx b/src/app/components/CloseableCard/index.tsx new file mode 100644 index 0000000000..8568444d5e --- /dev/null +++ b/src/app/components/CloseableCard/index.tsx @@ -0,0 +1,44 @@ +import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/filled"; + +export type Props = { + title: string; + description: string | JSX.Element | (JSX.Element | string)[]; + buttons?: JSX.Element[]; + handleClose: () => void; +}; + +export default function CloseableCard({ + title, + description, + buttons, + handleClose, +}: Props) { + const uiDescription = Array.isArray(description) ? ( +
    + {description.map((text, index) => ( +
  1. {text}
  2. + ))} +
+ ) : ( +

+ {description} +

+ ); + return ( +
+ +

{title}

+ + {uiDescription} + + {!!buttons?.length && ( +
{buttons}
+ )} +
+ ); +} diff --git a/src/app/components/Tips/index.test.tsx b/src/app/components/Tips/index.test.tsx new file mode 100644 index 0000000000..35a87ae5bf --- /dev/null +++ b/src/app/components/Tips/index.test.tsx @@ -0,0 +1,32 @@ +import Tips from "@components/Tips"; +import { render, screen } from "@testing-library/react"; +import { I18nextProvider } from "react-i18next"; +import { MemoryRouter } from "react-router-dom"; +import i18n from "~/../tests/unit/helpers/i18n"; +import { TIPS } from "~/common/constants"; + +jest.mock("~/app/hooks/useTips", () => ({ + useTips: () => ({ + tips: [TIPS.TOP_UP_WALLET, TIPS.PIN, TIPS.DEMO], + }), +})); + +describe("Tips", () => { + test("should have 3 tips", async () => { + render( + + + + + + ); + + expect( + await screen.findByText("⚡️ Top up your wallet") + ).toBeInTheDocument(); + expect( + await screen.findByText("📌 Pin your Alby extension") + ).toBeInTheDocument(); + expect(await screen.findByText("🕹️ Try out Alby Demo")).toBeInTheDocument(); + }); +}); diff --git a/src/app/components/Tips/index.tsx b/src/app/components/Tips/index.tsx new file mode 100644 index 0000000000..593933bbe2 --- /dev/null +++ b/src/app/components/Tips/index.tsx @@ -0,0 +1,113 @@ +import Button from "@components/Button"; +import CloseableCard from "@components/CloseableCard"; +import { Fragment } from "react"; +import { Trans, useTranslation } from "react-i18next"; +import { useNavigate } from "react-router-dom"; +import { useTips } from "~/app/hooks/useTips"; +import { TIPS } from "~/common/constants"; + +export default function Tips() { + const { t } = useTranslation("translation", { + keyPrefix: "discover.tips", + }); + + const navigate = useNavigate(); + + const { tips, closeTip } = useTips(); + + function hasTip(id: TIPS) { + return tips.includes(id); + } + + const tipElements = [] as JSX.Element[]; + + if (hasTip(TIPS.TOP_UP_WALLET)) { + tipElements.push( + closeTip(TIPS.TOP_UP_WALLET)} + title={t("top_up_wallet.title")} + description={t("top_up_wallet.description")} + buttons={[ +
-
- ); -} diff --git a/src/app/screens/Onboard/TestConnection/index.tsx b/src/app/screens/Onboard/TestConnection/index.tsx index 7f1946a9ce..990070a1aa 100644 --- a/src/app/screens/Onboard/TestConnection/index.tsx +++ b/src/app/screens/Onboard/TestConnection/index.tsx @@ -1,30 +1,19 @@ import Button from "@components/Button"; -import Card from "@components/Card"; import Loading from "@components/Loading"; import React, { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; -import { useSettings } from "~/app/context/SettingsContext"; import api from "~/common/lib/api"; import msg from "~/common/lib/msg"; -import type { AccountInfo } from "~/types"; +import utils from "~/common/lib/utils"; export default function TestConnection() { - const [accountInfo, setAccountInfo] = useState<{ - alias: AccountInfo["alias"]; - name: AccountInfo["name"]; - balance: AccountInfo["balance"]; - currency: AccountInfo["currency"]; - }>(); const [errorMessage, setErrorMessage] = useState(""); const [loading, setLoading] = useState(false); - const { getFormattedInCurrency } = useSettings(); - const { t } = useTranslation("translation", { keyPrefix: "welcome.test_connection", }); - const { t: tCommon } = useTranslation("common"); const navigate = useNavigate(); @@ -38,15 +27,14 @@ export default function TestConnection() { const timer = setTimeout(() => { setErrorMessage(t("connection_taking_long")); }, 45000); + try { const response = await api.getAccountInfo(); - const name = response.name; - const { alias } = response.info; - const { balance: resBalance, currency } = response.balance; - const balance = - typeof resBalance === "number" ? resBalance : parseInt(resBalance); - - setAccountInfo({ alias, balance, name, currency }); + if (response.name && response.info.alias) { + utils.redirectPage("options.html#/discover"); + } else { + setErrorMessage(t("connection_error")); + } } catch (e) { const message = e instanceof Error ? `(${e.message})` : ""; console.error(message); @@ -90,41 +78,6 @@ export default function TestConnection() {
)} - {accountInfo && accountInfo.alias && ( -
- )} - {loading && (
diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index 032a3356b6..b9fe040761 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -7,27 +7,6 @@ "connect": "Ihr Lightning Konto", "done": "Fertig" }, - "intro": { - "send": { - "title": "Senden mit einem Klick", - "description": "Alle Lightning Transaktionen direkt in Deinem Browser ausführen. Keine umständlichen Testenkombinationen oder QR-Code scannen mehr nötig." - }, - "paywall": { - "title": "Keine lästigen Paywalls mehr", - "description": "Definieren Sie individuelle Budgets für Websites, um nahtlose Zahlungsströme zu ermöglichen. Keine lästigen Paywalls mehr." - }, - "privacy": { - "title": "Datenschutz an erster Stelle", - "description": "Verwende Lightning, um dich zu authentifizieren und deine Privatsphäre zu kontrollieren." - }, - "foss": { - "title": "Kostenlos und Open Source", - "description": "Vollständig offener Code, der von jedermann überprüft werden kann. Keine Statistiken oder Tracker. Du hast die Kontrolle." - }, - "actions": { - "get_started": "Beginne" - } - }, "set_password": { "title": "Passwort zum Entsperren festlegen", "description": "Die Daten deines Lightning-Kontos sind mit einem Freischalt-Passwort sicher verschlüsselt. Vergesse das Passwort nicht! Du benötigst es, um die Alby-Erweiterung zu entsperren (in diesem Browser)", diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 8526edbd7a..08c5b032c7 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -1,36 +1,16 @@ { "translation": { "welcome": { + "title": "Welcome to Alby", "nav": { "welcome": "Welcome", "password": "Your Password", "connect": "Your Lightning Account", "done": "Done" }, - "intro": { - "send": { - "title": "Send in One Click", - "description": "Lightning transactions happen all in your browser. No alt+tab or QR-code scanning needed." - }, - "paywall": { - "title": "No more annoying paywalls", - "description": "Define individual budgets for websites to enable seamless payment streams. No more annoying paywalls." - }, - "privacy": { - "title": "Privacy first", - "description": "Use lightning to authenticate and control your privacy." - }, - "foss": { - "title": "Free and Open Source", - "description": "Completely open code that can be audited by anyone. No stats or trackers. You are in control." - }, - "actions": { - "get_started": "Get Started" - } - }, "set_password": { "title": "Set an unlock password", - "description": "Your lightning account data is securely encrypted with an unlock password. Do not forget this password! You need it to unlock the Alby Extension (in this browser)", + "description": "This password is used to protect your wallet and provide access to the browser extension. It cannot be reset and is separate from your Alby account password.", "choose_password": { "label": "Choose an unlock password:" }, @@ -45,8 +25,6 @@ }, "test_connection": { "ready": "Awesome, you’re ready to go!", - "tutorial": "Now you’ve connected your wallet would you like to go through a tutorial?", - "try_tutorial": "Give it a try now", "initializing": "Initializing your account. Please wait, this can take a minute...", "connection_error": "Connection Error", "review_connection_details": "Please review your connection details.", diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index 4ffc87b6b6..deb8addea6 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -7,27 +7,6 @@ "connect": "Lightning-tilisi", "done": "Tehty" }, - "intro": { - "send": { - "title": "Lähetä yhdellä napsautuksella", - "description": "Lightning-transaktiot tapahtuvat selaimessasi. Alt+tab tai QR-koodin skannausta ei tarvita." - }, - "paywall": { - "title": "Ei enää ärsyttäviä maksumuureja", - "description": "Määrittele verkkosivustoille omat budjetit, jotta maksuvirrat ovat saumattomia. Ei enää ärsyttäviä maksumuureja." - }, - "privacy": { - "title": "Yksityisyys ensin", - "description": "Käytä Lightningia todentamiseen ja yksityisyyden hallintaan." - }, - "foss": { - "title": "Ilmainen ja avoin lähdekoodi", - "description": "Täysin avoin koodi, jonka kuka tahansa voi tarkastaa. Ei tilastoja tai jäljittimiä. Sinä hallitset." - }, - "actions": { - "get_started": "Aloita" - } - }, "set_password": { "title": "Aseta lukituksen avaussalasana", "description": "Lightning-tilisi tiedot on salattu turvallisesti salasanan avulla. Älä unohda tätä salasanaa! Tarvitset sitä avataksesi Alby-laajennuksen lukituksen (tässä selaimessa)", diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index 3398d3e513..0459f17ce4 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -7,27 +7,6 @@ "connect": "Il tuo Account Lightning", "done": "Fatto" }, - "intro": { - "send": { - "title": "Invia in un Click", - "description": "Le transazioni Lightning avvengono direttamente nel tuo browser. Niente più alt+tab o scansioni di QR necessari." - }, - "paywall": { - "title": "Niente più fastidiosi paywall", - "description": "Definisci budget individuali per creare flussi di pagamento ai siti web. Basta noiosi paywalls." - }, - "privacy": { - "title": "La privacy prima di tutto", - "description": "Usa Lightning per autenticarti e mantenere la tua privacy." - }, - "foss": { - "title": "Gratuito e Open Source", - "description": "Codice completamente aperto che può essere controllato da chiunque. Nessuna statistica o tracker. Sei tu ad avere il controllo." - }, - "actions": { - "get_started": "Inizia subito" - } - }, "set_password": { "title": "Imposta una password di sblocco", "description": "I dati del tuo account lightning sono crittografati in modo sicuro con una password di sblocco. Non dimenticare questa password! Ti serve per sbloccare l'estensione Alby (in questo browser)", diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index 8203020b91..badb69aab4 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -7,27 +7,6 @@ "connect": "Ditt Lightning-konto", "done": "Klar" }, - "intro": { - "send": { - "title": "Skicka med ett klick", - "description": "Lightning-överföringar sker direkt i din webbläsare. Inget behov av att alt-tabba eller skanna QR-koder." - }, - "paywall": { - "title": "Inga fler irriterande betalväggar", - "description": "Ange beloppsgränser för specifika webbplatser för att förenkla betalning. Inga fler irriterande betalväggar." - }, - "privacy": { - "title": "Integritet främst", - "description": "Använd lightning för autentisering och behåll din integritet." - }, - "foss": { - "title": "Fri och öppen källkod", - "description": "Helt öppen källkod som kan granskas och verifieras av vem som helst. Ingen statistik eller spår. Du har full kontroll." - }, - "actions": { - "get_started": "Kom igång" - } - }, "set_password": { "title": "Ange ett lösenord för upplåsning", "description": "Ditt Lightning-konto är krypterat med ett lösenord för upplåsning. Glöm inte detta lösenord! Du behöver lösenordet för att kunna låsa upp Alby-tillägget (i denna webbläsare)", diff --git a/src/i18n/locales/tl/translation.json b/src/i18n/locales/tl/translation.json index dcb61a33a6..8a799e9a81 100644 --- a/src/i18n/locales/tl/translation.json +++ b/src/i18n/locales/tl/translation.json @@ -7,27 +7,6 @@ "connect": "", "done": "" }, - "intro": { - "send": { - "title": "", - "description": "" - }, - "paywall": { - "title": "", - "description": "" - }, - "privacy": { - "title": "", - "description": "" - }, - "foss": { - "title": "", - "description": "" - }, - "actions": { - "get_started": "" - } - }, "set_password": { "title": "", "description": "", diff --git a/tests/e2e/001-createWallets.spec.ts b/tests/e2e/001-createWallets.spec.ts index dcf793c72b..7853175225 100644 --- a/tests/e2e/001-createWallets.spec.ts +++ b/tests/e2e/001-createWallets.spec.ts @@ -28,17 +28,8 @@ const commonCreateWalletUserCreate = async ( }> => { const { page, browser } = await loadExtension(); - // get document from welcome page + // get document from onboard page const $document = await getDocument(page); - - // go through welcome page - const startedButton = await getByText($document, "Get Started"); - startedButton.click(); - - await Promise.all([ - page.waitForNavigation(), // The promise resolves after navigation has finished - ]); - await findByText($document, "Set an unlock password"); // type user password and confirm password @@ -86,14 +77,19 @@ const commonCreateWalletUserCreate = async ( const commonCreateWalletSuccessCheck = async ({ page, $document }) => { // submit form const continueButton = await findByText($document, "Continue"); - continueButton.click(); + continueButton.click(), + // options.html + await Promise.all([ + page.waitForNavigation(), // The promise resolves after navigation has finished + ]); + // options.html#publishers await Promise.all([ - page.waitForResponse(() => true), page.waitForNavigation(), // The promise resolves after navigation has finished ]); - await findByText($document, "Success", undefined, { timeout: 15000 }); + const $optionsdocument = await getDocument(page); + await findByText($optionsdocument, "Explore the Lightning ⚡️ Ecosystem"); }; test.describe("Create or connect wallets", () => { @@ -226,7 +222,6 @@ test.describe("Create or connect wallets", () => { await runeField.type(rune); await commonCreateWalletSuccessCheck({ page, $document }); - await browser.close(); }); From 570e62c866447dd2b9bb1fa58ab2b55a97a4a7bf Mon Sep 17 00:00:00 2001 From: Leonardo Date: Tue, 17 Jan 2023 14:10:47 +0000 Subject: [PATCH 073/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 86.8% (402 of 463 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 26 ++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index b84b2d70e9..923136b6cc 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -579,7 +579,8 @@ "block_and_ignore": "Bloquear e ignorar {{host}}", "title": "Nostr", "content": "Este site solicita que você assine:", - "block_added": "{{host}} adicionado na lista de bloqueio, por favor recarregue o site." + "block_added": "{{host}} adicionado na lista de bloqueio, por favor recarregue o site.", + "allow_sign": "Permitir {{host}} assinar:" }, "confirm_request_permission": { "title": "Aprovar Solicitação", @@ -588,12 +589,13 @@ }, "discover": { "title": "Explore o ecossistema ⚡️", - "description": "Sites onde você já usou a Alby", + "description": "Sites onde você pode usar a Alby", "list": { "trading": "Negociação", "gaming": "Jogos", "entertaiment": "Entretenimento", - "shopping": "Compras" + "shopping": "Compras", + "miscellaneous": "Outros" } }, "choose_path": { @@ -603,9 +605,9 @@ "title": "Alby" }, "other": { - "title": "Outras carteiras", + "title": "Outras Carteiras", "and_more": "& mais...", - "description": "Conecte-se em sua carteira bitcoin ou escolha um dos vários servidores de carteira suportados.", + "description": "Conecte-se em sua carteira bitcoin ou em um dos vários servidores de carteira suportados.", "connect": "Conectar" }, "description": "Você pode usar Alby, criando uma conta conosco ou conectando-se à sua própria carteira bitcoin.", @@ -688,7 +690,8 @@ "remove": "Remover", "copy": "Copiar", "back": "Voltar", - "log_in": "Logar" + "log_in": "Logar", + "remember": "Lembrar minha escolha e não perguntar novamente" }, "errors": { "connection_failed": "Falha na conexão", @@ -718,7 +721,8 @@ "enable_login": { "title": "Login Relâmpago", "subtitle": "O login é realizado de forma automática, sem necessidade de confirmação." - } + }, + "edit_permissions": "Editar Permissões" }, "qrcode_scanner": { "title": "Ler Código QR", @@ -794,5 +798,13 @@ "auth": "LOGIN RELÂMPAGO" } } + }, + "permissions": { + "nostr": { + "getpublickey": "Ler sua chave pública.", + "signmessage": "Assinar mensagem com sua chave.", + "nip04decrypt": "Descriptografar dados.", + "nip04encrypt": "Criptografar dados." + } } } From 15a494297c792067c004b4813bca0164a74fbc79 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Wed, 18 Jan 2023 23:49:44 +0000 Subject: [PATCH 074/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 83.9% (402 of 479 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 923136b6cc..a1602a3163 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -500,7 +500,7 @@ "used_budget": "sats usados" } }, - "title": "Sua lista de sites ⚡️", + "title": "Sua lista de Sites ⚡️", "description": "Sites onde você já usou a Alby", "no_info": "Nenhum site ainda.", "discover": "Descubra Sites" From ca7e4fdf9cebc7f690fadf43b9fd4fd36db23be9 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 19 Jan 2023 00:51:48 +0100 Subject: [PATCH 075/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 8 -------- src/i18n/locales/de/translation.json | 2 -- src/i18n/locales/eo/translation.json | 8 -------- src/i18n/locales/es/translation.json | 8 -------- src/i18n/locales/fi/translation.json | 1 - src/i18n/locales/hi/translation.json | 12 ++---------- src/i18n/locales/it/translation.json | 1 - src/i18n/locales/nl/translation.json | 8 -------- src/i18n/locales/pt_BR/translation.json | 8 -------- src/i18n/locales/sv/translation.json | 1 - src/i18n/locales/tl/translation.json | 1 - src/i18n/locales/zh_Hans/translation.json | 13 ++----------- 12 files changed, 4 insertions(+), 67 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index ae9067cc6a..7adc049682 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -9,23 +9,16 @@ }, "intro": { "send": { - "title": "", "description": "" }, "paywall": { - "title": "", "description": "" }, "privacy": { - "title": "", "description": "" }, "foss": { - "title": "", "description": "" - }, - "actions": { - "get_started": "" } }, "set_password": { @@ -45,7 +38,6 @@ }, "test_connection": { "ready": "", - "tutorial": "", "try_tutorial": "", "initializing": "", "connection_error": "", diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index b9fe040761..a355d3524b 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -23,13 +23,11 @@ } }, "test_connection": { - "try_tutorial": "Probiere es jetzt aus", "review_connection_details": "Bitte überprüfe deine Verbindungsdaten.", "actions": { "delete_edit_account": "Ungültiges Konto löschen und erneut bearbeiten" }, "ready": "Super, du hast es geschafft, es kann losgehen!", - "tutorial": "Du hast jetzt deine Wallet verbunden, möchtest du ein Tutorial starten?", "initializing": "Dein Account wird initialisiert. Bitte warte, das kann ein wenig dauern.", "connection_error": "Verbindungsfehler", "connection_taking_long": "Das Verbinden dauert länger als erwartet...sind deine Angaben richtig? Ist dein Node erreichbar?", diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index 560bb7dc5c..989d0ee943 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -9,23 +9,16 @@ }, "intro": { "send": { - "title": "Sendi per unu alklako", "description": "" }, "paywall": { - "title": "", "description": "" }, "privacy": { - "title": "Privateco unue", "description": "" }, "foss": { - "title": "Libera kaj malfermitkoda", "description": "" - }, - "actions": { - "get_started": "Komenci" } }, "set_password": { @@ -45,7 +38,6 @@ }, "test_connection": { "ready": "Bonege, ĉio pretas!", - "tutorial": "", "try_tutorial": "Ekprovi nun", "initializing": "", "connection_error": "Konekta eraro", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 833d28a3c7..093c20abe2 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -9,23 +9,16 @@ }, "intro": { "send": { - "title": "Enviar en un Click", "description": "Las transacciones de lightning ocurren en su navegador. No se necesita alt+tab ni escaneo de códigos QR." }, "paywall": { - "title": "No más molestos muros de pago", "description": "Defina presupuestos individuales para sitios web para permitir flujos de pago sin interrupciones. No más molestos muros de pago." }, "privacy": { - "title": "Privacidad primero", "description": "Utilice lightning para autenticarse y controlar su privacidad." }, "foss": { - "title": "Gratis y de Código Abierto", "description": "Código completamente abierto que puede ser auditado por cualquier persona. Sin estadísticas ni rastreadores. Tú tienes el control." - }, - "actions": { - "get_started": "Comience" } }, "set_password": { @@ -45,7 +38,6 @@ }, "test_connection": { "ready": "¡Impresionante, estás listo para comenzar!", - "tutorial": "Ahora que ha conectado su billetera, ¿le gustaría realizar un tutorial?", "try_tutorial": "Pruébalo ahora", "initializing": "Inicializando su cuenta. Por favor, espere, esto puede tardar un minuto...", "connection_error": "Error de Conexión", diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index deb8addea6..063632924d 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "Mahtavaa, olet valmis menemään!", - "tutorial": "Nyt kun olet yhdistänyt lompakkosi, haluaisitko käydä läpi opastuksen?", "try_tutorial": "Kokeile sitä nyt", "initializing": "Tilin alustaminen. Odota, tämä voi kestää hetken...", "connection_error": "Yhteysvirhe", diff --git a/src/i18n/locales/hi/translation.json b/src/i18n/locales/hi/translation.json index fcea7d4742..d36c7e1402 100644 --- a/src/i18n/locales/hi/translation.json +++ b/src/i18n/locales/hi/translation.json @@ -3,23 +3,16 @@ "welcome": { "intro": { "send": { - "title": "एक क्लिक में भेजें", "description": "लाइटनिंगल लेनदेन आपके ब्राउज़र में होता है | alt+tab या QR-कोड स्कैन करने की आवश्यकता नहीं|" }, "paywall": { - "title": "अब और झंझट वाले paywalls नहीं", "description": "वेबसाइटों के लिए व्यक्तिगत खर्चा निर्धारित करें जिससे पायें निर्बाध भुगतान धाराएँ| और ज्यादा झंझट वाली paywalls नहीं|" }, - "actions": { - "get_started": "शुरू करें" - }, "privacy": { - "title": "गोपनीयता पहले", - "description": "लाइटनिंग का प्रयोग गोपनीयता को प्रमाणित एवं नियंत्रित करने के लिए |" + "title": "गोपनीयता पहले" }, "foss": { - "description": "पूर्णतः ओपन कोड जोकि किसी के भी द्वारा लेखा परीक्षित किया जा सके| किसी भी प्रकार के आंकडें या trackers नहीं | आप पूरी तरह नियंत्रण में |", - "title": "निशुल्क एवं ओपन सोर्स" + "description": "पूर्णतः ओपन कोड जोकि किसी के भी द्वारा लेखा परीक्षित किया जा सके| किसी भी प्रकार के आंकडें या trackers नहीं | आप पूरी तरह नियंत्रण में |" } }, "nav": { @@ -44,7 +37,6 @@ } }, "test_connection": { - "tutorial": "अब आप अपना वॉलेट कनेक्ट कर चुके हैं क्या आप एक ट्यूटोरियल के माध्यम से जाना चाहेंगे?", "try_tutorial": "इसे अभी आज़माएं", "initializing": "आपका खाता प्रारंभ किया जा रहा है। कृपया प्रतीक्षा करें, इसमें कुछ मिनट लग सकतें है...", "connection_error": "संपर्क त्रुटि", diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index 0459f17ce4..c4379ad03d 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "Fantastico, sei pronto per partire!", - "tutorial": "Ora che hai collegato il tuo portafoglio ti piacerebbe seguire un tutorial?", "try_tutorial": "Provalo ora", "initializing": "Stiamo inizializzando il tuo account. Per favore attendi, questa operazione potrebbe impiegare alcuni minuti…", "connection_error": "Errore di connessione", diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index 3aa65d9d06..0b0990e852 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -9,23 +9,16 @@ }, "intro": { "send": { - "title": "Verstuur in één klik", "description": "Lightning transacties gebeuren in je browser. Geen alt+tab of QR-code scan nodig." }, "paywall": { - "title": "Geen vervelende paywalls meer", "description": "Definieer individuele budgetten voor websites om naadloze betalingsstromen mogelijk te maken. Geen vervelende paywalls meer." }, "privacy": { - "title": "Privacy voorop", "description": "Gebruik Lightning om te verifiëren en controle te houden over je privacy." }, "foss": { - "title": "Gratis en Open Source", "description": "Volledig transparante open code. Geen statistieken of trackers. Jij hebt de controle." - }, - "actions": { - "get_started": "Begin Nu" } }, "set_password": { @@ -45,7 +38,6 @@ }, "test_connection": { "ready": "Geweldig, klaar om te starten!", - "tutorial": "Nu je Lightning wallet is geconnect, wil je een tutorial doorlopen?", "try_tutorial": "Probeer nu", "initializing": "Uw account wordt geïnitialiseerd. Even geduld, dit kan even duren...", "connection_error": "Connectie Error", diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index a1602a3163..f0bce97ccf 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -9,23 +9,16 @@ }, "intro": { "send": { - "title": "Clicou pagou", "description": "Realize pagamentos enquanto você navega na web" }, "paywall": { - "title": "Chega de paywalls irritantes", "description": "Habilite pagamentos automáticos e estabeleça limites de gastos personalizados para cada site." }, "privacy": { - "title": "Privacidade", "description": "Use a rede relâmpago do bitcoin para autenticar em sites e tenha controle sobre sua privacidade." }, "foss": { - "title": "Gratuito e de código aberto", "description": "Código completamente aberto e que pode ser auditado por qualquer pessoa. Sem estatísticas ou rastreadores. Você está no controle." - }, - "actions": { - "get_started": "Começar" } }, "set_password": { @@ -45,7 +38,6 @@ }, "test_connection": { "ready": "Perfeito, tudo configurado!", - "tutorial": "Agora que você já conectou a carteira, gostaria de ler o tutorial?", "try_tutorial": "Experimente agora", "initializing": "Iniciando sua conta. Aguarde, pode demorar um pouco...", "connection_error": "Erro de conexão", diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index badb69aab4..4a5f5ccce5 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "Fantastiskt, du är redo att börja!", - "tutorial": "Nu när du anslutit din plånbok, vill du gå igenom en guide?", "try_tutorial": "Prova genast", "initializing": "Initialiserar ditt konto. Vänta, det kan ta någon minut...", "connection_error": "Anslutningsfel", diff --git a/src/i18n/locales/tl/translation.json b/src/i18n/locales/tl/translation.json index 8a799e9a81..0c076475e2 100644 --- a/src/i18n/locales/tl/translation.json +++ b/src/i18n/locales/tl/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "", - "tutorial": "", "try_tutorial": "", "initializing": "", "connection_error": "", diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index df2061f719..d67fd3f4ae 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -9,23 +9,16 @@ }, "intro": { "paywall": { - "title": "不再有恼人的付费墙", "description": "为网站定义个人预算,实现无缝支付流。不再有恼人的付费墙。" }, "privacy": { - "description": "用闪电认证并控制你的隐私。", "title": "隐私第一" }, - "actions": { - "get_started": "开始" - }, "foss": { - "title": "自由开放源码软件", - "description": "完全开放的代码,任何人都可以进行审计。没有数据统计或跟踪器。一切由你掌控。" + "title": "自由开放源码软件" }, "send": { - "title": "一键发送", - "description": "闪电交易全部发生在你的浏览器中。不需要alt+tab或扫描二维码。" + "title": "一键发送" } }, "set_password": { @@ -45,10 +38,8 @@ }, "test_connection": { "ready": "真棒,你已准备就绪!", - "try_tutorial": "现在就试试看", "initializing": "正在初始化你的账户。请耐心等待,可能需要几分钟。。。", "connection_error": "连接错误", - "tutorial": "现在你已经连接了你的钱包,你想通过教程吗?", "review_connection_details": "请检查你的连接详情。", "connection_taking_long": "尝试连接花费的时间不预期的要长。。。你的详情正确吗?你的节点是否可达?", "contact_support": "如果你需要帮助,请联系support@getalby.com", From 57e4f9e4eff5a181623b698a1c1a0e56bc8c53f3 Mon Sep 17 00:00:00 2001 From: Lukas Jakob Date: Wed, 18 Jan 2023 18:26:16 -0600 Subject: [PATCH 076/123] feat: prevent icon shrink --- src/app/components/AccountMenu/index.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 675fec1d51..79eee6ce58 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -74,9 +74,9 @@ function AccountMenu({ showOptions = true }: Props) { return (
-

- -

+
+ +
- +
+ +
{account.name}  {accountId === authAccount?.id && ( From 89945913a2119dda0d0a33184ac82db268af939b Mon Sep 17 00:00:00 2001 From: Lukas Jakob Date: Wed, 18 Jan 2023 18:35:50 -0600 Subject: [PATCH 077/123] feat: screen accounts add avatar --- src/app/screens/Accounts/index.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/app/screens/Accounts/index.tsx b/src/app/screens/Accounts/index.tsx index 7bcc74fb05..ce4b037831 100644 --- a/src/app/screens/Accounts/index.tsx +++ b/src/app/screens/Accounts/index.tsx @@ -1,7 +1,6 @@ import { EllipsisIcon, PlusIcon, - WalletIcon, } from "@bitcoin-design/bitcoin-icons-react/filled"; import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; import Button from "@components/Button"; @@ -9,6 +8,7 @@ import Container from "@components/Container"; import Loading from "@components/Loading"; import Menu from "@components/Menu"; import TextField from "@components/form/TextField"; +import Avvvatars from "avvvatars-react"; import type { FormEvent } from "react"; import { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -131,8 +131,12 @@ function AccountsScreen() {
-
- +
+

From 8c8bf82b712eb1bb2166bb77cc23b1b1d6d456d7 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 19 Jan 2023 12:11:18 +0100 Subject: [PATCH 078/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 7 ------- src/i18n/locales/eo/translation.json | 7 ------- src/i18n/locales/es/translation.json | 7 ------- src/i18n/locales/fi/translation.json | 1 - src/i18n/locales/hi/translation.json | 7 ------- src/i18n/locales/it/translation.json | 1 - src/i18n/locales/nl/translation.json | 7 ------- src/i18n/locales/pt_BR/translation.json | 7 ------- src/i18n/locales/sv/translation.json | 1 - src/i18n/locales/tl/translation.json | 1 - src/i18n/locales/zh_Hans/translation.json | 6 ------ 11 files changed, 52 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index 7adc049682..c43d9a73e1 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -8,15 +8,9 @@ "done": "" }, "intro": { - "send": { - "description": "" - }, "paywall": { "description": "" }, - "privacy": { - "description": "" - }, "foss": { "description": "" } @@ -38,7 +32,6 @@ }, "test_connection": { "ready": "", - "try_tutorial": "", "initializing": "", "connection_error": "", "review_connection_details": "", diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index 989d0ee943..4a6789b70d 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -8,15 +8,9 @@ "done": "Farite" }, "intro": { - "send": { - "description": "" - }, "paywall": { "description": "" }, - "privacy": { - "description": "" - }, "foss": { "description": "" } @@ -38,7 +32,6 @@ }, "test_connection": { "ready": "Bonege, ĉio pretas!", - "try_tutorial": "Ekprovi nun", "initializing": "", "connection_error": "Konekta eraro", "review_connection_details": "", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 093c20abe2..63fbb406ec 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -8,15 +8,9 @@ "done": "Hecho" }, "intro": { - "send": { - "description": "Las transacciones de lightning ocurren en su navegador. No se necesita alt+tab ni escaneo de códigos QR." - }, "paywall": { "description": "Defina presupuestos individuales para sitios web para permitir flujos de pago sin interrupciones. No más molestos muros de pago." }, - "privacy": { - "description": "Utilice lightning para autenticarse y controlar su privacidad." - }, "foss": { "description": "Código completamente abierto que puede ser auditado por cualquier persona. Sin estadísticas ni rastreadores. Tú tienes el control." } @@ -38,7 +32,6 @@ }, "test_connection": { "ready": "¡Impresionante, estás listo para comenzar!", - "try_tutorial": "Pruébalo ahora", "initializing": "Inicializando su cuenta. Por favor, espere, esto puede tardar un minuto...", "connection_error": "Error de Conexión", "review_connection_details": "Revise los detalles de su conexión.", diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index 063632924d..a630f62f76 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "Mahtavaa, olet valmis menemään!", - "try_tutorial": "Kokeile sitä nyt", "initializing": "Tilin alustaminen. Odota, tämä voi kestää hetken...", "connection_error": "Yhteysvirhe", "review_connection_details": "Ole hyvä ja tarkista yhteystietosi.", diff --git a/src/i18n/locales/hi/translation.json b/src/i18n/locales/hi/translation.json index d36c7e1402..1fe14ac9b1 100644 --- a/src/i18n/locales/hi/translation.json +++ b/src/i18n/locales/hi/translation.json @@ -2,15 +2,9 @@ "translation": { "welcome": { "intro": { - "send": { - "description": "लाइटनिंगल लेनदेन आपके ब्राउज़र में होता है | alt+tab या QR-कोड स्कैन करने की आवश्यकता नहीं|" - }, "paywall": { "description": "वेबसाइटों के लिए व्यक्तिगत खर्चा निर्धारित करें जिससे पायें निर्बाध भुगतान धाराएँ| और ज्यादा झंझट वाली paywalls नहीं|" }, - "privacy": { - "title": "गोपनीयता पहले" - }, "foss": { "description": "पूर्णतः ओपन कोड जोकि किसी के भी द्वारा लेखा परीक्षित किया जा सके| किसी भी प्रकार के आंकडें या trackers नहीं | आप पूरी तरह नियंत्रण में |" } @@ -37,7 +31,6 @@ } }, "test_connection": { - "try_tutorial": "इसे अभी आज़माएं", "initializing": "आपका खाता प्रारंभ किया जा रहा है। कृपया प्रतीक्षा करें, इसमें कुछ मिनट लग सकतें है...", "connection_error": "संपर्क त्रुटि", "review_connection_details": "कृपया अपने कनेक्शन विवरण की समीक्षा करें।", diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index c4379ad03d..c053e712a8 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "Fantastico, sei pronto per partire!", - "try_tutorial": "Provalo ora", "initializing": "Stiamo inizializzando il tuo account. Per favore attendi, questa operazione potrebbe impiegare alcuni minuti…", "connection_error": "Errore di connessione", "review_connection_details": "Controlla i dettagli della tua connessione.", diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index 0b0990e852..e6a3561bdf 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -8,15 +8,9 @@ "done": "Klaar" }, "intro": { - "send": { - "description": "Lightning transacties gebeuren in je browser. Geen alt+tab of QR-code scan nodig." - }, "paywall": { "description": "Definieer individuele budgetten voor websites om naadloze betalingsstromen mogelijk te maken. Geen vervelende paywalls meer." }, - "privacy": { - "description": "Gebruik Lightning om te verifiëren en controle te houden over je privacy." - }, "foss": { "description": "Volledig transparante open code. Geen statistieken of trackers. Jij hebt de controle." } @@ -38,7 +32,6 @@ }, "test_connection": { "ready": "Geweldig, klaar om te starten!", - "try_tutorial": "Probeer nu", "initializing": "Uw account wordt geïnitialiseerd. Even geduld, dit kan even duren...", "connection_error": "Connectie Error", "review_connection_details": "Controleer uw verbindingsgegevens.", diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index f0bce97ccf..bc6dfc8b59 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -8,15 +8,9 @@ "done": "Feito" }, "intro": { - "send": { - "description": "Realize pagamentos enquanto você navega na web" - }, "paywall": { "description": "Habilite pagamentos automáticos e estabeleça limites de gastos personalizados para cada site." }, - "privacy": { - "description": "Use a rede relâmpago do bitcoin para autenticar em sites e tenha controle sobre sua privacidade." - }, "foss": { "description": "Código completamente aberto e que pode ser auditado por qualquer pessoa. Sem estatísticas ou rastreadores. Você está no controle." } @@ -38,7 +32,6 @@ }, "test_connection": { "ready": "Perfeito, tudo configurado!", - "try_tutorial": "Experimente agora", "initializing": "Iniciando sua conta. Aguarde, pode demorar um pouco...", "connection_error": "Erro de conexão", "review_connection_details": "Revise os detalhes da conexão.", diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index 4a5f5ccce5..916a599c9f 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "Fantastiskt, du är redo att börja!", - "try_tutorial": "Prova genast", "initializing": "Initialiserar ditt konto. Vänta, det kan ta någon minut...", "connection_error": "Anslutningsfel", "review_connection_details": "Se över dina anslutningsinställningar.", diff --git a/src/i18n/locales/tl/translation.json b/src/i18n/locales/tl/translation.json index 0c076475e2..0e0aaa20c6 100644 --- a/src/i18n/locales/tl/translation.json +++ b/src/i18n/locales/tl/translation.json @@ -24,7 +24,6 @@ }, "test_connection": { "ready": "", - "try_tutorial": "", "initializing": "", "connection_error": "", "review_connection_details": "", diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index d67fd3f4ae..5a0a2c6916 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -8,15 +8,9 @@ "connect": "你的闪电账户" }, "intro": { - "paywall": { - "description": "为网站定义个人预算,实现无缝支付流。不再有恼人的付费墙。" - }, "privacy": { "title": "隐私第一" }, - "foss": { - "title": "自由开放源码软件" - }, "send": { "title": "一键发送" } From 38c711a490576bdfd083a740466a9e8585b33583 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 19 Jan 2023 12:11:45 +0100 Subject: [PATCH 079/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 3 --- src/i18n/locales/eo/translation.json | 3 --- src/i18n/locales/es/translation.json | 3 --- src/i18n/locales/hi/translation.json | 3 --- src/i18n/locales/nl/translation.json | 3 --- src/i18n/locales/pt_BR/translation.json | 3 --- src/i18n/locales/zh_Hans/translation.json | 3 --- 7 files changed, 21 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index c43d9a73e1..19a6415242 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -8,9 +8,6 @@ "done": "" }, "intro": { - "paywall": { - "description": "" - }, "foss": { "description": "" } diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index 4a6789b70d..485924cbc5 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -8,9 +8,6 @@ "done": "Farite" }, "intro": { - "paywall": { - "description": "" - }, "foss": { "description": "" } diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 63fbb406ec..199ffdc8b8 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -8,9 +8,6 @@ "done": "Hecho" }, "intro": { - "paywall": { - "description": "Defina presupuestos individuales para sitios web para permitir flujos de pago sin interrupciones. No más molestos muros de pago." - }, "foss": { "description": "Código completamente abierto que puede ser auditado por cualquier persona. Sin estadísticas ni rastreadores. Tú tienes el control." } diff --git a/src/i18n/locales/hi/translation.json b/src/i18n/locales/hi/translation.json index 1fe14ac9b1..fe66858dae 100644 --- a/src/i18n/locales/hi/translation.json +++ b/src/i18n/locales/hi/translation.json @@ -2,9 +2,6 @@ "translation": { "welcome": { "intro": { - "paywall": { - "description": "वेबसाइटों के लिए व्यक्तिगत खर्चा निर्धारित करें जिससे पायें निर्बाध भुगतान धाराएँ| और ज्यादा झंझट वाली paywalls नहीं|" - }, "foss": { "description": "पूर्णतः ओपन कोड जोकि किसी के भी द्वारा लेखा परीक्षित किया जा सके| किसी भी प्रकार के आंकडें या trackers नहीं | आप पूरी तरह नियंत्रण में |" } diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index e6a3561bdf..0d260fa60b 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -8,9 +8,6 @@ "done": "Klaar" }, "intro": { - "paywall": { - "description": "Definieer individuele budgetten voor websites om naadloze betalingsstromen mogelijk te maken. Geen vervelende paywalls meer." - }, "foss": { "description": "Volledig transparante open code. Geen statistieken of trackers. Jij hebt de controle." } diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index bc6dfc8b59..bc320e5b1b 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -8,9 +8,6 @@ "done": "Feito" }, "intro": { - "paywall": { - "description": "Habilite pagamentos automáticos e estabeleça limites de gastos personalizados para cada site." - }, "foss": { "description": "Código completamente aberto e que pode ser auditado por qualquer pessoa. Sem estatísticas ou rastreadores. Você está no controle." } diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 5a0a2c6916..3de94a4e44 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -8,9 +8,6 @@ "connect": "你的闪电账户" }, "intro": { - "privacy": { - "title": "隐私第一" - }, "send": { "title": "一键发送" } From 5cb8ee0ce5f6fda9dd22cc5812e7052583220674 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 19 Jan 2023 12:11:55 +0100 Subject: [PATCH 080/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 5 ----- src/i18n/locales/eo/translation.json | 5 ----- src/i18n/locales/es/translation.json | 5 ----- src/i18n/locales/hi/translation.json | 5 ----- src/i18n/locales/nl/translation.json | 5 ----- src/i18n/locales/pt_BR/translation.json | 5 ----- src/i18n/locales/zh_Hans/translation.json | 5 ----- 7 files changed, 35 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index 19a6415242..190246a904 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -7,11 +7,6 @@ "connect": "", "done": "" }, - "intro": { - "foss": { - "description": "" - } - }, "set_password": { "title": "", "description": "", diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index 485924cbc5..087f622cc5 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -7,11 +7,6 @@ "connect": "Via konto ĉe Lightning", "done": "Farite" }, - "intro": { - "foss": { - "description": "" - } - }, "set_password": { "title": "", "description": "", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 199ffdc8b8..16622fdfba 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -7,11 +7,6 @@ "connect": "Su cuenta de Lightning", "done": "Hecho" }, - "intro": { - "foss": { - "description": "Código completamente abierto que puede ser auditado por cualquier persona. Sin estadísticas ni rastreadores. Tú tienes el control." - } - }, "set_password": { "title": "Proteja su billetera", "description": "Los datos de su cuenta Lightning se cifran de forma segura con una contraseña de desbloqueo. No olvides esta contraseña! Lo necesita para desbloquear el teléfono por extensión (en este navegador)", diff --git a/src/i18n/locales/hi/translation.json b/src/i18n/locales/hi/translation.json index fe66858dae..1971b0349b 100644 --- a/src/i18n/locales/hi/translation.json +++ b/src/i18n/locales/hi/translation.json @@ -1,11 +1,6 @@ { "translation": { "welcome": { - "intro": { - "foss": { - "description": "पूर्णतः ओपन कोड जोकि किसी के भी द्वारा लेखा परीक्षित किया जा सके| किसी भी प्रकार के आंकडें या trackers नहीं | आप पूरी तरह नियंत्रण में |" - } - }, "nav": { "welcome": "नमस्कार", "password": "आपका पासवर्ड", diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index 0d260fa60b..358870be3b 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -7,11 +7,6 @@ "connect": "Jouw Lightning account", "done": "Klaar" }, - "intro": { - "foss": { - "description": "Volledig transparante open code. Geen statistieken of trackers. Jij hebt de controle." - } - }, "set_password": { "title": "Stel een ontgrendelingswachtwoord in", "description": "Lightning-accountgegevens zijn veilig versleuteld met een ontgrendelingswachtwoord. Vergeet dit wachtwoord niet! Je hebt het nodig om de Alby-extensie te ontgrendelen (in deze browser)", diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index bc320e5b1b..15d0df49e6 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -7,11 +7,6 @@ "connect": "Sua Conta", "done": "Feito" }, - "intro": { - "foss": { - "description": "Código completamente aberto e que pode ser auditado por qualquer pessoa. Sem estatísticas ou rastreadores. Você está no controle." - } - }, "set_password": { "title": "Definir uma senha de desbloqueio", "description": "Os dados armazenados na extensão Alby são criptografados com uma senha de desbloqueio. Não esqueça esta senha! Você precisa dela para usar a extensão Alby (neste navegador)", diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 3de94a4e44..0e68af91a3 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -7,11 +7,6 @@ "done": "已完成", "connect": "你的闪电账户" }, - "intro": { - "send": { - "title": "一键发送" - } - }, "set_password": { "title": "设置解锁密码", "description": "你的闪电账户数据是用解锁密码安全加密的。不要忘记这个密码! 你需要它来解锁Alby Extension(在这个浏览器中)", From de732e3ce28caaff3fa09222cf7cf00a40cd8b14 Mon Sep 17 00:00:00 2001 From: Lukas Jakob Date: Thu, 19 Jan 2023 07:47:06 -0600 Subject: [PATCH 081/123] fix: account new button vertical alignment --- src/app/components/ConnectorPath/index.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/components/ConnectorPath/index.tsx b/src/app/components/ConnectorPath/index.tsx index 3534266c71..5ed65cdbe5 100644 --- a/src/app/components/ConnectorPath/index.tsx +++ b/src/app/components/ConnectorPath/index.tsx @@ -9,7 +9,9 @@ function ConnectorPath({ title, description, content, actions }: Props) { return (

{title}

-

{description}

+

+ {description} +

{content}
From 418c3c2e86dbce51cd40d3adff74692035fd2ecf Mon Sep 17 00:00:00 2001 From: escapedcat Date: Thu, 19 Jan 2023 15:29:56 +0100 Subject: [PATCH 082/123] fix(lnurlpay): handle status 500 for callback url #1995 --- src/app/screens/LNURLPay/index.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/screens/LNURLPay/index.tsx b/src/app/screens/LNURLPay/index.tsx index da9b25c936..e943edf25d 100644 --- a/src/app/screens/LNURLPay/index.tsx +++ b/src/app/screens/LNURLPay/index.tsx @@ -7,7 +7,7 @@ import SatButtons from "@components/SatButtons"; import DualCurrencyField from "@components/form/DualCurrencyField"; import TextField from "@components/form/TextField"; import axios from "axios"; -import React, { Fragment, useState, useEffect } from "react"; +import React, { Fragment, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; @@ -129,6 +129,11 @@ function LNURLPay() { } ); + if (response.status === 500) { + toast.error("Payment aborted: Could not connect to server"); + return; + } + const isSuccessResponse = function ( obj: LNURLPaymentInfo | LNURLError ): obj is LNURLPaymentInfo { From a1c4e5b1ee444f4b813945544d9be5bacd750ee7 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Fri, 20 Jan 2023 15:19:45 +0100 Subject: [PATCH 083/123] fix(lnurlpay): handle all 500 and above #1995 --- src/app/screens/LNURLPay/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/screens/LNURLPay/index.tsx b/src/app/screens/LNURLPay/index.tsx index e943edf25d..db7057bc6a 100644 --- a/src/app/screens/LNURLPay/index.tsx +++ b/src/app/screens/LNURLPay/index.tsx @@ -129,7 +129,7 @@ function LNURLPay() { } ); - if (response.status === 500) { + if (response.status >= 500) { toast.error("Payment aborted: Could not connect to server"); return; } From e1d5e9658c95b61850b0a80536c4141d92f92a16 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 21 Jan 2023 13:11:10 +0000 Subject: [PATCH 084/123] Update all development Yarn dependencies (2023-01-21) --- package.json | 14 ++-- yarn.lock | 218 ++++++++++++++++++++------------------------------- 2 files changed, 92 insertions(+), 140 deletions(-) diff --git a/package.json b/package.json index af3134f284..30105e889f 100644 --- a/package.json +++ b/package.json @@ -71,9 +71,9 @@ }, "devDependencies": { "@commitlint/cli": "^17.4.1", - "@commitlint/config-conventional": "^17.4.0", + "@commitlint/config-conventional": "^17.4.2", "@jest/types": "^29.3.1", - "@playwright/test": "^1.29.1", + "@playwright/test": "^1.29.2", "@swc/core": "^1.3.24", "@swc/jest": "^0.2.24", "@testing-library/jest-dom": "^5.16.5", @@ -103,8 +103,8 @@ "del-cli": "^5.0.0", "eslint": "^8.31.0", "eslint-config-prettier": "^8.6.0", - "eslint-plugin-import": "^2.26.0", - "eslint-plugin-react": "^7.31.11", + "eslint-plugin-import": "^2.27.5", + "eslint-plugin-react": "^7.32.1", "eslint-plugin-react-hooks": "^4.6.0", "fake-indexeddb": "^3.1.8", "filemanager-webpack-plugin": "^8.0.0", @@ -112,7 +112,7 @@ "husky": "^8.0.3", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", - "jest-webextension-mock": "^3.8.7", + "jest-webextension-mock": "^3.8.8", "lint-staged": "^13.1.0", "mini-css-extract-plugin": "^2.7.2", "msw": "^0.49.2", @@ -120,9 +120,9 @@ "postcss-cli": "^10.1.0", "postcss-loader": "^7.0.2", "pptr-testing-library": "^0.7.0", - "prettier": "^2.8.1", + "prettier": "^2.8.3", "process": "^0.11.10", - "puppeteer": "^19.4.1", + "puppeteer": "^19.5.2", "sass": "^1.57.1", "sass-loader": "^13.2.0", "stream-browserify": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index d29300fd5b..f0f5128dee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -422,10 +422,10 @@ resolve-global "1.0.0" yargs "^17.0.0" -"@commitlint/config-conventional@^17.4.0": - version "17.4.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.4.0.tgz#9188d793886d8a1c633834602f06a642dd16ed64" - integrity sha512-G4XBf45J4ZMspO4NwBFzY3g/1Kb+B42BcIxeikF8wucQxcyxcmhRdjeQpRpS1XEcBq5pdtEEQFipuB9IuiNFhw== +"@commitlint/config-conventional@^17.4.2": + version "17.4.2" + resolved "https://registry.yarnpkg.com/@commitlint/config-conventional/-/config-conventional-17.4.2.tgz#671f7febfcfef90ec11b122a659c6be25e11c19e" + integrity sha512-JVo1moSj5eDMoql159q8zKCU8lkOhQ+b23Vl3LVVrS6PXDLQIELnJ34ChQmFVbBdSSRNAbbXnRDhosFU+wnuHw== dependencies: conventional-changelog-conventionalcommits "^5.0.0" @@ -991,13 +991,13 @@ resolved "https://registry.yarnpkg.com/@open-draft/until/-/until-1.0.3.tgz#db9cc719191a62e7d9200f6e7bab21c5b848adca" integrity sha512-Aq58f5HiWdyDlFffbbSjAlv596h/cOnt2DO1w3DOC7OJ5EHs0hd/nycJfiu9RJbT6Yk6F1knnRRXNSpxoIVZ9Q== -"@playwright/test@^1.29.1": - version "1.29.1" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.29.1.tgz#f2ed4dc143b9c7825a7ad2703b2f1ac4354e1145" - integrity sha512-iQxk2DX5U9wOGV3+/Jh9OHPsw5H3mleUL2S4BgQuwtlAfK3PnKvn38m4Rg9zIViGHVW24opSm99HQm/UFLEy6w== +"@playwright/test@^1.29.2": + version "1.29.2" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.29.2.tgz#c48184721d0f0b7627a886e2ec42f1efb2be339d" + integrity sha512-+3/GPwOgcoF0xLz/opTnahel1/y42PdcgZ4hs+BZGIUjtmEFSXGg+nFoaH3NSmuc7a6GSFwXDJ5L7VXpqzigNg== dependencies: "@types/node" "*" - playwright-core "1.29.1" + playwright-core "1.29.2" "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" @@ -2241,17 +2241,6 @@ array-includes@^3.1.2: get-intrinsic "^1.1.1" is-string "^1.0.5" -array-includes@^3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.4.tgz#f5b493162c760f3539631f005ba2bb46acb45ba9" - integrity sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - get-intrinsic "^1.1.1" - is-string "^1.0.7" - array-includes@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.6.tgz#9e9e720e194f198266ba9e18c29e6a9b0e4b225f" @@ -2280,14 +2269,15 @@ array-uniq@^1.0.1: resolved "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz" integrity sha1-r2rId6Jcx/dOBYiUdThY39sk/bY= -array.prototype.flat@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" - integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg== +array.prototype.flat@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz#ffc6576a7ca3efc2f46a143b9d1dda9b4b3cf5e2" + integrity sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA== dependencies: call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.0" + define-properties "^1.1.4" + es-abstract "^1.20.4" + es-shim-unscopables "^1.0.0" array.prototype.flatmap@^1.3.1: version "1.3.1" @@ -3416,7 +3406,7 @@ dayjs@^1.11.7: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.7.tgz#4b296922642f70999544d1144a2c25730fce63e2" integrity sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ== -debug@2.6.9, debug@^2.6.9: +debug@2.6.9: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -3884,7 +3874,7 @@ es-abstract@^1.18.0-next.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" -es-abstract@^1.19.0, es-abstract@^1.19.1: +es-abstract@^1.19.0: version "1.19.1" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.1.tgz#d4885796876916959de78edaa0df456627115ec3" integrity sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w== @@ -4037,39 +4027,41 @@ eslint-config-prettier@^8.6.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.6.0.tgz#dec1d29ab728f4fa63061774e1672ac4e363d207" integrity sha512-bAF0eLpLVqP5oEVUFKpMA+NnRFICwn9X8B5jrR9FcqnYBuPbqWEjTEspPWMj5ye6czoSLDweCzSo3Ko7gGrZaA== -eslint-import-resolver-node@^0.3.6: - version "0.3.6" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" - integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== +eslint-import-resolver-node@^0.3.7: + version "0.3.7" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.7.tgz#83b375187d412324a1963d84fa664377a23eb4d7" + integrity sha512-gozW2blMLJCeFpBwugLTGyvVjNoeo1knonXAcatC6bjPBZitotxdWf7Gimr25N4c0AAOo4eOUfaG82IJPDpqCA== dependencies: debug "^3.2.7" - resolve "^1.20.0" + is-core-module "^2.11.0" + resolve "^1.22.1" -eslint-module-utils@^2.7.3: - version "2.7.3" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" - integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== +eslint-module-utils@^2.7.4: + version "2.7.4" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.4.tgz#4f3e41116aaf13a20792261e61d3a2e7e0583974" + integrity sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA== dependencies: debug "^3.2.7" - find-up "^2.1.0" -eslint-plugin-import@^2.26.0: - version "2.26.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" - integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== +eslint-plugin-import@^2.27.5: + version "2.27.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz#876a6d03f52608a3e5bb439c2550588e51dd6c65" + integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== dependencies: - array-includes "^3.1.4" - array.prototype.flat "^1.2.5" - debug "^2.6.9" + array-includes "^3.1.6" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" doctrine "^2.1.0" - eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.3" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.7.4" has "^1.0.3" - is-core-module "^2.8.1" + is-core-module "^2.11.0" is-glob "^4.0.3" minimatch "^3.1.2" - object.values "^1.1.5" - resolve "^1.22.0" + object.values "^1.1.6" + resolve "^1.22.1" + semver "^6.3.0" tsconfig-paths "^3.14.1" eslint-plugin-react-hooks@^4.6.0: @@ -4077,10 +4069,10 @@ eslint-plugin-react-hooks@^4.6.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== -eslint-plugin-react@^7.31.11: - version "7.31.11" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.31.11.tgz#011521d2b16dcf95795df688a4770b4eaab364c8" - integrity sha512-TTvq5JsT5v56wPa9OYHzsrOlHzKZKjV+aLgS+55NJP/cuzdiQPC7PfYoUjMoxlffKtvijpk7vA/jmuqRb9nohw== +eslint-plugin-react@^7.32.1: + version "7.32.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.32.1.tgz#88cdeb4065da8ca0b64e1274404f53a0f9890200" + integrity sha512-vOjdgyd0ZHBXNsmvU+785xY8Bfe57EFbTYYk8XrROzWpr9QBvpjITvAXt9xqcE6+8cjR/g1+mfumPToxsl1www== dependencies: array-includes "^3.1.6" array.prototype.flatmap "^1.3.1" @@ -4094,7 +4086,7 @@ eslint-plugin-react@^7.31.11: object.hasown "^1.1.2" object.values "^1.1.6" prop-types "^15.8.1" - resolve "^2.0.0-next.3" + resolve "^2.0.0-next.4" semver "^6.3.0" string.prototype.matchall "^4.0.8" @@ -4476,13 +4468,6 @@ finalhandler@~1.1.2: statuses "~1.5.0" unpipe "~1.0.0" -find-up@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" - integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= - dependencies: - locate-path "^2.0.0" - find-up@^4.0.0, find-up@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" @@ -5285,7 +5270,14 @@ is-callable@^1.2.7: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== -is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: +is-core-module@^2.11.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" + integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== + dependencies: + has "^1.0.3" + +is-core-module@^2.5.0, is-core-module@^2.8.1, is-core-module@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== @@ -5989,10 +5981,10 @@ jest-watcher@^29.3.1: jest-util "^29.3.1" string-length "^4.0.1" -jest-webextension-mock@^3.8.7: - version "3.8.7" - resolved "https://registry.yarnpkg.com/jest-webextension-mock/-/jest-webextension-mock-3.8.7.tgz#ff7777e307c7782e9d283d09c5e116d29100be0f" - integrity sha512-hLLqY24VqebfzKE21oRXVJRpLwxF6VKzTJZdGSpRqtUmnywmopP/jBZsegbtxH50rhn9Ql5Zioivkt35cMHZJg== +jest-webextension-mock@^3.8.8: + version "3.8.8" + resolved "https://registry.yarnpkg.com/jest-webextension-mock/-/jest-webextension-mock-3.8.8.tgz#30d825d73c274a4fd531bda48f050a6e142a5d11" + integrity sha512-W3Yi/+zIgoUayVikGBZcZp+RrBy0h0Ol3Fy6+a72b6GaezXKFcZmTj9sE77E3BJ6Y0UifLuR3fImo5+D4jp+ww== jest-worker@^27.0.2: version "27.0.2" @@ -6290,14 +6282,6 @@ loader-utils@^3.2.0: resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-3.2.0.tgz#bcecc51a7898bee7473d4bc6b845b23af8304d4f" integrity sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ== -locate-path@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" - integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= - dependencies: - p-locate "^2.0.0" - path-exists "^3.0.0" - locate-path@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" @@ -6958,15 +6942,6 @@ object.hasown@^1.1.2: define-properties "^1.1.4" es-abstract "^1.20.4" -object.values@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" - integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.19.1" - object.values@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.6.tgz#4abbaa71eba47d63589d402856f908243eea9b1d" @@ -7077,13 +7052,6 @@ outvariant@^1.2.1, outvariant@^1.3.0: resolved "https://registry.yarnpkg.com/outvariant/-/outvariant-1.3.0.tgz#c39723b1d2cba729c930b74bf962317a81b9b1c9" integrity sha512-yeWM9k6UPfG/nzxdaPlJkB2p08hCg4xP6Lx99F+vP8YF7xyZVfTmJjrrNalkmzudD4WFvNLVudQikqUmF8zhVQ== -p-limit@^1.1.0: - version "1.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" - integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== - dependencies: - p-try "^1.0.0" - p-limit@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" @@ -7098,13 +7066,6 @@ p-limit@^3.0.2, p-limit@^3.1.0: dependencies: yocto-queue "^0.1.0" -p-locate@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" - integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= - dependencies: - p-limit "^1.1.0" - p-locate@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" @@ -7146,11 +7107,6 @@ p-retry@^4.5.0: "@types/retry" "^0.12.0" retry "^0.13.1" -p-try@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" - integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= - p-try@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" @@ -7201,11 +7157,6 @@ pascal-case@^3.1.2: no-case "^3.0.4" tslib "^2.0.3" -path-exists@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" - integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= - path-exists@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" @@ -7231,7 +7182,7 @@ path-key@^4.0.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-4.0.0.tgz#295588dc3aee64154f877adb9d780b81c554bf18" integrity sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ== -path-parse@^1.0.6, path-parse@^1.0.7: +path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -7305,10 +7256,10 @@ pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -playwright-core@1.29.1: - version "1.29.1" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.29.1.tgz#9ec15d61c4bd2f386ddf6ce010db53a030345a47" - integrity sha512-20Ai3d+lMkWpI9YZYlxk8gxatfgax5STW8GaMozAHwigLiyiKQrdkt7gaoT9UQR8FIVDg6qVXs9IoZUQrDjIIg== +playwright-core@1.29.2: + version "1.29.2" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.29.2.tgz#2e8347e7e8522409f22b244e600e703b64022406" + integrity sha512-94QXm4PMgFoHAhlCuoWyaBYKb92yOcGVHdQLoxQ7Wjlc7Flg4aC/jbFW7xMR52OfXMVkWicue4WXE7QEegbIRA== postcss-calc@^8.2.3: version "8.2.4" @@ -7684,10 +7635,10 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w== -prettier@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.1.tgz#4e1fd11c34e2421bc1da9aea9bd8127cd0a35efc" - integrity sha512-lqGoSJBQNJidqCHE80vqZJHWHRFoNYsSpP9AjFhlhi9ODCJA541svILes/+/1GM3VaL/abZi7cpFzOpdR9UPKg== +prettier@^2.8.3: + version "2.8.3" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.3.tgz#ab697b1d3dd46fb4626fbe2f543afe0cc98d8632" + integrity sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw== pretty-error@^4.0.0: version "4.0.0" @@ -7812,10 +7763,10 @@ punycode@^2.1.0, punycode@^2.1.1: resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== -puppeteer-core@19.4.1: - version "19.4.1" - resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-19.4.1.tgz#f4875943841ebdb6fc2ad7a475add958692b0237" - integrity sha512-JHIuqtqrUAx4jGOTxXu4ilapV2jabxtVMA/e4wwFUMvtSsqK4nVBSI+Z1SKDoz7gRy/JUIc8WzmfocCa6SIZ1w== +puppeteer-core@19.5.2: + version "19.5.2" + resolved "https://registry.yarnpkg.com/puppeteer-core/-/puppeteer-core-19.5.2.tgz#9b454b0ef89d3f07e20158dd4ced6ebd85d4dadb" + integrity sha512-Rqk+3kqM+Z2deooTYqcYt8lRtGffJdifWa9td9nbJSjhANWsFouk8kLBNUKycewCCFHM8TZUKS0x28OllavW2A== dependencies: cross-fetch "3.1.5" debug "4.3.4" @@ -7828,16 +7779,16 @@ puppeteer-core@19.4.1: unbzip2-stream "1.4.3" ws "8.11.0" -puppeteer@^19.4.1: - version "19.4.1" - resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-19.4.1.tgz#cac7d3f0084badebb8ebacbe6f4d7262e7f21818" - integrity sha512-PCnrR13B8A+VSEDXRmrNXRZbrkF1tfsI1hKSC7vs13eNS6CUD3Y4FA8SF8/VZy+Pm1kg5AggJT2Nu3HLAtGkFg== +puppeteer@^19.5.2: + version "19.5.2" + resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-19.5.2.tgz#f09ed55d5263cacaac4c5818d0d884b1e1d938b0" + integrity sha512-xlqRyrhXhVH114l79Y0XqYXUVG+Yfw4sKlvN55t8Y9DxtA5fzI1uqF8SVXbWK5DUMbD6Jo4lpixTZCTTZGD05g== dependencies: cosmiconfig "8.0.0" https-proxy-agent "5.0.1" progress "2.0.3" proxy-from-env "1.1.0" - puppeteer-core "19.4.1" + puppeteer-core "19.5.2" q@^1.5.1: version "1.5.1" @@ -8189,7 +8140,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.1.7, resolve@^1.10.0, resolve@^1.22.0: +resolve@^1.1.7, resolve@^1.10.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -8207,13 +8158,14 @@ resolve@^1.20.0, resolve@^1.22.1: path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" -resolve@^2.0.0-next.3: - version "2.0.0-next.3" - resolved "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz" - integrity sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q== +resolve@^2.0.0-next.4: + version "2.0.0-next.4" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.4.tgz#3d37a113d6429f496ec4752d2a2e58efb1fd4660" + integrity sha512-iMDbmAWtfU+MHpxt/I5iWI7cY6YVEZUQ3MBgPQ++XD1PELuJHIl82xBmObyP2KyQmkNB2dsqF7seoQQiAn5yDQ== dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" restore-cursor@^3.1.0: version "3.1.0" From 520e206d9abfbe714c1485422447c9add9f60c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BSN=20=E2=88=9E/21M=20=E2=82=BF?= Date: Thu, 19 Jan 2023 13:33:07 +0000 Subject: [PATCH 085/123] Translated using Weblate (German) Currently translated at 95.3% (447 of 469 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/de/ --- src/i18n/locales/de/translation.json | 234 +++++++++++++++++++++++++-- 1 file changed, 220 insertions(+), 14 deletions(-) diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index a355d3524b..c1269a5e58 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -9,7 +9,7 @@ }, "set_password": { "title": "Passwort zum Entsperren festlegen", - "description": "Die Daten deines Lightning-Kontos sind mit einem Freischalt-Passwort sicher verschlüsselt. Vergesse das Passwort nicht! Du benötigst es, um die Alby-Erweiterung zu entsperren (in diesem Browser)", + "description": "Dieses Passwort wird verwendet, um deine Wallet zu schützen und den Zugang zur Browser-Erweiterung zu ermöglichen. Es kann nicht zurückgesetzt werden und ist unabhängig von deinem Alby-Kontopasswort.", "choose_password": { "label": "Wähle ein Passwort zum Entsperren:" }, @@ -32,7 +32,8 @@ "connection_error": "Verbindungsfehler", "connection_taking_long": "Das Verbinden dauert länger als erwartet...sind deine Angaben richtig? Ist dein Node erreichbar?", "contact_support": "Wenn du Hilfe brauchst, kontaktiere bitte support@getalby.com" - } + }, + "title": "Willkommen bei Alby" }, "choose_connector": { "lnd": { @@ -121,7 +122,7 @@ }, "title": "Regenschirm" }, - "description": "Du musst dich zuerst mit einer Lightning Wallet verbinden, damit du dich mit deinen Lieblingswebseiten verbinden kannst, die Bitcoin Lightning Zahlungen akzeptieren!", + "description": "Verbinde dich mit deiner externen Lightning Wallet oder Node", "citadel": { "page": { "instructions": "Das funktioniert aktuell nicht, wenn 2FA ausgewählt ist.", @@ -256,7 +257,23 @@ }, "kollider": { "title": "Kollider", - "description": "Anmeldung bei deinem Kollider-Konto" + "description": "Anmeldung bei deinem Kollider-Konto", + "page": { + "description": "Du hast noch kein Konto? <0>Jetzt anmelden!", + "title": "Verbinde dich mit deinem Kollider-Konto" + }, + "password": { + "label": "Gebe dein Kollider-Passwort ein" + }, + "currency": { + "label": "Wähle dein Währungskonto" + }, + "errors": { + "connection_failed": "Verbindung fehlgeschlagen. Bist du dir sicher, dass die Kontodaten korrekt sind?" + }, + "username": { + "label": "Gebe dein Kollider-Benutzernamen ein" + } }, "title": "Verbinde Lightning Wallet" }, @@ -338,7 +355,7 @@ }, "exchange": { "title": "Austausch Quelle", - "subtitle": "Quelle der Bitcoin-Wechselkurse" + "subtitle": "Quelle für Bbitcoin-Wechselkurse" }, "language": { "title": "Sprache", @@ -454,7 +471,11 @@ "title": "Erlaubnis", "used_budget": "sats verwendet" } - } + }, + "title": "Deine ⚡ Website", + "description": "Websites, auf denen du Alby bereits verwendet hast", + "no_info": "Es sieht so aus, als hättest du Alby noch in keiner Website verwendet.", + "discover": "Websites entdecken" }, "send": { "input": { @@ -494,7 +515,8 @@ "allow": "Erlaube dieser Website:", "content": "Auf dieser Website wirst du aufgefordert zu signieren:", "block_and_ignore": "Blockieren und Ignorieren von {{host}}", - "block_added": "{{host}} zur Blockliste hinzugefügt, bitte lade deine Website neu." + "block_added": "{{host}} zur Blockliste hinzugefügt, bitte lade deine Website neu.", + "allow_sign": "Erlaube dein {{host}} zu unterschreiben:" }, "confirm_request_permission": { "title": "Antrag genehmigen", @@ -608,7 +630,7 @@ "choose_path": { "other": { "and_more": "& mehr...", - "title": "Andere Wallets", + "title": "Andere Wallet", "description": "Verbinde dich mit deiner bestehenden Lightning Wallet oder Node und wählen aus verschiedenen Anschlüssen.", "connect": "Verbinden" }, @@ -619,29 +641,136 @@ }, "title": "Verbinden", "description": "Um Alby für Online-Zahlungen zu nutzen, verbinde deine Lightning Wallet mit der Erweiterung." + }, + "discover": { + "description": "Websites und Webapplikationen, auf denen du Alby verwenden kannst", + "title": "Erkunde das Ökosystem von Lightning ⚡️", + "list": { + "gaming": "Spielen", + "trading": "Handel", + "entertaiment": "Unterhaltung", + "shopping": "Einkaufen", + "miscellaneous": "Sonstiges", + "showcases": "Schaukästen" + }, + "tips": { + "title": "Deine Alby-Wallet ist bereit", + "top_up_wallet": { + "description": "Erstelle eine Lightning-Rechnung, sende dir selbst Bitcoin und nutze das Alby im Lightning-Ökosystem", + "title": "⚡️ Wallet aufladen", + "label1": "Bitcoin erhalten", + "label2": "Bitcoin kaufen" + }, + "demo": { + "description": "Entdecke alles, was du mit Alby tun könntest, auf unserer Demo-Website", + "title": "🕹️ Alby Demo ausprobieren", + "label1": "Probiere es aus" + }, + "address": { + "description": "Erstelle eine eigene Lightningadresse und empfange Lightningzahlungen einfach per E-Mail", + "title": "Eine Lightning Adresse erhalten", + "label1": "Hole es dir jetzt!" + }, + "description": "Ein paar Tipps für den Anfang 🐝", + "pin": { + "title": "📌 Pin für die Alby-Erweiterung", + "description2": "Suche in der Liste der Erweiterungen von Alby und klicke auf das Pinsymbol, um es an die Symbolleiste anzuheften", + "description3": "Das war's! Um auf Alby zuzugreifen, klicke einfach auf das Alby-Symbol" + } + } } }, "components": { "account_menu": { "options": { "account": { - "add": "Füge einen neuen Account hinzu" + "add": "Füge einen neuen Account hinzu", + "manage": "Konten verwalten" } - } + }, + "title": "Konto wechseln", + "screen_reader": "Dropdown umschalten" }, "publishers_table": { - "payments": "Zahlungen" + "payments": "Zahlungen", + "used": "gebraucht" }, "toasts": { "connection_error": { - "double_check": "Überprüfe nochmals deine Verbindungseinstellungen" + "double_check": "Überprüfe nochmals deine Verbindungseinstellungen", + "if_ssl_errors": "und wenn es SSL-Fehler gibt (z.B. ERR_CERT_AUTHORITY_INVALID), klicke auf \"Erweitert\" und fahr fort, das Zertifikat zu akzeptieren.", + "visit_guides": "Besuche unsere Leitfäden für weitere Hilfe", + "what_you_can_do": "Das kannst du tun:" }, "errors": { "invalid_credentials": "Falsches Passwort. Überprüfe das Passwort und E-Mail Adresse und versuche es noch einmal." + }, + "login_failed": { + "password_reset": "Hast du dein Passwort vergessen? Klicke bitte hier" } }, "companion_download_info": { - "using_tor": "Klicke hier zum Weitermachen, wenn du den TOR Browser verwendest" + "using_tor": "Klicke hier zum Weitermachen, wenn du den TOR Browser verwendest", + "description": "Du versuchst, dich mit einem Knoten hinter Tor zu verbinden. Um dies zu tun, musst du entweder die Alby-Begleit-App installiert haben oder Tor laufen lassen. (Wenn du dir unsicher bist, empfehlen wir die Alby-Begleit-App).", + "download_here": "Lade dein Alby-Begleiter hier herunter!", + "or": "Oder:" + }, + "allowance_menu": { + "edit_allowance": { + "title": "Zulage bearbeiten", + "screen_reader": "Zulässigkeitsoptionen" + }, + "enable_login": { + "title": "Anmeldung auf der Website aktivieren", + "subtitle": "Automatisches Einloggen ohne Bestätigung, wenn die Website dazu auffordert." + }, + "edit_permissions": "Berechtigungen bearbeiten", + "hint": "Dadurch wird das aktuelle Budget zurückgesetzt", + "new_budget": { + "label": "Neues Budget" + }, + "confirm_delete": "Bist du dir sicher, dass du diese Website löschen willst?" + }, + "qrcode_scanner": { + "actions": { + "stop_scanning": "Scannen beenden", + "start_scanning": "Scannen starten" + }, + "errors": { + "allow_camera_access": "Bitte erlaube deinen Kamerazugriff in den Einstellungen." + }, + "title": "QR Code scannen" + }, + "transactionsTable": { + "sent": "Gesendet", + "boostagram": { + "sender": "Sender", + "app": "App", + "podcast": "Podcast", + "message": "Nachricht" + }, + "preimage": "Vorschaubild", + "received": "Empfangen", + "fee": "Gebühr", + "open_location": "Website öffnen" + }, + "budget_control": { + "remember": { + "description": "Du kannst dein Guthaben so einstellen, dass du erst dann um eine Zahlungsbestätigung gebeten wirst, wenn es aufgebraucht ist.", + "label": "Erinnere dich und lege ein Budget fest" + }, + "budget": { + "label": "Budget" + } + }, + "badge": { + "label": { + "active": "AKTIV", + "auth": "LOGIN" + } + }, + "confirm_or_cancel": { + "only_trusted": "Verbinde dich nur mit Websites, denen du vertraust." } }, "common": { @@ -659,6 +788,83 @@ "copied": "Kopiert!", "description": "Beschreibung", "settings": "Einstellungen", - "sats_other": "sats" + "sats_other": "sats", + "confirm_password": "Bestätige dein Passwort", + "help": "Hilfe", + "actions": { + "back": "Zurück", + "open": "Öffnen", + "cancel": "Abbrechen", + "confirm": "Bestätigen", + "send": "Senden", + "unlock": "Freischalten", + "receive": "Empfangen", + "delete": "Löschen", + "edit": "Bearbeiten", + "next": "Weiter", + "export": "Exportieren", + "log_in": "Einloggen", + "close": "Schließen", + "remove": "entfernen", + "continue": "Weiter", + "lock": "Schloss", + "connect": "Verbinden", + "save": "Speichern", + "copy": "Kopieren" + }, + "discover": "Entdecken", + "errors": { + "connection_failed": "Verbindung fehlgeschlagen", + "payment_failed": "Zahlung fehlgeschlagen" + }, + "message": "Nachricht", + "response": "Antwort" + }, + "permissions": { + "commando": { + "bkpr-listbalances": "Liste aller aktuellen und historischen Kontosalden.", + "checkmessage": "Überprüfe, ob die Signatur von einem bestimmten Knoten erzeugt wurde.", + "fundchannel": "Öffne einen Zahlungskanal mit einem Peer, indem du eine Finanzierungstransaktion durchführst.", + "getroute": "Finde die beste Route für die Zahlung an einen Lightningnoten.", + "invoice": "Schaffe die Erwartung einer Zahlung.", + "keysend": "Sende eine Zahlung an einen anderen Knoten.", + "listoffers": "Alle Angebote auflisten oder ein bestimmtes Angebot erhalten.", + "listpays": "Ruft den Status aller Zahlungsbefehle ab.", + "signmessage": "Erstelle eine Signatur aus diesem Knoten.", + "feerates": "Rückgabe der Fee Rate, die bei CLN verwenden wird.", + "listforwards": "Auflistung aller versuchten Übermittlungsversuche.", + "listfunds": "Listet alle verfügbaren Mittel auf.", + "listinvoices": "Abrufen des Status aller Rechnungen.", + "sendpay": "Sende eine Zahlung über eine Route.", + "multifundchannel": "Öffne mehrere Zahlungskanäle mit Knotenpunkten, indem du eine einzige Finanzierungstransaktion durchführst.", + "disconnect": "Schließen einer bestehenden Verbindung zu einem Peer.", + "decodepay": "Prüfe und analysiere einen Bolt11-String.", + "getinfo": "Abrufen der Zusammenfassung des Knotens.", + "listtransactions": "Liste der in der Wallet verfolgten Transaktionen.", + "offer": "Erstelle ein Angebot.", + "connect": "Stelle eine neue Verbindung zu einem anderen Knoten her.", + "decode": "Dekodiere eine Bolt11/Bolt12/Rune-Kette.", + "listpeers": "Liste der Knoten, die mit diesem Knoten verbunden sind oder offene Kanäle haben.", + "listsendpays": "Ruft den Status aller sendpay-Befehle ab.", + "pay": "Sende eine Zahlung an eine BOLT11-Rechnung." + }, + "lnd": { + "channelbalance": "Du erhältst einen Bericht über den Gesamtbetrag der Mittel für alle offenen Kanäle.", + "walletbalance": "Ermittel die gesamten nicht verbrauchten Ausgaben der Wallet.", + "listchannels": "Erhalte eine Beschreibung aller offenen Kanäle.", + "openchannel": "Öffne einen neuen Kanal.", + "estimatefee": "Schätze den Gebührensatz und die Gesamtgebühren für eine Transaktion.", + "getchaninfo": "Ermittelt die Netzansage für den angegebenen Kanal.", + "getinfo": "Abrufen der Knoteninformationen.", + "listinvoices": "Erhalte eine Liste aller Rechnungen.", + "connectpeer": "Stelle eine Verbindung zu einer entfernten Gegenstelle her.", + "disconnectpeer": "Trenne die Verbindung zu einer entfernten Gegenstelle." + }, + "nostr": { + "getpublickey": "Lese deinen öffentlichen Schlüssel.", + "nip04decrypt": "Daten entschlüsseln.", + "nip04encrypt": "Daten verschlüsseln.", + "signmessage": "Unterschreibe deine Nachricht mit deinem Schlüssel." + } } } From e355376cc4618a9b4c536b555f6d65df215c1126 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Fri, 20 Jan 2023 00:56:33 +0000 Subject: [PATCH 086/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 86.9% (408 of 469 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 39 +++++++++++++++++++++---- 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 15d0df49e6..881e708536 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -9,7 +9,7 @@ }, "set_password": { "title": "Definir uma senha de desbloqueio", - "description": "Os dados armazenados na extensão Alby são criptografados com uma senha de desbloqueio. Não esqueça esta senha! Você precisa dela para usar a extensão Alby (neste navegador)", + "description": "Os dados armazenados na extensão Alby são criptografados com uma senha de desbloqueio. Não esqueça esta senha! Você precisa dela para usar a extensão Alby (neste navegador).", "choose_password": { "label": "Escolha uma senha de desbloqueio:" }, @@ -32,10 +32,11 @@ "actions": { "delete_edit_account": "Remover conta inválida e editar novamente" } - } + }, + "title": "Bem-vindo a Alby" }, "choose_connector": { - "description": "Conecte-se a uma carteira ou servidor disponíveis abaixo", + "description": "Escolha uma carteira ou servidor disponível abaixo", "lnd": { "title": "LND", "page": { @@ -573,18 +574,44 @@ "entertaiment": "Entretenimento", "shopping": "Compras", "miscellaneous": "Outros" + }, + "tips": { + "top_up_wallet": { + "description": "Crie uma fatura relâmpago, envie alguns bitcoins para você mesmo e comece a usar a Alby", + "label2": "Comprar Bitcoin", + "label1": "Receber Bitcoin", + "title": "⚡️ Adicione fundos na sua carteira" + }, + "pin": { + "title": "📌 Fixar extensão Alby", + "description1": "<0>Para acessar a Alby facilmente, clique no ícone da extensão <1/> <2>no canto superior direito do seu navegador", + "description2": "Na lista de extensões, localize a Alby e clique no ícone de fixação para fixá-lo na barra de ferramentas do navegador", + "description3": "É isso! Para acessar Alby basta clicar no ícone Alby" + }, + "address": { + "label1": "Eu quero!", + "title": "⚡️ Endereço relâmpago", + "description": "Crie seu próprio endereço relâmpago e receba pagamentos relâmpago com a mesma facilidade de enviar um e-mail" + }, + "demo": { + "title": "🕹️ Teste a Alby", + "description": "Descubra tudo o que você pode fazer com a Alby em nosso site de demonstração", + "label1": "Experimente" + }, + "title": "Sua carteira Alby está pronta", + "description": "Algumas dicas para você iniciar na Alby 🐝" } }, "choose_path": { "alby": { "description": "Crie uma conta ou realize o login na sua conta atual da Alby.", - "create_new": "Criar nova conta", + "create_new": "Criar conta", "title": "Alby" }, "other": { "title": "Outras Carteiras", "and_more": "& mais...", - "description": "Conecte-se em sua carteira bitcoin ou em um dos vários servidores de carteira suportados.", + "description": "Conecte-se em sua carteira bitcoin ou em um dos vários servidores de carteira disponíveis.", "connect": "Conectar" }, "description": "Você pode usar Alby, criando uma conta conosco ou conectando-se à sua própria carteira bitcoin.", @@ -606,7 +633,7 @@ "label": "Senha" } }, - "login_account": "Acessar sua conta atual da Alby.", + "login_account": "Acesse sua conta Alby.", "host_wallet": "A custódia dos seus bitcoins é por nossa conta!", "create_account": "Crie uma nova conta Alby para enviar e receber pagamentos em bitcoin.", "email": { From 08f65a69b3302b5539f353a092ab5b591c1dcd27 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Sat, 21 Jan 2023 15:38:03 +0000 Subject: [PATCH 087/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 86.9% (408 of 469 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 881e708536..9387b34a71 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -9,7 +9,7 @@ }, "set_password": { "title": "Definir uma senha de desbloqueio", - "description": "Os dados armazenados na extensão Alby são criptografados com uma senha de desbloqueio. Não esqueça esta senha! Você precisa dela para usar a extensão Alby (neste navegador).", + "description": "Essa senha é usada para proteger sua carteira e fornecer acesso à extensão do navegador. Não esqueça essa senha pois não é possível recuperá-la. Obs. Essa senha é diferente da senha da conta da Alby.", "choose_password": { "label": "Escolha uma senha de desbloqueio:" }, @@ -586,12 +586,12 @@ "title": "📌 Fixar extensão Alby", "description1": "<0>Para acessar a Alby facilmente, clique no ícone da extensão <1/> <2>no canto superior direito do seu navegador", "description2": "Na lista de extensões, localize a Alby e clique no ícone de fixação para fixá-lo na barra de ferramentas do navegador", - "description3": "É isso! Para acessar Alby basta clicar no ícone Alby" + "description3": "É isso! Agora é só clicar no ícone da Alby" }, "address": { "label1": "Eu quero!", "title": "⚡️ Endereço relâmpago", - "description": "Crie seu próprio endereço relâmpago e receba pagamentos relâmpago com a mesma facilidade de enviar um e-mail" + "description": "Crie seu próprio endereço relâmpago e receba pagamentos bitcoin com a mesma facilidade de enviar um e-mail" }, "demo": { "title": "🕹️ Teste a Alby", @@ -605,7 +605,7 @@ "choose_path": { "alby": { "description": "Crie uma conta ou realize o login na sua conta atual da Alby.", - "create_new": "Criar conta", + "create_new": "Criar nova conta", "title": "Alby" }, "other": { @@ -614,7 +614,7 @@ "description": "Conecte-se em sua carteira bitcoin ou em um dos vários servidores de carteira disponíveis.", "connect": "Conectar" }, - "description": "Você pode usar Alby, criando uma conta conosco ou conectando-se à sua própria carteira bitcoin.", + "description": "Você pode usar Alby criando uma conta conosco ou conectando-se nas carteiras bitcoin disponíveis.", "title": "Como você deseja usar a Alby?" }, "alby": { @@ -749,7 +749,7 @@ "app": "App", "podcast": "Podcast" }, - "open_location": "Abrir site" + "open_location": "Abrir link" }, "confirm_or_cancel": { "only_trusted": "Conecte-se apenas nos sites em que você confia." From 6c1d8c52fa2867ee2a553d3b42e9c5587da8631b Mon Sep 17 00:00:00 2001 From: escapedcat Date: Mon, 23 Jan 2023 10:53:44 +0100 Subject: [PATCH 088/123] chore: linting --- src/i18next.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18next.d.ts b/src/i18next.d.ts index cd85ae5d6a..43bf6f716e 100644 --- a/src/i18next.d.ts +++ b/src/i18next.d.ts @@ -3,6 +3,6 @@ import { resources, defaultNS } from "./i18n/i18nConfig"; declare module "i18next" { interface CustomTypeOptions { defaultNS: typeof defaultNS; - resources: typeof resources["en"]; + resources: (typeof resources)["en"]; } } From a3c61f5f3c8939ce88788c050c7108be6d6aaf5c Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 24 Jan 2023 10:55:44 +0700 Subject: [PATCH 089/123] fix: make account menu width fixed --- src/app/components/AccountMenu/index.tsx | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 048473791c..81f97deff4 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -12,7 +12,6 @@ import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import { useAccount } from "~/app/context/AccountContext"; import { useAccounts } from "~/app/context/AccountsContext"; -import { classNames } from "~/app/utils"; import msg from "~/common/lib/msg"; import utils from "~/common/lib/utils"; @@ -73,19 +72,8 @@ function AccountMenu({ showOptions = true }: Props) { } } - // account menu width: - // - ensure space for menu icon (24px) and left padding (pl-2) - // - expand to take up full possible width on mobile - // - constrain width on desktop screens to fit with the navbar - // - add a minimum width to match the dropdown menu - const accountMenuWidthClassname = `min-w-[theme(space.56)] max-w-[calc(100%-theme(space.2)-32px)] md:max-w-[280px] lg:max-w-[400px] xl:max-w-[500px]`; return ( -
+

From ba38cb4910ff4abd15d7481e8def8a2db90850c7 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 24 Jan 2023 10:56:17 +0700 Subject: [PATCH 090/123] fix: stop account menu selected icon getting squished --- src/app/components/AccountMenu/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index 81f97deff4..c12737f517 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -133,7 +133,7 @@ function AccountMenu({ showOptions = true }: Props) { {accountId === authAccount?.id && ( From c787c5e10c0d0363f270bf79dae11ee64ae3e00a Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Tue, 24 Jan 2023 17:22:37 +0530 Subject: [PATCH 091/123] chore: use fake indexed db --- package.json | 2 +- src/extension/background-script/db.ts | 5 +++-- yarn.lock | 24 +++++++++--------------- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 30105e889f..2dcebcc3e0 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-react": "^7.32.1", "eslint-plugin-react-hooks": "^4.6.0", - "fake-indexeddb": "^3.1.8", + "fake-indexeddb": "^4.0.1", "filemanager-webpack-plugin": "^8.0.0", "html-webpack-plugin": "^5.5.0", "husky": "^8.0.3", diff --git a/src/extension/background-script/db.ts b/src/extension/background-script/db.ts index 1f35b16120..08cb3b6e53 100644 --- a/src/extension/background-script/db.ts +++ b/src/extension/background-script/db.ts @@ -1,9 +1,10 @@ import Dexie from "dexie"; +import { IDBKeyRange, indexedDB } from "fake-indexeddb"; import browser from "webextension-polyfill"; import type { DbAllowance, - DbPayment, DbBlocklist, + DbPayment, DbPermission, } from "~/types"; @@ -14,7 +15,7 @@ class DB extends Dexie { permissions: Dexie.Table; constructor() { - super("LBE"); + super("LBE", { indexedDB: indexedDB, IDBKeyRange: IDBKeyRange }); this.version(1).stores({ allowances: "++id,&host,name,imageURL,tag,enabled,totalBudget,remainingBudget,lastPaymentAt,lnurlAuth,createdAt", diff --git a/yarn.lock b/yarn.lock index f0f5128dee..7ff48629d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3148,11 +3148,6 @@ core-js-pure@^3.20.2: resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.22.5.tgz#bdee0ed2f9b78f2862cda4338a07b13a49b6c9a9" integrity sha512-8xo9R00iYD7TcV7OrC98GwxiUEAabVWO3dix+uyWjnYrx9fyASLlIX+f/3p5dW5qByaP2bcZ8X/T47s55et/tA== -core-js@^3.4: - version "3.26.0" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.26.0.tgz#a516db0ed0811be10eac5d94f3b8463d03faccfe" - integrity sha512-+DkDrhoR4Y0PxDz6rurahuB+I45OsEUv8E1maPTB6OuHRohMMcznBq9TMpdpDMm/hUPob/mJJS3PqgbHpMTQgw== - core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" @@ -4343,12 +4338,12 @@ extract-zip@2.0.1: optionalDependencies: "@types/yauzl" "^2.9.1" -fake-indexeddb@^3.1.8: - version "3.1.8" - resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-3.1.8.tgz#229e3cff6fa7355aebb3f147b908d2efa4605d70" - integrity sha512-7umIgcdnDfNcjw0ZaoD6yR2BflngKmPsyzZC+sV2fdttwz5bH6B6CCaNzzD+MURfRg8pvr/aL0trfNx65FLiDg== +fake-indexeddb@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/fake-indexeddb/-/fake-indexeddb-4.0.1.tgz#09bb2468e21d0832b2177e894765fb109edac8fb" + integrity sha512-hFRyPmvEZILYgdcLBxVdHLik4Tj3gDTu/g7s9ZDOiU3sTNiGx+vEu1ri/AMsFJUZ/1sdRbAVrEcKndh3sViBcA== dependencies: - realistic-structured-clone "^2.0.1" + realistic-structured-clone "^3.0.0" fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" @@ -8018,12 +8013,11 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -realistic-structured-clone@^2.0.1: - version "2.0.4" - resolved "https://registry.yarnpkg.com/realistic-structured-clone/-/realistic-structured-clone-2.0.4.tgz#7eb4c2319fc3cb72f4c8d3c9e888b11647894b50" - integrity sha512-lItAdBIFHUSe6fgztHPtmmWqKUgs+qhcYLi3wTRUl4OTB3Vb8aBVSjGfQZUvkmJCKoX3K9Wf7kyLp/F/208+7A== +realistic-structured-clone@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/realistic-structured-clone/-/realistic-structured-clone-3.0.0.tgz#7b518049ce2dad41ac32b421cd297075b00e3e35" + integrity sha512-rOjh4nuWkAqf9PWu6JVpOWD4ndI+JHfgiZeMmujYcPi+fvILUu7g6l26TC1K5aBIp34nV+jE1cDO75EKOfHC5Q== dependencies: - core-js "^3.4" domexception "^1.0.1" typeson "^6.1.0" typeson-registry "^1.0.0-alpha.20" From 56aec6ee042ebd925d58b4574cee0196a8044989 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Tue, 24 Jan 2023 19:23:31 +0100 Subject: [PATCH 092/123] feat(tor): use in memory DB if indexeddb is not available To check we try to open a availability check db. If that fails we only load an in memory fake indexedDB. This is the case in Tor Browser --- src/extension/background-script/db.ts | 34 +++++++++++++++++++++--- src/extension/background-script/index.ts | 11 ++++++-- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/src/extension/background-script/db.ts b/src/extension/background-script/db.ts index 08cb3b6e53..e64678a2cf 100644 --- a/src/extension/background-script/db.ts +++ b/src/extension/background-script/db.ts @@ -8,14 +8,29 @@ import type { DbPermission, } from "~/types"; -class DB extends Dexie { +export function isIndexedDbAvailable() { + if ("indexedDB" in globalThis) { + return new Promise((resolve) => { + const req = globalThis.indexedDB.open("LBE-AVAILABILITY-CHECK", 1); + req.onsuccess = () => { + resolve(true); + }; + req.onerror = () => { + resolve(false); + }; + }); + } + return Promise.resolve(false); +} + +export class DB extends Dexie { allowances: Dexie.Table; payments: Dexie.Table; blocklist: Dexie.Table; permissions: Dexie.Table; constructor() { - super("LBE", { indexedDB: indexedDB, IDBKeyRange: IDBKeyRange }); + super("LBE"); this.version(1).stores({ allowances: "++id,&host,name,imageURL,tag,enabled,totalBudget,remainingBudget,lastPaymentAt,lnurlAuth,createdAt", @@ -35,6 +50,19 @@ class DB extends Dexie { this.permissions = this.table("permissions"); } + async openWithInMemoryDB() { + console.info("Opening DB using fake indexedDB"); + // @ts-expect-error _options is inherited from Dexie + this._options.indexedDB = indexedDB; + // @ts-expect-error _options is inherited from Dexie + this._options.IDBKeyRange = IDBKeyRange; + // @ts-expect-error _options is inherited from Dexie + this._deps.indexedDB = indexedDB; + // @ts-expect-error _options is inherited from Dexie + this._deps.IDBKeyRange = IDBKeyRange; + return this.open(); + } + async saveToStorage() { const allowanceArray = await this.allowances.toArray(); const paymentsArray = await this.payments.toArray(); @@ -136,6 +164,6 @@ class DB extends Dexie { } } -const db = new DB(); +export const db = new DB(); export default db; diff --git a/src/extension/background-script/index.ts b/src/extension/background-script/index.ts index 4bc1e08138..d786f73f2e 100644 --- a/src/extension/background-script/index.ts +++ b/src/extension/background-script/index.ts @@ -3,7 +3,7 @@ import utils from "~/common/lib/utils"; import { ExtensionIcon, setIcon } from "./actions/setup/setIcon"; import connectors from "./connectors"; -import db from "./db"; +import { isIndexedDbAvailable, db } from "./db"; import * as events from "./events"; import migrate from "./migrations"; import { router } from "./router"; @@ -123,7 +123,14 @@ async function init() { await state.getState().init(); console.info("State loaded"); - await db.open(); + const dbAvailable = await isIndexedDbAvailable(); + if (dbAvailable) { + console.info("Using indexedDB"); + await db.open(); + } else { + console.info("Using in memory DB"); + await db.openWithInMemoryDB(); + } console.info("DB opened"); events.subscribe(); From d0195c977519d94f42a10050e81425ec970e5064 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 25 Jan 2023 06:09:39 +0100 Subject: [PATCH 093/123] fix: enlarge default size of account menu --- src/app/components/AccountMenu/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/AccountMenu/index.tsx b/src/app/components/AccountMenu/index.tsx index c12737f517..3d023b6c7b 100644 --- a/src/app/components/AccountMenu/index.tsx +++ b/src/app/components/AccountMenu/index.tsx @@ -73,7 +73,7 @@ function AccountMenu({ showOptions = true }: Props) { } return ( -
+

From 8ba84d4ea46b33f6982d4d3d4a894cf233c8c863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 25 Jan 2023 06:59:56 +0100 Subject: [PATCH 094/123] fix: spacing, shadows in onboarding --- src/app/components/ConnectorForm/index.tsx | 2 +- src/app/screens/Onboard/TestConnection/index.tsx | 4 ++-- src/app/screens/Options/TestConnection/index.tsx | 9 ++------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/app/components/ConnectorForm/index.tsx b/src/app/components/ConnectorForm/index.tsx index b5063106e1..8f874f9f60 100644 --- a/src/app/components/ConnectorForm/index.tsx +++ b/src/app/components/ConnectorForm/index.tsx @@ -61,7 +61,7 @@ function ConnectorForm({ return ( -
+
{typeof title === "string" ? (

{title}

diff --git a/src/app/screens/Onboard/TestConnection/index.tsx b/src/app/screens/Onboard/TestConnection/index.tsx index 7f1946a9ce..f3ef14e7de 100644 --- a/src/app/screens/Onboard/TestConnection/index.tsx +++ b/src/app/screens/Onboard/TestConnection/index.tsx @@ -63,7 +63,7 @@ export default function TestConnection() { }, []); return ( -
+
{errorMessage && ( @@ -100,7 +100,7 @@ export default function TestConnection() {

{t("ready")}

-
+
-
+
{errorMessage && ( @@ -118,7 +118,7 @@ export default function TestConnection() {

{t("ready")}

-
+
- -
); From c9fcd22a1fba491dd9eabaac5503b241eb63682d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= <100827540+reneaaron@users.noreply.github.com> Date: Wed, 25 Jan 2023 11:35:15 +0100 Subject: [PATCH 095/123] feat: added nostr section (#1988) * feat: added nostr section * fix: updated preview paths * fix: replace --- src/app/screens/Discover/websites.json | 29 ++++++++++++++++++++++++++ src/i18n/locales/en/translation.json | 3 ++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json index 6b8d6ce12c..5a98436ac1 100644 --- a/src/app/screens/Discover/websites.json +++ b/src/app/screens/Discover/websites.json @@ -103,6 +103,35 @@ } ] }, + { + "title": "nostr", + "items": [ + { + "title": "Astral", + "subtitle": "A Twitter-like client with chat and one-click payments.", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/astral_thumbnail.png", + "url": "https://astral.ninja/" + }, + { + "title": "Snort", + "subtitle": "Fast nostr web client.", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/snort_thumbnail.png", + "url": "https://snort.social" + }, + { + "title": "emon.chat", + "subtitle": "Instant messaging client with built in lightning payments.", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/emon_thumbnail.svg", + "url": "https://emon.chat/" + }, + { + "title": "Yo, Sup?", + "subtitle": "The blue bird experience for Nostr.", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/yosup_thumbnail.svg", + "url": "https://yosup.app/" + } + ] + }, { "title": "miscellaneous", "items": [ diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 08c5b032c7..e61611f9f2 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -589,7 +589,8 @@ "entertaiment": "Entertaiment", "shopping": "Shopping", "miscellaneous": "Miscellaneous", - "showcases": "Showcases" + "showcases": "Showcases", + "nostr": "Nostr" }, "tips": { "title": "Your Alby wallet is ready", From 49e5baacc745a3b1be92b4dd5b3b3dbc9c9c5a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BSN=20=E2=88=9E/21M=20=E2=82=BF?= Date: Sun, 22 Jan 2023 12:57:03 +0000 Subject: [PATCH 096/123] Translated using Weblate (German) Currently translated at 100.0% (469 of 469 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/de/ --- src/i18n/locales/de/translation.json | 198 +++++++++++++++------------ 1 file changed, 108 insertions(+), 90 deletions(-) diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index c1269a5e58..8fdafbfb0c 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -4,22 +4,22 @@ "nav": { "welcome": "Willkommen", "password": "Dein Passwort", - "connect": "Ihr Lightning Konto", + "connect": "Dein Lightning Konto", "done": "Fertig" }, "set_password": { "title": "Passwort zum Entsperren festlegen", - "description": "Dieses Passwort wird verwendet, um deine Wallet zu schützen und den Zugang zur Browser-Erweiterung zu ermöglichen. Es kann nicht zurückgesetzt werden und ist unabhängig von deinem Alby-Kontopasswort.", + "description": "Dieses Passwort wird verwendet, um deine Brieftasche zu schützen und Zugriff auf die Browsererweiterung zu gewähren. Es kann nicht zurückgesetzt werden und ist von deinem Alby-Kontopasswort getrennt.", "choose_password": { - "label": "Wähle ein Passwort zum Entsperren:" + "label": "Wähle ein Entsperrpasswort:" }, "errors": { "mismatched_password": "Die Passwörter stimmen nicht überein.", - "enter_password": "Bitte gib ein Passwort ein.", + "enter_password": "Bitte gebe ein Passwort ein.", "confirm_password": "Bitte bestätige dein Passwort." }, "confirm_password": { - "label": "Wiederhole deine Passworteingabe:" + "label": "Lass uns es bestätigen, dass du es richtig eingegeben hast:" } }, "test_connection": { @@ -27,11 +27,11 @@ "actions": { "delete_edit_account": "Ungültiges Konto löschen und erneut bearbeiten" }, - "ready": "Super, du hast es geschafft, es kann losgehen!", - "initializing": "Dein Account wird initialisiert. Bitte warte, das kann ein wenig dauern.", + "ready": "Großartig, du bist startklar!", + "initializing": "Ihr Konto wird initialisiert. Bitte warten Sie, dies kann eine Minute dauern...", "connection_error": "Verbindungsfehler", - "connection_taking_long": "Das Verbinden dauert länger als erwartet...sind deine Angaben richtig? Ist dein Node erreichbar?", - "contact_support": "Wenn du Hilfe brauchst, kontaktiere bitte support@getalby.com" + "connection_taking_long": "Der Verbindungsversuch dauert länger als erwartet... Sind deine Angaben korrekt? Ist dein Knoten erreichbar?", + "contact_support": "Wenn du Hilfe benötigst, wende dich bitte an support@getalby.com" }, "title": "Willkommen bei Alby" }, @@ -44,20 +44,20 @@ }, "url": { "label": "REST-API-Host und -Port", - "placeholder": "https://Ihr-Knoten-URL:8080" + "placeholder": "https://Dein-Knoten-URL:8080" }, "macaroon": { "label": "Makrone (HEX-Format)" }, "page": { - "description": "Du benötigst deinen URL-Knoten und eine Macaroon mit Lese- und Sendeberechtigungen (z.B. admin.macaroon)", + "description": "Du benötigst deinen URL-Knoten und eine Macaroon mit Lese- und Sendeberechtigung (z.B. admin.macaroon)", "title": "Verbinde dich zu deinem LND Node" }, "title": "LND" }, "lndhub_bluewallet": { "uri": { - "label": "BlueWallet-Export-URI" + "label": "BlueWallet Export URI" }, "errors": { "invalid_uri": "Ungültige BlueWallet-URI", @@ -65,7 +65,7 @@ }, "title": "BlueWallet", "page": { - "title": "Verbinde dich mit Bluewallet", + "title": "Verbinde dich mit BlueWallet", "description": "Wähle in der BlueWallet die Wallet, die du verbinden willst, öffne sie, klicke auf \"...\", klicke auf Export/Backup, um den QR Code anzuzeigen. Scanne ihn dann mit deiner Webcam." } }, @@ -79,22 +79,22 @@ "connection_failed": "Verbindung fehlgeschlagen. Ist dein LNDHub-URI korrekt?" }, "page": { - "title": "Verbinden dich mit LNDHub", + "title": "Verbinde dich mit LNDHub", "description": "Gebe hier deine LNDHub-Zugangsdaten-URI ein oder scanne den QR-Code mit deiner Webcam." } }, "lnbits": { "admin_key": { - "label": "LNbits-Admin-Schlüssel", - "placeholder": "Ihr 32-stelliger Admin-Schlüssel" + "label": "LNbits Admin Schlüssel", + "placeholder": "Dein 32-stelliger Admin-Schlüssel" }, "title": "LNbits", "page": { "title": "Verbinde dich mit <0>LNbits", - "instructions": "Wähle in LNbits die Wallet, die du verbinden willst, öffne sie, klicke auf API Info und kopiere den Admin Key. Füge ihn unten ein:" + "instructions": "Wähle in LNbits die Wallet, die du verbinden möchtest, öffne sie, klicke auf API Info und kopiere den Admin Key. Füge ihn unten ein:" }, "url": { - "label": "LNbits-URL" + "label": "LNbits URL" }, "errors": { "connection_failed": "Verbindung fehlgeschlagen. Hast du die richtige URL und den richtigen Admin-Schlüssel?" @@ -102,86 +102,86 @@ }, "mynode": { "page": { - "instructions": "Klicke auf deiner myNode Übersicht auf den Button <0>Wallet für deinen <0>Lightning Service. Klicke jetzt auf den Button <0>Pair Wallet unterhalb dem Tab <0>Status . Gib dein Passwort ein, wenn es verlang wird. <1/> Wähle das Dropdown Menü und entscheide dich für eine Pairingoption. Abhängig von deinem Setup kannst du entweder für lokale Verbindung wählen <0>Lightning (REST + Local IP) oder für TOR die Auswahl <0>Lightning (REST + Tor).", - "title": "Verbinde dich mit <0>myNode" + "instructions": "Klicke auf deiner myNode-Startseite auf die Schaltfläche <0>Wallet für Ihren <0>Llightning-Dienst.<1/> Klicke nun auf die Schaltfläche <0>Wallet koppeln unter der <0 Registerkarte >Status. Gebe dein Passwort ein, wenn du dazu aufgefordert wirst.<1/> Wählen dann das Dropdown-Menü und wähle eine Kopplungsoption. Abhängig von deiner Einrichtung könnte entweder die Verbindung <0>Llightning (REST + Local IP) oder die Verbindung <0>Llightning (REST + Tor) verwenden.", + "title": "Verbinde dich <0>myNode" }, "rest_url": { "label": "Indconnect REST URL", - "placeholder": "Indconnect://IhrKnoten:8080?..." + "placeholder": "Indconnect://DeinKnoten:8080?..." }, "title": "meinKnoten" }, "umbrel": { "page": { - "instructions": "Gehe in deine Regenschirm Seite zu <0>verbinde Wallet. Wähle <0>lndconnect REST und kopiere <0>lndconnect URL. (Abhängig von deinem Setup kannst du entweder eine lokale Verbindung verwenden oder die Verbindung über TOR.)", - "title": "Verbinde dich mit deinem <0>Regenschirm-Knoten" + "instructions": "Gehe in deine Umbrel Seite zu <0>verbinde Wallet. Wähle <0>lndconnect REST und kopiere <0>lndconnect URL. (Abhängig von deinem Setup kannst du entweder eine lokale Verbindung verwenden oder die Verbindung über TOR.)", + "title": "Verbinde dich <0>Umbrel-Knoten" }, "rest_url": { - "label": "Indconnect-REST-URL", + "label": "Indconnect-REST URL", "placeholder": "lndconnect://deinknoten:8080?..." }, - "title": "Regenschirm" + "title": "Umbrel" }, - "description": "Verbinde dich mit deiner externen Lightning Wallet oder Node", + "description": "Stelle eine Verbindung zu deiner externen Lightning-Wallet oder deinem Knoten her", "citadel": { "page": { "instructions": "Das funktioniert aktuell nicht, wenn 2FA ausgewählt ist.", - "title": "Verbinde dich mit dem Knoten <0>Zitadelle" + "title": "Verbinde dich <0>Citadel Knoten" }, - "title": "Zitadelle", + "title": "Citadel", "password": { - "label": "Zitadelle Passwort" + "label": "Citadel Passwort" }, "url": { - "label": "Zitadelle URL", - "placeholder": "http://zitadelle.local" + "label": "Citadel URL", + "placeholder": "http://citadel.local" } }, "raspiblitz": { "page": { "instructions1": "Du benötigst deine Node-Onion-Adresse, Port und eine Macaroon mit Lese- und Sendeberechtigungen (z. B. admin.macaroon).<1/><1/><0>SSH in deinem <0>RaspiBlitz.<1/>Führe den Befehl <0>sudo cat /mnt/hdd/tor/lndrest/hostname aus.<1/>Kopiere die <0>.onion-Adresse und füge deine Eingabe unten ein .<1/>Füge deinen <0>Port nach der Onion-Adresse hinzu, der Standardport ist <0>:8080.", - "title": "Verbinde dich mit deinem <0>RaspiBlitz-Knoten", + "title": "Verbinde dich mit deinem <0>RaspiBlitz Knoten", "instructions2": "Wähle <0>VERBINDEN.<1/>Wähle <0>EXPORTIEREN.<1/>Wähle <0>HEX.<1/>Kopiere das <0>adminMacaroon.<1/>Füge die Makrone in die Eingabe unten ein." }, - "title": "Raspiblitz", + "title": "RaspiBlitz", "rest_api_host": { - "label": "REST-API-Host", - "placeholder": "Ihr-Knoten-Onion-Adresse: Port" + "label": "REST API Host", + "placeholder": "Deine Knoten-Onion-Adresse: Port" } }, "eclair": { - "title": "Eclair Brieftasche", + "title": "Eclair", "page": { - "title": "Verbinde dich mit <0>Eclair", - "instructions": "Du benötigst deine Eclair-URL und dein Passwort." + "title": "Verbinde dich mit <0>Eclair", + "instructions": "Du benötigst deine Eclair URL und dein Passwort." }, "password": { "label": "Eclair Passwort" }, "url": { - "label": "Eclair Brieftasche URL", + "label": "Eclair URL", "placeholder": "http://localhost:8080" } }, "start9": { "page": { - "instructions": "<0>Hinweis: Derzeit unterstützen wir nur LND, aber wir werden in Zukunft c-lightning-Unterstützung hinzufügen!<1/>Klicke auf deinem Embassy-Dashboard auf den Dienst <0>Lightning Network Daemon. <1/>Wählen die Registerkarte <0>Eigenschaften.<1/>Kopiere nun die <0>LND Connect REST URL.", - "title": "Verbinde dich mit deinem <0>Embassy-Knoten" + "instructions": "<0>Hinweis: Derzeit unterstützen wir nur LND, aber wir werden in Zukunft c-lightning Unterstützung hinzufügen!<1/>Klicke auf deinem Embassy Dashboard auf den Dienst <0>lightning network Daemon. <1/>Wähle die Registerkarte <0>Eigenschaften.<1/>Kopiere nun die <0>LND Connect REST URL.", + "title": "Verbinde mit deinem <0>Embassy Knoten" }, "rest_url": { "placeholder": "lndconnect://deinknoten:8080?...", - "label": "Indconnect-REST-URL" + "label": "Indconnect REST URL" }, "title": "Start9" }, "bitcoin_beach": { - "title": "Bitcoin Beach Brieftasche", + "title": "Bitcoin Beach Wallet", "page": { - "title": "Verbinde dich mit <0>Bitcoin Beach Wallet" + "title": "Verbinde dich mit <0> Bitcoin Beach Wallet" } }, "bitcoin_jungle": { - "title": "Bitcoin Jungle Geldbörse", + "title": "Bitcoin Jungle Wallet", "page": { "title": "Verbinde dich mit <0>Bitcoin Jungle Wallet" } @@ -194,7 +194,7 @@ "label": "Gib deinen SMS-Bestätigungscode ein" }, "jwt": { - "label": "Gebe deinen JWT-Token ein", + "label": "Gebe deinen JWT Token ein", "info": "Das {{label}}-Login wird derzeit aktualisiert. Wenn du ein fortgeschrittener Benutzer bist, kannst du dir dein JWT-Token holen, indem du über <0>Web Wallet (wallet.mainnet.galoy.io)<1/><1/> anmeldest. Das JWT sieht so aus: < 2>eyJhbG...<1/><1/>" }, "actions": { @@ -203,31 +203,31 @@ }, "errors": { "failed_to_request_sms": "SMS-Code konnte nicht angefordert werden", - "failed_to_login_sms": "Anmeldung mit SMS-Code fehlgeschlagen", + "failed_to_login_sms": "Anmeldung mit SMS Code fehlgeschlagen", "setup_failed": "Einrichtung fehlgeschlagen", "missing_jwt": "JWT fehlt, Anmeldung nicht möglich.", "invalid_jwt": "ungültige JWT übermittelt" } }, "btcpay": { - "title": "BTCPay-Server", + "title": "BTCPay Server", "page": { "title": "Verbinde dich mit deinem BTCPay LND-Knoten", - "instructions": "Navigiere zu deinem BTCPayServer und melde dich als Administrator an. Gehen zu Servereinstellungen > Dienste > LND-Rest – Siehe Informationen. Klicke dann auf „QR-Code-Informationen anzeigen“ und kopiere die QR-Code-Daten. Füge es unten ein:" + "instructions": "Navigiere zu deinem BTCPayServer und melde dich als Administrator an. Gehe zu Servereinstellungen > Dienste > LND-Rest – Siehe Informationen. Klicke dann auf „QR-Code-Informationen anzeigen“ und kopiere die QR-Code-Daten. Füge es unten ein:" }, "config": { "label": "Konfigurationsdaten", "placeholder": "config=https://your-btc-pay.org/lnd-config/212121/lnd.config" }, "errors": { - "connection_failed": "Verbindung fehlgeschlagen. Ist die BTCPay-Verbindungs-URL korrekt und zugänglich?" + "connection_failed": "Verbindung fehlgeschlagen. Ist die BTCPay Verbindungs URL korrekt und zugänglich?" } }, "commando": { "title": "Core Lightning", "page": { - "title": "Stelle eine Verbindung zu deinem Core Lightning-Knoten her", - "instructions": "Stelle sicher, dass du Core Lightning Version 0.12.0 oder neuer hast, das Commando-Plugin ausgeführt wird und dein Knoten über das Lightning-Netzwerk zugänglich ist. Erstelle eine Rune, indem du „lightning-cli commando-rune“ ausführst." + "title": "Stelle eine Verbindung zu deinem Core Lightning Knoten her", + "instructions": "Stelle sicher, dass du die Core Lightning Version 0.12.0 oder neuer hast, das Commando-Plugin ausgeführt wird und dein Knoten über das Llightning Network zugänglich ist. Erstelle eine Rune, indem du „lightning-cli commando-rune“ ausführst." }, "host": { "label": "Host" @@ -252,18 +252,18 @@ "placeholder": "config=https://your-btc-pay.org/lnd-config/212121/lnd.config" }, "errors": { - "connection_failed": "Verbindung fehlgeschlagen. Ist dein Core Lightning-Knoten online und verwendet es das Commando-Plugin?" + "connection_failed": "Verbindung fehlgeschlagen. Ist dein Core Lightning Knoten online und verwendet es das Commando Plugin?" } }, "kollider": { "title": "Kollider", - "description": "Anmeldung bei deinem Kollider-Konto", + "description": "Anmeldung bei deinem Kollider Konto", "page": { "description": "Du hast noch kein Konto? <0>Jetzt anmelden!", "title": "Verbinde dich mit deinem Kollider-Konto" }, "password": { - "label": "Gebe dein Kollider-Passwort ein" + "label": "Gebe dein Kollider Passwort ein" }, "currency": { "label": "Wähle dein Währungskonto" @@ -272,7 +272,7 @@ "connection_failed": "Verbindung fehlgeschlagen. Bist du dir sicher, dass die Kontodaten korrekt sind?" }, "username": { - "label": "Gebe dein Kollider-Benutzernamen ein" + "label": "Gebe dein Kollider Benutzernamen ein" } }, "title": "Verbinde Lightning Wallet" @@ -280,7 +280,7 @@ "unlock": { "unlock_error": { "link": "Zurücksetzen und neuen Account erstellen", - "help": "Deine Kontodaten werden mit dem Freischalt-Passwort verschlüsselt. Wenn du dein Freischalt-Passwort wirklich vergessen hast, muss das Lightning-Konto zurückgesetzt und erneut hinzugefügt werden." + "help": "Deine Kontodaten werden mit deinem Entsperrpasswort verschlüsselt. Wenn du dein Entsperrpasswort wirklich vergessen hast, must du das Lightning-Konto zurücksetzen und erneut hinzufügen." }, "errors": { "invalid_password": "ungültiges Passwort" @@ -290,7 +290,7 @@ "part1": "Brauchst du Hilfe? Kontaktiere uns", "part2": "Alby-Unterstützung" }, - "unlock_password": "Ihr Freischalt-Passwort" + "unlock_password": "Dein Freischalt Passwort" }, "settings": { "nostr": { @@ -306,19 +306,19 @@ }, "lnurl_auth": { "legacy_lnurl_auth": { - "title": "Legacy-Signatur für LNDhub und LNBits", + "title": "Legacy Signatur für LNDhub und LNbits", "subtitle": "Das Signieren von Nachrichten und die Anmeldung mit LNDhub- (z.B. BlueWallet) und LNbits-Konten wurde geändert (März 2022). Wenn du dich mit diesen Konten angemeldet hast, kannst du noch die alte Signiermethode aktivieren. Diese Option wird später entfernt werden, stelle also sicher, dass du auf das neue Login umsteigst." }, "legacy_lnurl_auth_202207": { "subtitle": "Die Schlüsselerzeugung für LNURL-auth hat sich geändert (Juli 2022). Alby war nicht kompatibel mit anderen Implementierungen. Dies wurde geändert, aber jetzt werden andere Anmeldeschlüssel verwendet. Wenn du dich bisher mit LNURL-auth angemeldet hast, kannst du noch die alte Methode aktivieren. Diese Option wird später entfernt werden, stelle sicher, dass du auf die neue Anmeldung umsteigst.", "title": "Vererbte LNURL-Authentifizierung" }, - "title": "LNURL-Authentifizierung", - "hint": "ist ein allgemeines Authentifizierungsprotokoll. Es authentifiziert den Benutzer anhand digitaler Signaturen. Das Protokoll erfordert keine anderen identifizierenden Informationen wie Passwörter, E-Mails, Benutzernamen oder ähnliches. Mit Alby kannst du deine Lightning-Konten verwenden, um sich sicher auf Websites anzumelden.
Um mit anderen Wallets kompatibel zu sein, mussten wir ein paar Änderungen vornehmen, die du hier konfigurieren kannst.
Idealerweise sind alle diese Optionen ausgeschaltet. Verwende sie nur, wenn du alte Konten hast." + "title": "LNURL Authentifizierung", + "hint": "ist ein allgemeines Authentifizierungsprotokoll. Es authentifiziert den Benutzer anhand digitaler Signaturen. Das Protokoll erfordert keine anderen identifizierenden Informationen wie Passwörter, E-Mails, Benutzernamen oder ähnliches. Mit Alby kannst du deine Lightning-Konten verwenden, um sich sicher auf Websites anzumelden.
Um mit anderen Wallets kompatibel zu sein, mussten wir ein paar Änderungen vornehmen, die du hier konfigurieren kannst.
Idealerweise sind alle diese Optionen ausgeschaltet. Verwende es nur, wenn du alte Konten hast." }, "browser_notifications": { - "subtitle": "Zahlungs- und authentifizierungsbezogene Benachrichtigungen.", - "title": "Browser-Benachrichtigungen" + "subtitle": "Zahlungs- und Authentifizierungsbezogene Benachrichtigungen.", + "title": "Browser Benachrichtigungen" }, "website_enhancements": { "title": "Erweiterungen der Website", @@ -330,11 +330,11 @@ "label": "Gib ein neues Entsperrkennwort ein:" }, "submit": { - "label": "Änder du" + "label": "Ändern" }, "errors": { "enter_password": "Bitte gebe ein neues Freischalt-Passwort ein.", - "confirm_password": "Bitte bestätigen dein Passwort.", + "confirm_password": "Bitte bestätige dein Passwort.", "mismatched_password": "Die Passwörter stimmen nicht überein." }, "success": "Passwort erfolgreich geändert", @@ -355,7 +355,7 @@ }, "exchange": { "title": "Austausch Quelle", - "subtitle": "Quelle für Bbitcoin-Wechselkurse" + "subtitle": "Quelle für Bitcoin Wechselkurse" }, "language": { "title": "Sprache", @@ -363,7 +363,7 @@ }, "currency": { "title": "Währung", - "subtitle": "Zeigen Sie die Beträge zusätzlich in dieser Währung an" + "subtitle": "Zeige die Beträge zusätzlich in dieser Währung an" }, "camera_access": { "title": "Kamerazugriff", @@ -391,14 +391,14 @@ "home": { "default_view": { "is_blocked_hint": "Alby ist derzeit auf dem {{host}} deaktiviert", - "recent_transactions": "kürzliche Transaktionen", + "recent_transactions": "Jüngste Transaktionen", "no_transactions": "Es wurden noch keine Transaktionen mit Alby getätigt.", - "block_removed": "{{Host}} aktiviert. Bitte laden Sie die Website neu." + "block_removed": "{{Host}} aktiviert. Bitte lade die Website neu." }, "allowance_view": { "sats_used": "verwendete Sats", "no_transactions": "Noch keine Transaktionen auf <0>{{name}}.", - "recent_transactions": "kürzliche Transaktionen", + "recent_transactions": "Jüngste Transaktionen", "allowance": "Erlaubnis" }, "actions": { @@ -411,14 +411,14 @@ "incoming": "Eingehend" } }, - "recent_transactions": "kürzliche Transaktionen" + "recent_transactions": "Jüngste Transaktionen" }, "accounts": { "title": "Konten", "export": { "title": "Konto exportieren", "screen_reader": "Kontodaten exportieren", - "waiting": "Warten auf LndHub-Daten...", + "waiting": "Warten auf LndHub Daten...", "scan_qr": "Importiere diese Brieftasche in Zeus oder BlueWallet, indem du den QRCode scannst.", "your_ln_address": "Deine Lightning Adresse:", "tip_mobile": "Tipp: Verwende diese Geldbörse mit deinem Mobilgerät", @@ -432,17 +432,17 @@ "title": "Konto bearbeiten" }, "remove": { - "confirm": "Bist du dir sicher, dass du das Konto entfernen möchten: {{Name}}? \nDies kann nicht rückgängig gemacht werden. Wenn du dich mit diesem Konto bei Webseiten angemeldet hast, verlierst du möglicherweise den Zugriff auf diese." + "confirm": "Bist du dir sicher, dass du das Konto entfernen möchtest: {{Name}}? \nDies kann nicht rückgängig gemacht werden. Wenn du dich mit diesem Konto bei Websites angemeldet haben, verlierst du möglicherweise den Zugriff auf diese." }, "actions": { "add_account": "Konto hinzufügen" } }, "enable": { - "allow": "Erlauben Sie {{host}} zu:", + "allow": "Erlaube {{host}} zu:", "title": "Verbinden", "request1": "Genehmigung für Transaktionen anfordern", - "request2": "Fordern Sie Rechnungen und Lightning Informationen an", + "request2": "Fordere deine Rechnungen und Lightning Informationen an", "block_and_ignore": "Blockieren und Ignorieren von {{host}}", "block_added": "Hinzugefügt {{host}} zur Blocklist, bitte Website neu laden." }, @@ -520,7 +520,8 @@ }, "confirm_request_permission": { "title": "Antrag genehmigen", - "allow": "Erlaube die Ausführung dieser Website:" + "allow": "Erlaube die Ausführung dieser Website:", + "always_allow": "Denke an meine Wahl und frage nicht noch einmal" }, "lnurlauth": { "submit": "Anmeldung", @@ -545,7 +546,7 @@ }, "confirm_sign_message": { "title": "Unterschrift", - "content": "Auf dieser Website werden Sie aufgefordert, zu signieren:" + "content": "Auf dieser Website wirst du aufgefordert, zu signieren:" }, "confirm_keysend": { "title": "Zahlung genehmigen", @@ -559,7 +560,7 @@ "actions": { "pay_now": "Jetzt bezahlen" }, - "success": "Zahlung von {{Betrag}} erfolgreich gesendet!" + "success": "Zahlung von einem {{Betrag}} erfolgreich gesendet!" }, "lnurlpay": { "amount": { @@ -621,7 +622,7 @@ }, "errors": { "enter_password": "Bitte gebe dein Passwort ein.", - "confirm_password": "Bestätige dein Passwort", + "confirm_password": "Bitte bestätige dein Passwort.", "mismatched_password": "Die Passwörter stimmen nicht überein." } } @@ -630,8 +631,8 @@ "choose_path": { "other": { "and_more": "& mehr...", - "title": "Andere Wallet", - "description": "Verbinde dich mit deiner bestehenden Lightning Wallet oder Node und wählen aus verschiedenen Anschlüssen.", + "title": "Andere Wallets", + "description": "Verbinde dich mit deiner bestehenden Lightning Wallet oder Node und wähle aus verschiedenen Anschlüssen.", "connect": "Verbinden" }, "alby": { @@ -675,7 +676,8 @@ "pin": { "title": "📌 Pin für die Alby-Erweiterung", "description2": "Suche in der Liste der Erweiterungen von Alby und klicke auf das Pinsymbol, um es an die Symbolleiste anzuheften", - "description3": "Das war's! Um auf Alby zuzugreifen, klicke einfach auf das Alby-Symbol" + "description3": "Das war's! Um auf Alby zuzugreifen, klicke einfach auf das Alby-Symbol", + "description1": "<0>Um einfach auf Alby zuzugreifen, klicke auf das Erweiterungssymbol <1/> <2>in der oberen rechten Ecke Ihres Browsers" } } } @@ -698,7 +700,7 @@ "toasts": { "connection_error": { "double_check": "Überprüfe nochmals deine Verbindungseinstellungen", - "if_ssl_errors": "und wenn es SSL-Fehler gibt (z.B. ERR_CERT_AUTHORITY_INVALID), klicke auf \"Erweitert\" und fahr fort, das Zertifikat zu akzeptieren.", + "if_ssl_errors": "und wenn es SSL-Fehler gibt (z.B. ERR_CERT_AUTHORITY_INVALID), klicke auf \"Erweitert\" und fahre fort, das Zertifikat zu akzeptieren.", "visit_guides": "Besuche unsere Leitfäden für weitere Hilfe", "what_you_can_do": "Das kannst du tun:" }, @@ -711,7 +713,7 @@ }, "companion_download_info": { "using_tor": "Klicke hier zum Weitermachen, wenn du den TOR Browser verwendest", - "description": "Du versuchst, dich mit einem Knoten hinter Tor zu verbinden. Um dies zu tun, musst du entweder die Alby-Begleit-App installiert haben oder Tor laufen lassen. (Wenn du dir unsicher bist, empfehlen wir die Alby-Begleit-App).", + "description": "Du versuchst, dich mit einem Knoten hinter Tor zu verbinden. Dazu muss entweder die Alby Companion App installiert oder Tor ausgeführt werden. (Wenn du dir nicht sicher bist, empfehlen wir die Alby Companion App.)", "download_here": "Lade dein Alby-Begleiter hier herunter!", "or": "Oder:" }, @@ -777,10 +779,10 @@ "optional": "Optional", "feedback": "Rückmeldung", "error": "Fehler", - "websites": "Websites", + "websites": "Webseite", "loading": "Laden", "sats_one": "sat", - "success": "Erfolgreich!", + "success": "Erfolgreich", "password": "Passwort", "advanced": "Fortgeschrittene", "description_full": "Vollständige Beschreibung", @@ -810,7 +812,8 @@ "lock": "Schloss", "connect": "Verbinden", "save": "Speichern", - "copy": "Kopieren" + "copy": "Kopieren", + "remember": "Denke an meine Wahl und frage nicht noch einmal" }, "discover": "Entdecken", "errors": { @@ -818,7 +821,8 @@ "payment_failed": "Zahlung fehlgeschlagen" }, "message": "Nachricht", - "response": "Antwort" + "response": "Antwort", + "success_message": "{{amount}}{{fiatAmount}} gesendet an {{destination}}" }, "permissions": { "commando": { @@ -846,7 +850,9 @@ "decode": "Dekodiere eine Bolt11/Bolt12/Rune-Kette.", "listpeers": "Liste der Knoten, die mit diesem Knoten verbunden sind oder offene Kanäle haben.", "listsendpays": "Ruft den Status aller sendpay-Befehle ab.", - "pay": "Sende eine Zahlung an eine BOLT11-Rechnung." + "pay": "Sende eine Zahlung an eine BOLT11-Rechnung.", + "setchannel": "Konfiguriere die für einen Kanal beworbenen Gebühren / htlc-Bereiche.", + "listnodes": "Nodes auflisten, von denen der Node über Nachrichten erfahren hat." }, "lnd": { "channelbalance": "Du erhältst einen Bericht über den Gesamtbetrag der Mittel für alle offenen Kanäle.", @@ -858,7 +864,19 @@ "getinfo": "Abrufen der Knoteninformationen.", "listinvoices": "Erhalte eine Liste aller Rechnungen.", "connectpeer": "Stelle eine Verbindung zu einer entfernten Gegenstelle her.", - "disconnectpeer": "Trenne die Verbindung zu einer entfernten Gegenstelle." + "disconnectpeer": "Trenne die Verbindung zu einer entfernten Gegenstelle.", + "getnetworkinfo": "Abrufen grundlegender Statistiken über die bekannte Kanalkurve.", + "getnodeinfo": "Abrufen der Kanalinformationen für einen Knoten.", + "gettransactions": "Abrufen einer Liste aller für die Wallets relevanten Transaktionen.", + "listpeers": "Erhalte eine Liste aller derzeit aktiven Peers.", + "lookupinvoice": "Rechnungsdetails nachschlagen.", + "queryroutes": "Abfrage nach einer möglichen Route.", + "sendtoroute": "Führe eine Zahlung über die angegebene Route durch.", + "routermc": "Lese den internen Status der Missionskontrolle.", + "decodepayreq": "Entschlüssel eine Zahlungsanforderungszeichenfolge.", + "addinvoice": "Erstelle neue Rechnungen.", + "listpayments": "Erhalte eine Liste aller ausgehenden Zahlungen.", + "verifymessage": "Überprüfe eine Signatur über eine Nachricht." }, "nostr": { "getpublickey": "Lese deinen öffentlichen Schlüssel.", From dd4dc270afbe9dd494a64952b153639c554f56e0 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Mon, 23 Jan 2023 14:42:09 +0000 Subject: [PATCH 097/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 86.9% (408 of 469 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 9387b34a71..9f8478029c 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -522,7 +522,7 @@ "errors": { "status": "Erro: O status de autenticação não está correto" }, - "submit": "Logar", + "submit": "Fazer login", "title": "Autenticação" }, "lnurlwithdraw": { @@ -604,12 +604,12 @@ }, "choose_path": { "alby": { - "description": "Crie uma conta ou realize o login na sua conta atual da Alby.", + "description": "Crie uma conta ou faça o login na sua conta atual da Alby.", "create_new": "Criar nova conta", - "title": "Alby" + "title": "Conta Alby" }, "other": { - "title": "Outras Carteiras", + "title": "Outras Contas", "and_more": "& mais...", "description": "Conecte-se em sua carteira bitcoin ou em um dos vários servidores de carteira disponíveis.", "connect": "Conectar" @@ -647,7 +647,7 @@ "forgot_password": "Esqueceu sua senha?", "optional_lightning_note": { "part4": "saiba mais", - "part3": ". É o jeito mais simples para você receber Bitcoins na Rede Relâmpago.", + "part3": ". É o jeito mais simples para você receber bitcoin na rede relâmpago.", "part2": "endereço relâmpago", "part1": "Ao criar uma conta Alby, você pode escolher um" }, @@ -694,7 +694,7 @@ "remove": "Remover", "copy": "Copiar", "back": "Voltar", - "log_in": "Logar", + "log_in": "Fazer login", "remember": "Lembrar minha escolha e não perguntar novamente" }, "errors": { From b8bb0f0140289e5034c8ec7a3a18c3195cedbf71 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Tue, 24 Jan 2023 15:07:41 +0000 Subject: [PATCH 098/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 86.9% (408 of 469 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 9f8478029c..00b4357c1a 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -604,7 +604,7 @@ }, "choose_path": { "alby": { - "description": "Crie uma conta ou faça o login na sua conta atual da Alby.", + "description": "Crie uma nova conta Alby ou faça o login na sua conta existente.", "create_new": "Criar nova conta", "title": "Conta Alby" }, From 1604f7eeac7c78a89499daacfece03d75eea8e6e Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 13:32:30 +0000 Subject: [PATCH 099/123] Update @types/chrome to version 0.0.210 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 30105e889f..581773f50a 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", "@trivago/prettier-plugin-sort-imports": "^4.0.0", - "@types/chrome": "^0.0.208", + "@types/chrome": "^0.0.210", "@types/crypto-js": "^4.1.1", "@types/elliptic": "^6.4.14", "@types/lodash.merge": "^4.6.7", diff --git a/yarn.lock b/yarn.lock index f0f5128dee..f8aa8a3148 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1288,10 +1288,10 @@ dependencies: "@types/node" "*" -"@types/chrome@^0.0.208": - version "0.0.208" - resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.208.tgz#c52992e46723c783d3fd84a8b90dd8b3e87af67f" - integrity sha512-VDU/JnXkF5qaI7WBz14Azpa2VseZTgML0ia/g/B1sr9OfdOnHiH/zZ7P7qCDqxSlkqJh76/bPc8jLFcx8rHJmw== +"@types/chrome@^0.0.210": + version "0.0.210" + resolved "https://registry.yarnpkg.com/@types/chrome/-/chrome-0.0.210.tgz#6bc137e111cf42857af5012d47c036adc079616e" + integrity sha512-VSjQu1k6a/rAfuqR1Gi/oxHZj4+t6+LG+GobNI3ZWI6DQ+fmphNSF6TrLHG6BYK2bXc9Gb4c1uXFKRRVLaGl5Q== dependencies: "@types/filesystem" "*" "@types/har-format" "*" From 6261f4da545802faa5d348c507a4db6cb820e37b Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 13:32:36 +0000 Subject: [PATCH 100/123] Update lnmessage to version 0.0.15 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 30105e889f..483692d182 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "html5-qrcode": "^2.3.4", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", - "lnmessage": "^0.0.14", + "lnmessage": "^0.0.15", "lodash.merge": "^4.6.2", "lodash.pick": "^4.4.0", "pubsub-js": "^1.9.4", diff --git a/yarn.lock b/yarn.lock index f0f5128dee..f791fa28a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6262,10 +6262,10 @@ listr2@^5.0.5: through "^2.3.8" wrap-ansi "^7.0.0" -lnmessage@^0.0.14: - version "0.0.14" - resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.14.tgz#0c9c96802ad61d0feceb9751b77f3195f7b7056a" - integrity sha512-bD+iUAhYfh7ky2uqIFX4FdhJOxGYItNO2ILH2WKV4LgMzzFyjg+YqEf2ReRjXLepd3zpVBLxLD/PDZxHwgQzbw== +lnmessage@^0.0.15: + version "0.0.15" + resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.15.tgz#80b536d9229df688d9fba0a38c359e7333930339" + integrity sha512-jh7FQG8AxtjSRMh59Q0HnE2S0TIGlK7bI/Nmfz6aVfo8DiGh1iGsMFZhmucJmCerAax4JEe0PqRZixQO/LLELw== dependencies: buffer "^6.0.3" crypto-js "^4.1.1" From 950f90a3dda2c1b64320311d43f051b09e3dc117 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Wed, 25 Jan 2023 21:41:09 +0000 Subject: [PATCH 101/123] Update react-router-dom to version 6.7.0 --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index 2bd64fbe29..da51281e8f 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "react-loading-skeleton": "^3.1.0", "react-modal": "^3.16.1", "react-qr-code": "^2.0.11", - "react-router-dom": "^6.6.1", + "react-router-dom": "^6.7.0", "react-toastify": "^9.1.1", "stream": "^0.0.2", "tailwindcss": "^3.2.4", diff --git a/yarn.lock b/yarn.lock index 5453c59e1d..25377680cf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1004,10 +1004,10 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1" integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== -"@remix-run/router@1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.2.1.tgz#812edd4104a15a493dda1ccac0b352270d7a188c" - integrity sha512-XiY0IsyHR+DXYS5vBxpoBe/8veTeoRpMHP+vDosLZxL5bnpetzI0igkxkLZS235ldLzyfkxF+2divEwWHP3vMQ== +"@remix-run/router@1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@remix-run/router/-/router-1.3.0.tgz#b6ee542c7f087b73b3d8215b9bf799f648be71cb" + integrity sha512-nwQoYb3m4DDpHTeOwpJEuDt8lWVcujhYYSFGLluC+9es2PyLjm+jjq3IeRBQbwBtPLJE/lkuHuGHr8uQLgmJRA== "@sinclair/typebox@^0.24.1": version "0.24.20" @@ -7908,20 +7908,20 @@ react-qr-code@^2.0.11: prop-types "^15.8.1" qr.js "0.0.0" -react-router-dom@^6.6.1: - version "6.6.1" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.6.1.tgz#1b96ec0b2cefa7319f1251383ea5b41295ee260d" - integrity sha512-u+8BKUtelStKbZD5UcY0NY90WOzktrkJJhyhNg7L0APn9t1qJNLowzrM9CHdpB6+rcPt6qQrlkIXsTvhuXP68g== +react-router-dom@^6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-6.7.0.tgz#0249f4ca4eb704562b8b0ff29caeb928c3a6ed38" + integrity sha512-jQtXUJyhso3kFw430+0SPCbmCmY1/kJv8iRffGHwHy3CkoomGxeYzMkmeSPYo6Egzh3FKJZRAL22yg5p2tXtfg== dependencies: - "@remix-run/router" "1.2.1" - react-router "6.6.1" + "@remix-run/router" "1.3.0" + react-router "6.7.0" -react-router@6.6.1: - version "6.6.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.6.1.tgz#17de6cf285f2d1c9721a3afca999c984e5558854" - integrity sha512-YkvlYRusnI/IN0kDtosUCgxqHeulN5je+ew8W+iA1VvFhf86kA+JEI/X/8NqYcr11hCDDp906S+SGMpBheNeYQ== +react-router@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-6.7.0.tgz#db262684c13b5c2970694084ae9e8531718a0681" + integrity sha512-KNWlG622ddq29MAM159uUsNMdbX8USruoKnwMMQcs/QWZgFUayICSn2oB7reHce1zPj6CG18kfkZIunSSRyGHg== dependencies: - "@remix-run/router" "1.2.1" + "@remix-run/router" "1.3.0" react-toastify@^9.1.1: version "9.1.1" From 2f55d4a760f5828939a614be52ad9fa8592c13fc Mon Sep 17 00:00:00 2001 From: channelninja Date: Fri, 27 Jan 2023 11:16:07 +0100 Subject: [PATCH 102/123] feat: add channel.ninja to discover websites --- src/app/screens/Discover/websites.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json index 5a98436ac1..4efd594bb2 100644 --- a/src/app/screens/Discover/websites.json +++ b/src/app/screens/Discover/websites.json @@ -182,6 +182,12 @@ "subtitle": "Get booked and paid in Bitcoin", "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lncal_thumbnail.svg", "url": "https://lncal.com/" + }, + { + "title": "channel.ninja", + "subtitle": "Get recommended channel partners for your lightning node", + "logo": "https://channel.ninja/logo192.png", + "url": "https://channel.ninja/" } ] } From 5c0b93ceab5b191a7a3dfa4687f40eaadddaebf9 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Thu, 26 Jan 2023 16:39:40 +0530 Subject: [PATCH 103/123] fix: avoid showing welcome screen on re-install --- src/extension/background-script/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extension/background-script/index.ts b/src/extension/background-script/index.ts index 4bc1e08138..f7724569ab 100644 --- a/src/extension/background-script/index.ts +++ b/src/extension/background-script/index.ts @@ -158,7 +158,7 @@ browser.runtime.onInstalled.addListener(handleInstalled); console.info("Welcome to Alby"); init().then(() => { - if (isFirstInstalled) { + if (isFirstInstalled && !state.getState().getAccount()) { utils.openUrl("welcome.html"); } if (isRecentlyUpdated) { From 31f784b3b50223d5f5a4cba8adf680bec7f4ff31 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sat, 28 Jan 2023 10:54:38 +0100 Subject: [PATCH 104/123] Update src/app/screens/Discover/websites.json --- src/app/screens/Discover/websites.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json index 4efd594bb2..0d6d20c0c7 100644 --- a/src/app/screens/Discover/websites.json +++ b/src/app/screens/Discover/websites.json @@ -186,7 +186,7 @@ { "title": "channel.ninja", "subtitle": "Get recommended channel partners for your lightning node", - "logo": "https://channel.ninja/logo192.png", + "logo": "https://fra1.digitaloceanspaces.com/alby-storage/alby-extension-website-screen/channelninja.png", "url": "https://channel.ninja/" } ] From ce9b672190e4ac2ae4853aa32b3fe71629660282 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Sat, 28 Jan 2023 11:51:12 +0100 Subject: [PATCH 105/123] chore: update @noble/secp256k1 --- package.json | 2 +- yarn.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 22007f7383..5dcbdc855b 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@bitcoin-design/bitcoin-icons-react": "^0.1.9", "@headlessui/react": "^1.7.7", "lnc-web": "git+https://github.com/bumi/lnc-web.git#remove-window-dependency", - "@noble/secp256k1": "^1.7.0", + "@noble/secp256k1": "^1.7.1", "@tailwindcss/forms": "^0.5.3", "@tailwindcss/line-clamp": "^0.4.2", "axios": "^1.2.2", diff --git a/yarn.lock b/yarn.lock index 29fff718c8..6cfc1479f5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -965,7 +965,7 @@ strict-event-emitter "^0.2.4" web-encoding "^1.1.5" -"@noble/secp256k1@^1.7.0": +"@noble/secp256k1@^1.7.1": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" integrity sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw== From f06080774a4bcb3135d333a632fc52977c56d697 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 28 Jan 2023 12:24:50 +0000 Subject: [PATCH 106/123] Update lnmessage to version 0.0.17 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index da51281e8f..7303a4174d 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "html5-qrcode": "^2.3.4", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", - "lnmessage": "^0.0.15", + "lnmessage": "^0.0.17", "lodash.merge": "^4.6.2", "lodash.pick": "^4.4.0", "pubsub-js": "^1.9.4", diff --git a/yarn.lock b/yarn.lock index 25377680cf..96f61be04c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6262,10 +6262,10 @@ listr2@^5.0.5: through "^2.3.8" wrap-ansi "^7.0.0" -lnmessage@^0.0.15: - version "0.0.15" - resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.15.tgz#80b536d9229df688d9fba0a38c359e7333930339" - integrity sha512-jh7FQG8AxtjSRMh59Q0HnE2S0TIGlK7bI/Nmfz6aVfo8DiGh1iGsMFZhmucJmCerAax4JEe0PqRZixQO/LLELw== +lnmessage@^0.0.17: + version "0.0.17" + resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.17.tgz#e209a7ce7f6e88350a2886e62f0fb29b09da06b8" + integrity sha512-DZMXkw1yz+1mCldmnCksQ1Jcd4ALDfdY1gGEu4MoxGswLCeAv98OSfAP8cSLoGh3cSuZKR4lnwg9vwbTsm7SUQ== dependencies: buffer "^6.0.3" crypto-js "^4.1.1" From 266285e020de8ffbcd50fb085d39faa2b0b3729e Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sat, 28 Jan 2023 12:25:02 +0000 Subject: [PATCH 107/123] Update msw to version 1.0.0 --- package.json | 2 +- yarn.lock | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index da51281e8f..efde446e65 100644 --- a/package.json +++ b/package.json @@ -115,7 +115,7 @@ "jest-webextension-mock": "^3.8.8", "lint-staged": "^13.1.0", "mini-css-extract-plugin": "^2.7.2", - "msw": "^0.49.2", + "msw": "^1.0.0", "postcss": "^8.4.21", "postcss-cli": "^10.1.0", "postcss-loader": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index 25377680cf..37421f7807 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6687,10 +6687,10 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msw@^0.49.2: - version "0.49.2" - resolved "https://registry.yarnpkg.com/msw/-/msw-0.49.2.tgz#c815fa514a1b3532e3d3af01d308bb63329ad1e2" - integrity sha512-70/E10f+POE2UmMw16v8PnKatpZplpkUwVRLBqiIdimpgaC3le7y2yOq9JmOrL15jpwWM5wAcPTOj0f550LI3g== +msw@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/msw/-/msw-1.0.0.tgz#4f8e63aa23912561a63b99ff560a089da6969418" + integrity sha512-8QVa1RAN/Nzbn/tKmtimJ+b2M1QZOMdETQW7/1TmBOZ4w+wJojfxuh1Hj5J4FYdBgZWW/TK4CABUOlOM4OjTOA== dependencies: "@mswjs/cookies" "^0.2.2" "@mswjs/interceptors" "^0.17.5" @@ -6708,7 +6708,7 @@ msw@^0.49.2: node-fetch "^2.6.7" outvariant "^1.3.0" path-to-regexp "^6.2.0" - strict-event-emitter "^0.2.6" + strict-event-emitter "^0.4.3" type-fest "^2.19.0" yargs "^17.3.1" @@ -8678,12 +8678,10 @@ strict-event-emitter@^0.2.4: dependencies: events "^3.3.0" -strict-event-emitter@^0.2.6: - version "0.2.7" - resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.2.7.tgz#5326a21811551995ab5f8158ea250de57fb2b04e" - integrity sha512-TavbHJ87WD2tDbKI7bTrmc6U4J4Qjh8E9fVvFkIFw2gCu34Wxstn2Yas0+4D78FJN8DOTEzxiT+udBdraRk4UQ== - dependencies: - events "^3.3.0" +strict-event-emitter@^0.4.3: + version "0.4.4" + resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.4.4.tgz#47e98eb408fbed187460592385f6547ca200cffb" + integrity sha512-rTCFXHBxs2/XvNc7InSkSwUkwyQ0T9eop/Qvm0atNUXpBxjwsJ5yb7Ih/tgHbjPdeCcB4aCP8K4tuo7hNKssNg== string-argv@^0.3.1: version "0.3.1" From 33cc1261bfa591208958850b56104755f0b068d9 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Sun, 29 Jan 2023 15:32:01 +0000 Subject: [PATCH 108/123] Update all development Yarn dependencies (2023-01-29) --- package.json | 6 +- yarn.lock | 156 +++++++++++++++++++++++++-------------------------- 2 files changed, 80 insertions(+), 82 deletions(-) diff --git a/package.json b/package.json index c153995278..fb168dc387 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "@commitlint/config-conventional": "^17.4.2", "@jest/types": "^29.3.1", "@playwright/test": "^1.29.2", - "@swc/core": "^1.3.24", + "@swc/core": "^1.3.27", "@swc/jest": "^0.2.24", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", @@ -105,7 +105,7 @@ "css-loader": "^6.7.3", "css-minimizer-webpack-plugin": "^4.2.2", "del-cli": "^5.0.0", - "eslint": "^8.31.0", + "eslint": "^8.32.0", "eslint-config-prettier": "^8.6.0", "eslint-plugin-import": "^2.27.5", "eslint-plugin-react": "^7.32.1", @@ -119,7 +119,7 @@ "jest-webextension-mock": "^3.8.8", "lint-staged": "^13.1.0", "mini-css-extract-plugin": "^2.7.2", - "msw": "^0.49.2", + "msw": "^0.49.3", "postcss": "^8.4.21", "postcss-cli": "^10.1.0", "postcss-loader": "^7.0.2", diff --git a/yarn.lock b/yarn.lock index b84fa81a3a..9c89feb42e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1033,71 +1033,71 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@swc/core-darwin-arm64@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.24.tgz#d41fc574cb5049def9001903680fdd924f065052" - integrity sha512-rR+9UpWm+fGXcipsjCst2hIL1GYIbo0YTLhJZWdIpQD6KRHHJMFXiydMgQQkDj2Ml7HpqUVgxj6m4ZWYL8b0OA== - -"@swc/core-darwin-x64@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.24.tgz#0f7a3960b91cbd7f95f25542b29d0e08bde4f59d" - integrity sha512-px+5vkGtgPH0m3FkkTBHynlRdS5rRz+lK+wiXIuBZFJSySWFl6RkKbvwkD+sf0MpazQlqwlv/rTOGJBw6oDffg== - -"@swc/core-linux-arm-gnueabihf@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.24.tgz#a0fdd97b8341806b57290217830a5d1ab7d0b193" - integrity sha512-jLs8ZOdTV4UW4J12E143QJ4mOMONQtqgAnuhBbRuWFzQ3ny1dfoC3P1jNWAJ2Xi59XdxAIXn0PggPNH4Kh34kw== - -"@swc/core-linux-arm64-gnu@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.24.tgz#0536d03e12dd471ebafc180599488404aebb65cf" - integrity sha512-A/v0h70BekrwGpp1DlzIFGcHQ3QQ2PexXcnnuIBZeMc9gNmHlcZmg3EcwAnaUDiokhNuSUFA/wV94yk1OqmSkw== - -"@swc/core-linux-arm64-musl@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.24.tgz#54f46ffea1bf6ffcbe7c62037efaefdfb5115214" - integrity sha512-pbc9eArWPTiMrbpS/pJo0IiQNAKAQBcBIDjWBGP1tcw2iDXYLw4bruwz9kI/VjakbshWb8MoE4T5ClkeuULvSw== - -"@swc/core-linux-x64-gnu@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.24.tgz#c2b5cef83f8afd2a57d0eafbac083562d50cd0e6" - integrity sha512-pP5pOLlY1xd352qo7rTlpVPUI9/9VhOd4b3Lk+LzfZDq9bTL2NDlGfyrPiwa5DGHMSzrugH56K2J68eutkxYVA== - -"@swc/core-linux-x64-musl@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.24.tgz#3459d01f9bf745568a4196c1993987f3d4a98303" - integrity sha512-phNbP7zGp+Wcyxq1Qxlpe5KkxO7WLT2kVQUC7aDFGlVdCr+xdXsfH1MzheHtnr0kqTVQX1aiM8XXXHfFxR0oNA== - -"@swc/core-win32-arm64-msvc@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.24.tgz#85a18c844c00d66bf46db99d9c98e9550b4d28f5" - integrity sha512-qhbiJTWAOqyR+K9xnGmCkOWSz2EmWpDBstEJCEOTc6FZiEdbiTscDmqTcMbCKaTHGu8t+6erVA4t65/Eg6uWPA== - -"@swc/core-win32-ia32-msvc@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.24.tgz#18318199ba06cab4ead8f6122b9f30b3f452b1e7" - integrity sha512-JfghIlscE4Rz+Lc08lSoDh+R0cWxrISed5biogFfE6vZqhaDnw3E5Qshqw7O3pIaiq8L2u1nmzuyP581ZmpbRA== - -"@swc/core-win32-x64-msvc@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.24.tgz#b53746787e5af021787134d393fd67b0431f90d9" - integrity sha512-3AmJRr0hwciwDBbzUNqaftvppzS8v9X/iv/Wl7YaVLBVpPfQvaZzfqLycvNMGLZb5vIKXR/u58txg3dRBGsJtw== - -"@swc/core@^1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.24.tgz#ef6b30267c1bbd48af62cbc91370fe9b3f5d6a23" - integrity sha512-QMOTd0AgiUT3K1crxLRqd3gw0f3FC8hhH1vvlIlryvYqU4c+FJ/T2G4ZhMKLxQlZ/jX6Rhk0gKINZRBxy2GFyQ== +"@swc/core-darwin-arm64@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.27.tgz#247b275d505c2462ce08cca4e322becbca8e428a" + integrity sha512-IKlxkhEy99CnP9nduaf5IJWIFcr6D5cZCjYmCs7nWkjMV+aAieyDO9AX4LT8AcHy6CF7ByOX7SKoqk+gVMAaKw== + +"@swc/core-darwin-x64@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.27.tgz#11090424c9bfd0d3e799abb06c1fa6a07abf5ed9" + integrity sha512-MtabZIhFf/dL3vs6UMbd+vJsjIkm2NaFqulGV0Jofy2bfVZPTj/b5pXeOlUsTWy7JcH1uixjdx4RvJRyvqJxQA== + +"@swc/core-linux-arm-gnueabihf@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.27.tgz#a41b40e056ed0887686e04a30b395521fe3f2d47" + integrity sha512-XELMoGcUTAkk+G4buwIIhu6AIr1U418Odt22HUW8+ZvV+Wty2ICgR/myOIhM3xMb6U2L8ay+evMqoVNMQ0RRTg== + +"@swc/core-linux-arm64-gnu@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.27.tgz#61705b0d534472a9dbde575594c61ef1377d0075" + integrity sha512-O6vtT6bnrVR9PzEIuA5U7tIfYo7bv97H9K9Vqy2oyHNeGN0H36DKwS4UqPreHtziXNF5+7ubdUYUkrG/j8UnUQ== + +"@swc/core-linux-arm64-musl@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.27.tgz#4fb86dcf70b7fc1aba51d82bba00bb2c4134a980" + integrity sha512-Oa0E1i7dOTWpaEZumKoNbTE/Ap+da6nlhqKVUdYrFDrOBi25tz76SdxZIyvAszzmgY89b5yd1naourKmkPXpww== + +"@swc/core-linux-x64-gnu@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.27.tgz#691cc341f8dd7f93a8e01044a2ad8b0e7111d65c" + integrity sha512-S3v9H8oL2a8Ur6AjQyhkC6HfBVPOxKMdBhcZmdNuVgEUHbHdbf/Lka85F9IOYXEarMn0FtQw3ywowS22O9L5Uw== + +"@swc/core-linux-x64-musl@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.27.tgz#a3e1c98513d6e8594c612ab3a671f10e2644dc2e" + integrity sha512-6DDkdXlOADpwICFZTRphCR+cIeS8aEYh4NlyzBito0mOWwIIdfCgALzhkTQOzTOkcD42bP97CIoZ97hqV/puOg== + +"@swc/core-win32-arm64-msvc@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.27.tgz#70c173f78d3dfd97a0d99374d8f6d55b6fa1c4ef" + integrity sha512-baxfH4AbEcaTNo08wxV0W6hiMXwVCxPS4qc0amHpXPti92unvSqeDR1W3C9GjHqzXlWtmCRsq8Ww1pal6ZVLrw== + +"@swc/core-win32-ia32-msvc@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.27.tgz#f34d40710da7939ea32c9a3a4334581468ae09aa" + integrity sha512-7iLJnH71k5qCwxv9NcM/P7nIEzTsC7r1sIiQW6bu+CpC8qZvwl0PS+XvQRlLly2gCZM+Le98tksYG14MEh+Hrw== + +"@swc/core-win32-x64-msvc@1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.27.tgz#f3b131d952808569d99dd4851e95910667743bd5" + integrity sha512-mFM907PDw/jrQ44+TRjIVGEOy2Mu06mMMz0HPMFuRsBzl5t0Kajp3vmn8FkkpS9wH5982VPi6hPYVTb7QJo5Qg== + +"@swc/core@^1.3.27": + version "1.3.27" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.27.tgz#189da5fd132beba28106f5e5fcf43ce127c800dc" + integrity sha512-praRNgpeYGvwDIm/Cl6JU+yHMvwVraL0U6ejMgGyzvpcm1FVsZd1/EYXGqzbBJ0ALv7Gx4eK56h4GnwV6d4L0w== optionalDependencies: - "@swc/core-darwin-arm64" "1.3.24" - "@swc/core-darwin-x64" "1.3.24" - "@swc/core-linux-arm-gnueabihf" "1.3.24" - "@swc/core-linux-arm64-gnu" "1.3.24" - "@swc/core-linux-arm64-musl" "1.3.24" - "@swc/core-linux-x64-gnu" "1.3.24" - "@swc/core-linux-x64-musl" "1.3.24" - "@swc/core-win32-arm64-msvc" "1.3.24" - "@swc/core-win32-ia32-msvc" "1.3.24" - "@swc/core-win32-x64-msvc" "1.3.24" + "@swc/core-darwin-arm64" "1.3.27" + "@swc/core-darwin-x64" "1.3.27" + "@swc/core-linux-arm-gnueabihf" "1.3.27" + "@swc/core-linux-arm64-gnu" "1.3.27" + "@swc/core-linux-arm64-musl" "1.3.27" + "@swc/core-linux-x64-gnu" "1.3.27" + "@swc/core-linux-x64-musl" "1.3.27" + "@swc/core-win32-arm64-msvc" "1.3.27" + "@swc/core-win32-ia32-msvc" "1.3.27" + "@swc/core-win32-x64-msvc" "1.3.27" "@swc/jest@^0.2.24": version "0.2.24" @@ -4137,10 +4137,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.31.0: - version "8.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" - integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== +eslint@^8.32.0: + version "8.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.32.0.tgz#d9690056bb6f1a302bd991e7090f5b68fbaea861" + integrity sha512-nETVXpnthqKPFyuY2FNjz/bEd6nbosRgKbkgS/y1C7LJop96gYHWpiguLecMHQ2XCPxn77DS0P+68WzG6vkZSQ== dependencies: "@eslint/eslintrc" "^1.4.1" "@humanwhocodes/config-array" "^0.11.8" @@ -6713,10 +6713,10 @@ ms@2.1.3, ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -msw@^0.49.2: - version "0.49.2" - resolved "https://registry.yarnpkg.com/msw/-/msw-0.49.2.tgz#c815fa514a1b3532e3d3af01d308bb63329ad1e2" - integrity sha512-70/E10f+POE2UmMw16v8PnKatpZplpkUwVRLBqiIdimpgaC3le7y2yOq9JmOrL15jpwWM5wAcPTOj0f550LI3g== +msw@^0.49.3: + version "0.49.3" + resolved "https://registry.yarnpkg.com/msw/-/msw-0.49.3.tgz#c4ca29eddda3e82ad9e36918dda4a7428eddd7fe" + integrity sha512-kRCbDNbNnRq5LC1H/NUceZlrPAvSrMH6Or0mirIuH69NY84xwDruPn/hkXTovIK1KwDwbk+ZdoSyJlpiekLxEA== dependencies: "@mswjs/cookies" "^0.2.2" "@mswjs/interceptors" "^0.17.5" @@ -6734,7 +6734,7 @@ msw@^0.49.2: node-fetch "^2.6.7" outvariant "^1.3.0" path-to-regexp "^6.2.0" - strict-event-emitter "^0.2.6" + strict-event-emitter "^0.4.3" type-fest "^2.19.0" yargs "^17.3.1" @@ -8703,12 +8703,10 @@ strict-event-emitter@^0.2.4: dependencies: events "^3.3.0" -strict-event-emitter@^0.2.6: - version "0.2.7" - resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.2.7.tgz#5326a21811551995ab5f8158ea250de57fb2b04e" - integrity sha512-TavbHJ87WD2tDbKI7bTrmc6U4J4Qjh8E9fVvFkIFw2gCu34Wxstn2Yas0+4D78FJN8DOTEzxiT+udBdraRk4UQ== - dependencies: - events "^3.3.0" +strict-event-emitter@^0.4.3: + version "0.4.4" + resolved "https://registry.yarnpkg.com/strict-event-emitter/-/strict-event-emitter-0.4.4.tgz#47e98eb408fbed187460592385f6547ca200cffb" + integrity sha512-rTCFXHBxs2/XvNc7InSkSwUkwyQ0T9eop/Qvm0atNUXpBxjwsJ5yb7Ih/tgHbjPdeCcB4aCP8K4tuo7hNKssNg== string-argv@^0.3.1: version "0.3.1" From 6f977929ebbe8c538506151cf84123dafcc99429 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Sun, 29 Jan 2023 16:37:01 +0100 Subject: [PATCH 109/123] chore: update lockfile --- yarn.lock | 136 +++++++++++++++++++++++++++--------------------------- 1 file changed, 68 insertions(+), 68 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0905af1ede..ef08786e3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1033,71 +1033,71 @@ dependencies: "@sinonjs/commons" "^1.7.0" -"@swc/core-darwin-arm64@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.24.tgz#d41fc574cb5049def9001903680fdd924f065052" - integrity sha512-rR+9UpWm+fGXcipsjCst2hIL1GYIbo0YTLhJZWdIpQD6KRHHJMFXiydMgQQkDj2Ml7HpqUVgxj6m4ZWYL8b0OA== - -"@swc/core-darwin-x64@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.24.tgz#0f7a3960b91cbd7f95f25542b29d0e08bde4f59d" - integrity sha512-px+5vkGtgPH0m3FkkTBHynlRdS5rRz+lK+wiXIuBZFJSySWFl6RkKbvwkD+sf0MpazQlqwlv/rTOGJBw6oDffg== - -"@swc/core-linux-arm-gnueabihf@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.24.tgz#a0fdd97b8341806b57290217830a5d1ab7d0b193" - integrity sha512-jLs8ZOdTV4UW4J12E143QJ4mOMONQtqgAnuhBbRuWFzQ3ny1dfoC3P1jNWAJ2Xi59XdxAIXn0PggPNH4Kh34kw== - -"@swc/core-linux-arm64-gnu@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.24.tgz#0536d03e12dd471ebafc180599488404aebb65cf" - integrity sha512-A/v0h70BekrwGpp1DlzIFGcHQ3QQ2PexXcnnuIBZeMc9gNmHlcZmg3EcwAnaUDiokhNuSUFA/wV94yk1OqmSkw== - -"@swc/core-linux-arm64-musl@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.24.tgz#54f46ffea1bf6ffcbe7c62037efaefdfb5115214" - integrity sha512-pbc9eArWPTiMrbpS/pJo0IiQNAKAQBcBIDjWBGP1tcw2iDXYLw4bruwz9kI/VjakbshWb8MoE4T5ClkeuULvSw== - -"@swc/core-linux-x64-gnu@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.24.tgz#c2b5cef83f8afd2a57d0eafbac083562d50cd0e6" - integrity sha512-pP5pOLlY1xd352qo7rTlpVPUI9/9VhOd4b3Lk+LzfZDq9bTL2NDlGfyrPiwa5DGHMSzrugH56K2J68eutkxYVA== - -"@swc/core-linux-x64-musl@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.24.tgz#3459d01f9bf745568a4196c1993987f3d4a98303" - integrity sha512-phNbP7zGp+Wcyxq1Qxlpe5KkxO7WLT2kVQUC7aDFGlVdCr+xdXsfH1MzheHtnr0kqTVQX1aiM8XXXHfFxR0oNA== - -"@swc/core-win32-arm64-msvc@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.24.tgz#85a18c844c00d66bf46db99d9c98e9550b4d28f5" - integrity sha512-qhbiJTWAOqyR+K9xnGmCkOWSz2EmWpDBstEJCEOTc6FZiEdbiTscDmqTcMbCKaTHGu8t+6erVA4t65/Eg6uWPA== - -"@swc/core-win32-ia32-msvc@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.24.tgz#18318199ba06cab4ead8f6122b9f30b3f452b1e7" - integrity sha512-JfghIlscE4Rz+Lc08lSoDh+R0cWxrISed5biogFfE6vZqhaDnw3E5Qshqw7O3pIaiq8L2u1nmzuyP581ZmpbRA== - -"@swc/core-win32-x64-msvc@1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.24.tgz#b53746787e5af021787134d393fd67b0431f90d9" - integrity sha512-3AmJRr0hwciwDBbzUNqaftvppzS8v9X/iv/Wl7YaVLBVpPfQvaZzfqLycvNMGLZb5vIKXR/u58txg3dRBGsJtw== - -"@swc/core@^1.3.24": - version "1.3.24" - resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.24.tgz#ef6b30267c1bbd48af62cbc91370fe9b3f5d6a23" - integrity sha512-QMOTd0AgiUT3K1crxLRqd3gw0f3FC8hhH1vvlIlryvYqU4c+FJ/T2G4ZhMKLxQlZ/jX6Rhk0gKINZRBxy2GFyQ== +"@swc/core-darwin-arm64@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-arm64/-/core-darwin-arm64-1.3.30.tgz#fb9b20a46455f49597e760e4dfe829196e0fe12e" + integrity sha512-GZ4mZZbH77N8renK34A3Lkhl6x8z+c97SCbl43pn5E0Z0sifohA8WNhrtucKrUdid0svYibwotJzeFNpDtg7gQ== + +"@swc/core-darwin-x64@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-darwin-x64/-/core-darwin-x64-1.3.30.tgz#2fd86123d697c024f7fe45995a3ef5a4e5e4eef0" + integrity sha512-ppGrAJmKpT3vFr2vGaxXFL8JqHsb6kSAj0dVYTNYicl3c6XOjnMiNSfu6HRbdmXt0VpFHhC5L/a7Ta89mQ1sJA== + +"@swc/core-linux-arm-gnueabihf@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.3.30.tgz#a67ffdc80a63b68471bc176206237bd68576be40" + integrity sha512-XQYY/VNRnM0/779ehfMgh2poO3reOANvfzOprF8xmGK20+DxFqbMWjHhJutscQuEjLtdwk/LfgCkwmTaB1hhwg== + +"@swc/core-linux-arm64-gnu@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.3.30.tgz#7f9b2f860b8abac6636b6ffb46004da4589b513f" + integrity sha512-ME4BjMYSXana0Lfswa3aQW0rTdmR9wa1NGQ3t6MYLdBVm+76Xwe29JKlOfnI1iCCtcbRBoWy4dlhyuxW8DN7cw== + +"@swc/core-linux-arm64-musl@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.3.30.tgz#b917db1f71b8382e033b8bcbeccd8a326747c41b" + integrity sha512-h3X9Pn1m5kuFSW8lJyDiMB4ELNZFJ+QxLva5GCxZDArQttkNeY4tMNWFcaG44xUXeywffrgjpXO7Yj2JGzmG4g== + +"@swc/core-linux-x64-gnu@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.3.30.tgz#fc63a70a34d444b0a9460caeb239c630e8cf905b" + integrity sha512-vfPR8cakx5IZQSpNuXPrpkRprBdVxXsvN5JWN3fpuNVIgFFo3q8njihaItujKvePIHQwov4achfBZlm4JRitWQ== + +"@swc/core-linux-x64-musl@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.3.30.tgz#07003373a8813c3b82bd8ad2c2ea500a8cd6c9cd" + integrity sha512-jtfv8N+00E2RMTVjwfTfimeqzo0B9FmbbSkzlnLvkmV8xDAPyLmX7v/xL5YiVJRLeSrlJ7DmkCSxLzpJao73dw== + +"@swc/core-win32-arm64-msvc@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.3.30.tgz#473eb708d2a162dd91bca2327e540ad3be57051d" + integrity sha512-fX3T6JzS5F8JJ/UZQWrZfdml8nLuSzgA0EFKetTNa5AHh1x9ltShmlFOJ3OPpD9BKI/QcQSLxyoAjxt7NtAnaQ== + +"@swc/core-win32-ia32-msvc@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.3.30.tgz#7ea1b9b9d68d91050d25baf300a119f699ccb5a7" + integrity sha512-m88NjTcVFHFAciWRWTW7NbeQPrzjKKBzSoSPukhjvKSWQNk5v6BBbTAKpymNGQssPn5WLarC2QlQzCwjyh1QLA== + +"@swc/core-win32-x64-msvc@1.3.30": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.3.30.tgz#43bd3cd1d48a0b7659a8834e0a3e5a3322cea8ca" + integrity sha512-HsePRjbdD5XsnS8NkN+MmhtUyjF16cU3COd92DjRYKsB1rMDE51itfacBvOeZPHFV6VkrLsakubAZCMc+3d/Ag== + +"@swc/core@^1.3.27": + version "1.3.30" + resolved "https://registry.yarnpkg.com/@swc/core/-/core-1.3.30.tgz#f4b3b55d37f766d6246829528b123bc4c8068866" + integrity sha512-pg6GWw615EwCh4vJ5k7xll1E4WJSPeINrRvF/EPyBvNNhlXR3s6+KZevJTx3PpA5PXjprDR0aqwi0/aigSCAPA== optionalDependencies: - "@swc/core-darwin-arm64" "1.3.24" - "@swc/core-darwin-x64" "1.3.24" - "@swc/core-linux-arm-gnueabihf" "1.3.24" - "@swc/core-linux-arm64-gnu" "1.3.24" - "@swc/core-linux-arm64-musl" "1.3.24" - "@swc/core-linux-x64-gnu" "1.3.24" - "@swc/core-linux-x64-musl" "1.3.24" - "@swc/core-win32-arm64-msvc" "1.3.24" - "@swc/core-win32-ia32-msvc" "1.3.24" - "@swc/core-win32-x64-msvc" "1.3.24" + "@swc/core-darwin-arm64" "1.3.30" + "@swc/core-darwin-x64" "1.3.30" + "@swc/core-linux-arm-gnueabihf" "1.3.30" + "@swc/core-linux-arm64-gnu" "1.3.30" + "@swc/core-linux-arm64-musl" "1.3.30" + "@swc/core-linux-x64-gnu" "1.3.30" + "@swc/core-linux-x64-musl" "1.3.30" + "@swc/core-win32-arm64-msvc" "1.3.30" + "@swc/core-win32-ia32-msvc" "1.3.30" + "@swc/core-win32-x64-msvc" "1.3.30" "@swc/jest@^0.2.24": version "0.2.24" @@ -4137,10 +4137,10 @@ eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.31.0: - version "8.31.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.31.0.tgz#75028e77cbcff102a9feae1d718135931532d524" - integrity sha512-0tQQEVdmPZ1UtUKXjX7EMm9BlgJ08G90IhWh0PKDCb3ZLsgAOHI8fYSIzYVZej92zsgq+ft0FGsxhJ3xo2tbuA== +eslint@^8.32.0: + version "8.33.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.33.0.tgz#02f110f32998cb598c6461f24f4d306e41ca33d7" + integrity sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA== dependencies: "@eslint/eslintrc" "^1.4.1" "@humanwhocodes/config-array" "^0.11.8" From c13679286317d7b7b3adcdafbf8d7581e3424721 Mon Sep 17 00:00:00 2001 From: escapedcat Date: Mon, 30 Jan 2023 00:01:51 +0800 Subject: [PATCH 110/123] chore: adjust error text Co-authored-by: Michael Bumann --- src/app/screens/LNURLPay/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/screens/LNURLPay/index.tsx b/src/app/screens/LNURLPay/index.tsx index db7057bc6a..03ecc95e62 100644 --- a/src/app/screens/LNURLPay/index.tsx +++ b/src/app/screens/LNURLPay/index.tsx @@ -130,7 +130,7 @@ function LNURLPay() { ); if (response.status >= 500) { - toast.error("Payment aborted: Could not connect to server"); + toast.error("Payment aborted: Recipient server error"); return; } From 46675d37ad1ca911d7852b15acff1eee6db4f33a Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:25:28 +0000 Subject: [PATCH 111/123] Update dexie to version 3.2.3 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68b29e2625..c3a692f532 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "bolt11": "^1.4.0", "crypto-js": "^4.1.1", "dayjs": "^1.11.7", - "dexie": "^3.2.2", + "dexie": "^3.2.3", "elliptic": "^6.5.4", "html5-qrcode": "^2.3.4", "i18next": "^22.4.9", diff --git a/yarn.lock b/yarn.lock index ef08786e3a..21ff6f022b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3609,10 +3609,10 @@ devtools-protocol@0.0.1068969: resolved "https://registry.yarnpkg.com/devtools-protocol/-/devtools-protocol-0.0.1068969.tgz#8b9a4bc48aed1453bed08d62b07481f9abf4d6d8" integrity sha512-ATFTrPbY1dKYhPPvpjtwWKSK2mIwGmRwX54UASn9THEuIZCe2n9k3vVuMmt6jWeL+e5QaaguEv/pMyR+JQB7VQ== -dexie@^3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/dexie/-/dexie-3.2.2.tgz#fa6f2a3c0d6ed0766f8d97a03720056f88fe0e01" - integrity sha512-q5dC3HPmir2DERlX+toCBbHQXW5MsyrFqPFcovkH9N2S/UW/H3H5AWAB6iEOExeraAu+j+zRDG+zg/D7YhH0qg== +dexie@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/dexie/-/dexie-3.2.3.tgz#f35c91ca797599df8e771b998e9ae9669c877f8c" + integrity sha512-iHayBd4UYryDCVUNa3PMsJMEnd8yjyh5p7a+RFeC8i8n476BC9wMhVvqiImq5zJZJf5Tuer+s4SSj+AA3x+ZbQ== didyoumean@^1.2.2: version "1.2.2" From d0a7ca868414dd68d462fa790c315191966e6fa1 Mon Sep 17 00:00:00 2001 From: "depfu[bot]" <23717796+depfu[bot]@users.noreply.github.com> Date: Tue, 31 Jan 2023 09:07:35 +0000 Subject: [PATCH 112/123] Update lnmessage to version 0.0.18 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 68b29e2625..9cf5934f9e 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "html5-qrcode": "^2.3.4", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", - "lnmessage": "^0.0.17", + "lnmessage": "^0.0.18", "lodash.merge": "^4.6.2", "lodash.pick": "^4.4.0", "lodash.snakecase": "^4.1.1", diff --git a/yarn.lock b/yarn.lock index ef08786e3a..08f24b6b09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6288,10 +6288,10 @@ listr2@^5.0.5: "@lightninglabs/lnc-core" "0.2.1-alpha" crypto-js "4.1.1" -lnmessage@^0.0.17: - version "0.0.17" - resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.17.tgz#e209a7ce7f6e88350a2886e62f0fb29b09da06b8" - integrity sha512-DZMXkw1yz+1mCldmnCksQ1Jcd4ALDfdY1gGEu4MoxGswLCeAv98OSfAP8cSLoGh3cSuZKR4lnwg9vwbTsm7SUQ== +lnmessage@^0.0.18: + version "0.0.18" + resolved "https://registry.yarnpkg.com/lnmessage/-/lnmessage-0.0.18.tgz#bb578a324bae85894bcea12011fe6f27a3021289" + integrity sha512-6uwPNajtVdgcE9wJ5DhWmlfrksXks68MnbsJrKRR+d000DG1asFmERPWDeofFSVmkYfDuCJFHA63h6miQV+P0Q== dependencies: buffer "^6.0.3" crypto-js "^4.1.1" From ba1d103265d273725f17271d579b2679b9c54161 Mon Sep 17 00:00:00 2001 From: Leonardo Date: Sun, 29 Jan 2023 15:24:52 +0000 Subject: [PATCH 113/123] Translated using Weblate (Portuguese (Brazil)) Currently translated at 82.4% (410 of 497 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/pt_BR/ --- src/i18n/locales/pt_BR/translation.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 00b4357c1a..1b1be13d62 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -253,7 +253,10 @@ "connection_failed": "Falha na conexão. O servidor Core Lightning está online e usando o plugin comando?" } }, - "title": "Conectar Carteira Bitcoin" + "title": "Conectar Carteira Bitcoin", + "kollider": { + "title": "Kollider" + } }, "home": { "actions": { @@ -573,7 +576,8 @@ "gaming": "Jogos", "entertaiment": "Entretenimento", "shopping": "Compras", - "miscellaneous": "Outros" + "miscellaneous": "Outros", + "nostr": "Nostr" }, "tips": { "top_up_wallet": { From 653ebe5baa16ae8ccceef244cf6aa2e1e28c0091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Aaron?= Date: Wed, 1 Feb 2023 01:52:55 +0100 Subject: [PATCH 114/123] fix: remove obsolete file --- src/app/styles/_fonts.scss | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/app/styles/_fonts.scss diff --git a/src/app/styles/_fonts.scss b/src/app/styles/_fonts.scss deleted file mode 100644 index 52ca8dcf6c..0000000000 --- a/src/app/styles/_fonts.scss +++ /dev/null @@ -1 +0,0 @@ -@import url("https://fonts.googleapis.com/css?family=Nunito:400,600"); From 141fef9de50963168359b74ef906bc004b679633 Mon Sep 17 00:00:00 2001 From: Adithya Vardhan Date: Thu, 2 Feb 2023 01:38:39 +0530 Subject: [PATCH 115/123] feat: move nostr key to accounts (#1964) * feat: add nostr key field in account * feat: change nostr methods to use key from account * feat: add migration for users with global nostr key * feat: add get account by id action * feat: add account screen * chore: remove nostr from settings * chore: change getbyid and nostr * fix: typing changes * fix: unit test * fix: add i18n strings * fix: unit tests * feat: improve nostr section * Update src/extension/background-script/actions/accounts/select.ts * chore: add accounts to user menu makes it easier to find * feat(nostr): display pubkey as npub * feat(Account): unify headline formatting * chore: add test for get account action * feat: use avvvatars for account screen * chore: align screens * chore: text * chore: modify ui in show account screen * chore: use useeffect hook on private key change * chore: keep old setting private key as backup during the migration * chore: add test for nostr * chore: add copy icon to button * fix: use own private key * fix: private key issues and styling * fix: use form element * fix: final changes * fix: add type guard --------- Co-authored-by: Michael Bumann --- src/app/components/UserMenu/index.tsx | 11 +- src/app/router/Options/Options.tsx | 6 +- src/app/screens/Accounts/Show/index.tsx | 620 ++++++++++++++++++ src/app/screens/Accounts/index.test.tsx | 10 +- src/app/screens/Accounts/index.tsx | 271 +------- .../Show/index.tsx} | 0 .../{Settings.tsx => Settings/index.tsx} | 129 +--- .../connectors/ConnectCitadel/index.tsx | 2 +- .../connectors/ConnectEclair/index.tsx | 2 +- .../screens/connectors/ConnectGaloy/index.tsx | 2 +- .../connectors/ConnectLnbits/index.tsx | 2 +- .../connectors/ConnectMyNode/index.tsx | 2 +- .../connectors/ConnectRaspiBlitz/index.tsx | 2 +- .../connectors/ConnectStart9/index.tsx | 2 +- .../connectors/ConnectUmbrel/index.tsx | 2 +- src/common/lib/api.ts | 7 + .../actions/accounts/__tests__/add.test.ts | 19 +- .../actions/accounts/__tests__/get.test.ts | 87 +++ .../background-script/actions/accounts/get.ts | 29 + .../actions/accounts/index.ts | 14 +- .../actions/accounts/select.ts | 1 + .../actions/nostr/generatePrivateKey.ts | 32 +- .../actions/nostr/getPrivateKey.ts | 27 +- .../actions/nostr/setPrivateKey.ts | 26 +- .../actions/settings/changePassword.ts | 10 +- .../background-script/migrations/index.ts | 18 + .../nostr/__test__/nostr.test.ts | 33 +- .../background-script/nostr/index.ts | 34 +- src/extension/background-script/router.ts | 1 + src/extension/background-script/state.ts | 9 +- src/extension/content-script/onstart.ts | 2 +- src/i18n/locales/en/translation.json | 77 ++- src/types.ts | 21 + 33 files changed, 1051 insertions(+), 459 deletions(-) create mode 100644 src/app/screens/Accounts/Show/index.tsx rename src/app/screens/{Publisher.tsx => Publishers/Show/index.tsx} (100%) rename src/app/screens/{Settings.tsx => Settings/index.tsx} (76%) create mode 100644 src/extension/background-script/actions/accounts/__tests__/get.test.ts create mode 100644 src/extension/background-script/actions/accounts/get.ts diff --git a/src/app/components/UserMenu/index.tsx b/src/app/components/UserMenu/index.tsx index 6afaee66b4..cb442301c2 100644 --- a/src/app/components/UserMenu/index.tsx +++ b/src/app/components/UserMenu/index.tsx @@ -1,4 +1,5 @@ import { + AddressBookIcon, GearIcon, GlobeIcon, LockIcon, @@ -80,6 +81,7 @@ export default function UserMenu() { {tCommon("actions.receive")} + { openOptions("settings"); @@ -88,7 +90,14 @@ export default function UserMenu() { {tCommon("settings")} - + { + openOptions("accounts"); + }} + > + + {tCommon("accounts")} + { utils.openUrl("https://feedback.getalby.com"); diff --git a/src/app/router/Options/Options.tsx b/src/app/router/Options/Options.tsx index 3b36cbae14..c8f34b7f98 100644 --- a/src/app/router/Options/Options.tsx +++ b/src/app/router/Options/Options.tsx @@ -1,6 +1,7 @@ import Container from "@components/Container"; import Navbar from "@components/Navbar"; import Accounts from "@screens/Accounts"; +import ShowAccount from "@screens/Accounts/Show"; import ConfirmPayment from "@screens/ConfirmPayment"; import Keysend from "@screens/Keysend"; import LNURLAuth from "@screens/LNURLAuth"; @@ -8,8 +9,8 @@ import LNURLChannel from "@screens/LNURLChannel"; import LNURLPay from "@screens/LNURLPay"; import LNURLWithdraw from "@screens/LNURLWithdraw"; import TestConnection from "@screens/Options/TestConnection"; -import Publisher from "@screens/Publisher"; import Publishers from "@screens/Publishers"; +import ShowPublisher from "@screens/Publishers/Show"; import Receive from "@screens/Receive"; import Send from "@screens/Send"; import Settings from "@screens/Settings"; @@ -46,7 +47,7 @@ function Options() { } /> - } /> + } /> } /> } /> @@ -59,6 +60,7 @@ function Options() { } /> } /> + } /> ; +dayjs.extend(relativeTime); + +function AccountScreen() { + const auth = useAccount(); + const { accounts, getAccounts } = useAccounts(); + const { t } = useTranslation("translation", { + keyPrefix: "accounts.account_view", + }); + const { t: tCommon } = useTranslation("common"); + const { isLoading: isLoadingSettings } = useSettings(); + + const hasFetchedData = useRef(false); + const [account, setAccount] = useState(null); + const { id } = useParams(); + const navigate = useNavigate(); + + const [lndHubData, setLndHubData] = useState({ + login: "", + password: "", + url: "", + lnAddress: "", + }); + const [accountName, setAccountName] = useState(""); + + const [currentPrivateKey, setCurrentPrivateKey] = useState(""); + const [nostrPrivateKey, setNostrPrivateKey] = useState(""); + const [nostrPublicKey, setNostrPublicKey] = useState(""); + const [nostrPrivateKeyVisible, setNostrPrivateKeyVisible] = useState(false); + const [privateKeyCopyLabel, setPrivateKeyCopyLabel] = useState( + tCommon("actions.copy") as string + ); + const [publicKeyCopyLabel, setPublicKeyCopyLabel] = useState( + tCommon("actions.copy") as string + ); + + const [exportLoading, setExportLoading] = useState(false); + const [exportModalIsOpen, setExportModalIsOpen] = useState(false); + const [nostrKeyModalIsOpen, setNostrKeyModalIsOpen] = useState(false); + + const fetchData = useCallback(async () => { + try { + if (id) { + const response = await msg.request("getAccount", { + id, + }); + setAccount(response); + setAccountName(response.name); + + const priv = (await msg.request("nostr/getPrivateKey", { + id, + })) as string; + if (priv) { + setCurrentPrivateKey(priv); + } + } + } catch (e) { + console.error(e); + if (e instanceof Error) toast.error(`Error: ${e.message}`); + } + }, [id]); + + function closeExportModal() { + setExportModalIsOpen(false); + } + + function closeNostrKeyModal() { + setNostrKeyModalIsOpen(false); + } + + function generatePublicKey(priv: string) { + const nostr = new Nostr(priv); + const pubkeyHex = nostr.getPublicKey(); + return nostrlib.hexToNip19(pubkeyHex, "npub"); + } + + async function generateNostrPrivateKey(random?: boolean) { + const selectedAccount = await auth.fetchAccountInfo(); + + if (!random && selectedAccount?.id !== id) { + alert( + `Please match the account in the account dropdown at the top with this account to derive keys.` + ); + closeNostrKeyModal(); + return; + } + // check with current selected account + const result = await msg.request( + "nostr/generatePrivateKey", + random + ? { + type: "random", + } + : undefined + ); + saveNostrPrivateKey(result.privateKey as string); + closeNostrKeyModal(); + } + + async function saveNostrPrivateKey(nostrPrivateKey: string) { + nostrPrivateKey = nostrlib.normalizeToHex(nostrPrivateKey); + + if (nostrPrivateKey === currentPrivateKey) return; + + if (currentPrivateKey && !confirm(t("nostr.private_key.warning"))) { + return; + } + + try { + if (!account) { + // type guard + throw new Error("No account available"); + } + + // Validate the private key before saving + nostrPrivateKey && generatePublicKey(nostrPrivateKey); + nostrPrivateKey && nostrlib.hexToNip19(nostrPrivateKey, "nsec"); + + await msg.request("nostr/setPrivateKey", { + id: account.id, + privateKey: nostrPrivateKey, + }); + + if (nostrPrivateKey) { + toast.success(t("nostr.private_key.success")); + } else { + toast.success(t("nostr.private_key.successfully_removed")); + } + setCurrentPrivateKey(nostrPrivateKey); + } catch (e) { + if (e instanceof Error) toast.error(e.message); + } + } + + async function updateAccountName({ id, name }: AccountAction) { + await msg.request("editAccount", { + name, + id, + }); + + auth.fetchAccountInfo(); // Update active account name + getAccounts(); // update all accounts + } + + async function exportAccount({ id, name }: AccountAction) { + setExportLoading(true); + setExportModalIsOpen(true); + setLndHubData( + await msg.request("accountDecryptedDetails", { + name, + id, + }) + ); + setExportLoading(false); + } + + async function selectAccount(accountId: string) { + auth.setAccountId(accountId); + await api.selectAccount(accountId); + auth.fetchAccountInfo({ accountId }); + } + + async function removeAccount({ id, name }: AccountAction) { + if (window.confirm(t("remove.confirm", { name }))) { + let nextAccountId; + let accountIds = Object.keys(accounts); + if (auth.account?.id === id && accountIds.length > 1) { + nextAccountId = accountIds.filter((accountId) => accountId !== id)[0]; + } + + await api.removeAccount(id); + accountIds = accountIds.filter((accountId) => accountId !== id); + + if (accountIds.length > 0) { + getAccounts(); + if (nextAccountId) selectAccount(nextAccountId); + navigate("/accounts", { replace: true }); + } else { + window.close(); + } + } + } + + useEffect(() => { + // Run once. + if (!isLoadingSettings && !hasFetchedData.current) { + fetchData(); + hasFetchedData.current = true; + } + }, [fetchData, isLoadingSettings]); + + useEffect(() => { + setNostrPublicKey( + currentPrivateKey ? generatePublicKey(currentPrivateKey) : "" + ); + setNostrPrivateKey( + currentPrivateKey ? nostrlib.hexToNip19(currentPrivateKey, "nsec") : "" + ); + }, [currentPrivateKey]); + + return !account ? ( +
+ +
+ ) : ( +
+
navigate(-1)} + icon={} + /> + } + /> +
+
+ +
+

+ {account.name} +

+
+ {account.connector} + {account.connector === "lndhub" && ( + <> +
·
+
+ exportAccount({ + id: account.id, + name: account.name, + }) + } + > +

{t("actions.export")}

+ +
+ + )} +
+
+
+
+ + +
+

{t("title2")}

+ + +
+

+ {t("export.title")} +

+ +
+ + {exportLoading && ( +
+ + {t("export.waiting")} +
+ )} + {!exportLoading && ( +
+ {lndHubData.lnAddress && ( +
+

+ {t("export.your_ln_address")} +

+ {lndHubData.lnAddress &&

{lndHubData.lnAddress}

} +
+ )} +
+
+

+ {t("export.tip_mobile")} +

+

{t("export.scan_qr")}

+
+
+ +
+
+
+ +
+
+ )} +
+
+ +
+
+ { + e.preventDefault(); + updateAccountName({ + id: account.id, + name: accountName, + }); + const updatedAccount = account; + updatedAccount.name = accountName; + setAccount(updatedAccount); + }} + className="my-4 flex justify-between items-end" + > +
+ { + setAccountName(event.target.value); + }} + /> +
+
+
+
+ +
+

+ {t("nostr.title")} +

+

+ + {t("nostr.title")} + {" "} + {t("nostr.hint")} +

+
+
+
+ + {t("nostr.private_key.title")} + +

+ , + ]} + /> +

+
+
+
+
+
{ + e.preventDefault(); + saveNostrPrivateKey(nostrPrivateKey); + }} + className="mb-4 flex justify-between items-end" + > +
+ { + setNostrPrivateKey(event.target.value); + }} + endAdornment={ + + } + /> +
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+ + ⛔️ Danger Zone + +
+
+
+ +
+
+
+
+ + +
+

+ {t("nostr.generate_keys.title")} +

+ +
+
+ , + ]} + /> +
+
+
+
+
+
+
+
+
+ ); +} + +export default AccountScreen; diff --git a/src/app/screens/Accounts/index.test.tsx b/src/app/screens/Accounts/index.test.tsx index cb9887287a..8e8742c47d 100644 --- a/src/app/screens/Accounts/index.test.tsx +++ b/src/app/screens/Accounts/index.test.tsx @@ -1,5 +1,7 @@ import { render, screen } from "@testing-library/react"; +import { I18nextProvider } from "react-i18next"; import { MemoryRouter } from "react-router-dom"; +import i18n from "~/../tests/unit/helpers/i18n"; import { AccountsProvider } from "../../context/AccountsContext"; import Accounts from "./index"; @@ -8,9 +10,11 @@ describe("Accounts", () => { test("render", async () => { render( - - - + + + + + ); expect(await screen.findByText("Accounts")).toBeInTheDocument(); diff --git a/src/app/screens/Accounts/index.tsx b/src/app/screens/Accounts/index.tsx index 325c878438..f54b469980 100644 --- a/src/app/screens/Accounts/index.tsx +++ b/src/app/screens/Accounts/index.tsx @@ -1,113 +1,21 @@ import { - EllipsisIcon, + CaretRightIcon, PlusIcon, } from "@bitcoin-design/bitcoin-icons-react/filled"; -import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; import Button from "@components/Button"; import Container from "@components/Container"; -import Loading from "@components/Loading"; -import Menu from "@components/Menu"; -import TextField from "@components/form/TextField"; import Avvvatars from "avvvatars-react"; -import type { FormEvent } from "react"; -import { useState } from "react"; import { useTranslation } from "react-i18next"; -import Modal from "react-modal"; -import QRCode from "react-qr-code"; import { useNavigate } from "react-router-dom"; -import { useAccount } from "~/app/context/AccountContext"; import { useAccounts } from "~/app/context/AccountsContext"; -import api from "~/common/lib/api"; -import msg from "~/common/lib/msg"; -import type { Account } from "~/types"; - -type AccountAction = Omit; function AccountsScreen() { - const auth = useAccount(); - const { accounts, getAccounts } = useAccounts(); + const { accounts } = useAccounts(); const navigate = useNavigate(); - const [currentAccountId, setCurrentAccountId] = useState(""); - const [editModalIsOpen, setEditModalIsOpen] = useState(false); - const [exportModalIsOpen, setExportModalIsOpen] = useState(false); - const [newAccountName, setNewAccountName] = useState(""); - const [lndHubData, setLndHubData] = useState({ - login: "", - password: "", - url: "", - lnAddress: "", - }); - const [loading, setLoading] = useState(false); const { t } = useTranslation("translation", { keyPrefix: "accounts", }); - const { t: tCommon } = useTranslation("common"); - - function closeEditModal() { - setEditModalIsOpen(false); - } - - function closeExportModal() { - setExportModalIsOpen(false); - } - - async function selectAccount(accountId: string) { - auth.setAccountId(accountId); - await api.selectAccount(accountId); - auth.fetchAccountInfo({ accountId }); - } - - async function updateAccountName({ id, name }: AccountAction) { - await msg.request("editAccount", { - name, - id, - }); - - auth.fetchAccountInfo(); // Update active account name - getAccounts(); // update all accounts - closeEditModal(); - } - - async function exportAccount({ id, name }: AccountAction) { - setLoading(true); - /** - * @HACK - * @headless-ui/menu restores focus after closing a menu, to the button that opened it. - * By slightly delaying opening the modal, react-modal's focus management won't be overruled. - * {@link https://github.com/tailwindlabs/headlessui/issues/259} - */ - setTimeout(() => { - setExportModalIsOpen(true); - }, 50); - setLndHubData( - await msg.request("accountDecryptedDetails", { - name, - id, - }) - ); - setLoading(false); - } - - async function removeAccount({ id, name }: AccountAction) { - if (window.confirm(t("remove.confirm", { name }))) { - let nextAccountId; - let accountIds = Object.keys(accounts); - if (auth.account?.id === id && accountIds.length > 1) { - nextAccountId = accountIds.filter((accountId) => accountId !== id)[0]; - } - - await api.removeAccount(id); - accountIds = accountIds.filter((accountId) => accountId !== id); - - if (accountIds.length > 0) { - getAccounts(); - if (nextAccountId) selectAccount(nextAccountId); - } else { - window.close(); - } - } - } return ( @@ -122,13 +30,17 @@ function AccountsScreen() { />
-
+
- + {Object.keys(accounts).map((accountId) => { const account = accounts[accountId]; return ( - + navigate(`/accounts/${accountId}`)} + > - ); })}
@@ -148,175 +60,14 @@ function AccountsScreen() {
- - - - - - - { - setCurrentAccountId(accountId); - setNewAccountName(account.name); - /** - * @HACK - * @headless-ui/menu restores focus after closing a menu, to the button that opened it. - * By slightly delaying opening the modal, react-modal's focus management won't be overruled. - * {@link https://github.com/tailwindlabs/headlessui/issues/259} - */ - setTimeout(() => { - setEditModalIsOpen(true); - }, 50); - }} - > - {tCommon("actions.edit")} - - - {account.connector === "lndhub" && ( - - exportAccount({ - id: accountId, - name: account.name, - }) - } - > - {tCommon("actions.export")} - - )} - - - removeAccount({ - id: accountId, - name: account.name, - }) - } - > - {tCommon("actions.remove")} - - - + +
- - -
-

- {t("edit.title")} -

- -
- -
{ - e.preventDefault(); - updateAccountName({ - id: currentAccountId, - name: newAccountName, - }); - }} - > -
-
- setNewAccountName(e.target.value)} - value={newAccountName} - /> -
-
- -
-
-
-
- - -
-

- {t("export.title")} -

- -
- - {loading && ( -
- - {t("export.waiting")} -
- )} - {!loading && ( -
- {lndHubData.lnAddress && ( -
-

- {t("export.your_ln_address")} -

- {lndHubData.lnAddress &&

{lndHubData.lnAddress}

} -
- )} -
-
-

- {t("export.tip_mobile")} -

-

{t("export.scan_qr")}

-
-
- -
-
-
- -
-
- )} -
); diff --git a/src/app/screens/Publisher.tsx b/src/app/screens/Publishers/Show/index.tsx similarity index 100% rename from src/app/screens/Publisher.tsx rename to src/app/screens/Publishers/Show/index.tsx diff --git a/src/app/screens/Settings.tsx b/src/app/screens/Settings/index.tsx similarity index 76% rename from src/app/screens/Settings.tsx rename to src/app/screens/Settings/index.tsx index 6321a0b716..0c14b95d31 100644 --- a/src/app/screens/Settings.tsx +++ b/src/app/screens/Settings/index.tsx @@ -1,8 +1,4 @@ -import { - CrossIcon, - HiddenIcon, - VisibleIcon, -} from "@bitcoin-design/bitcoin-icons-react/outline"; +import { CrossIcon } from "@bitcoin-design/bitcoin-icons-react/outline"; import Button from "@components/Button"; import Container from "@components/Container"; import LocaleSwitcher from "@components/LocaleSwitcher/LocaleSwitcher"; @@ -10,18 +6,17 @@ import PasswordForm from "@components/PasswordForm"; import Setting from "@components/Setting"; import Input from "@components/form/Input"; import Select from "@components/form/Select"; -import TextField from "@components/form/TextField"; import Toggle from "@components/form/Toggle"; import { Html5Qrcode } from "html5-qrcode"; import type { FormEvent } from "react"; -import { useState, useEffect } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { useState } from "react"; +import { Trans, useTranslation } from "react-i18next"; import Modal from "react-modal"; +import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import { useSettings } from "~/app/context/SettingsContext"; import { CURRENCIES } from "~/common/constants"; import msg from "~/common/lib/msg"; -import nostrlib from "~/common/lib/nostr"; const initialFormData = { password: "", @@ -31,24 +26,11 @@ const initialFormData = { function Settings() { const { t } = useTranslation("translation", { keyPrefix: "settings" }); const { isLoading, settings, updateSetting } = useSettings(); + const navigate = useNavigate(); const [modalIsOpen, setModalIsOpen] = useState(false); const [formData, setFormData] = useState(initialFormData); - const [nostrPrivateKey, setNostrPrivateKey] = useState(""); - const [nostrPrivateKeyVisible, setNostrPrivateKeyVisible] = useState(false); - - const getPrivateKeyFromStorage = async () => { - const priv = (await msg.request("nostr/getPrivateKey")) as string; - if (priv) { - setNostrPrivateKey(nostrlib.hexToNip19(priv, "nsec")); - } - }; - - useEffect(() => { - getPrivateKeyFromStorage().catch(console.error); - }, []); - const [cameraPermissionsGranted, setCameraPermissionsGranted] = useState(false); @@ -56,26 +38,6 @@ function Settings() { setModalIsOpen(false); } - async function saveNostrPrivateKey(nostrPrivateKey: string) { - const result = await msg.request("nostr/getPrivateKey"); - const currentPrivateKey = result as unknown as string; - - if (nostrPrivateKey === currentPrivateKey) return; - - if (currentPrivateKey && !confirm(t("nostr.private_key.warning"))) { - return; - } - - await msg.request("nostr/setPrivateKey", { - privateKey: nostrlib.normalizeToHex(nostrPrivateKey), - }); - - saveSetting({ - nostrEnabled: !!nostrPrivateKey, - }); - toast.success(t("nostr.private_key.success")); - } - async function updateAccountPassword(password: string) { await msg.request("changePassword", { password: formData.password, @@ -289,7 +251,7 @@ function Settings() { {t("personal_data.description")}

-
+
{!isLoading && (
@@ -370,14 +332,9 @@ function Settings() {
-
-
- - 🧪 Alby Lab - -
-
-

{t("nostr.title")}

+

+ {t("nostr.title")} +

, - ]} - /> - } + subtitle={t("nostr.private_key.subtitle")} > -

-
- { - saveNostrPrivateKey(nostrPrivateKey); - }} - onChange={(event) => { - setNostrPrivateKey(event.target.value); - }} - endAdornment={ - - } - /> -
- {!nostrPrivateKey && ( -
-
- )} +
+
diff --git a/src/app/screens/connectors/ConnectCitadel/index.tsx b/src/app/screens/connectors/ConnectCitadel/index.tsx index b0ab87f1b9..c1543b9a1e 100644 --- a/src/app/screens/connectors/ConnectCitadel/index.tsx +++ b/src/app/screens/connectors/ConnectCitadel/index.tsx @@ -7,7 +7,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectEclair/index.tsx b/src/app/screens/connectors/ConnectEclair/index.tsx index 6a292ea9bf..c285a0beef 100644 --- a/src/app/screens/connectors/ConnectEclair/index.tsx +++ b/src/app/screens/connectors/ConnectEclair/index.tsx @@ -6,7 +6,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectGaloy/index.tsx b/src/app/screens/connectors/ConnectGaloy/index.tsx index 5c66fa81ee..596e15c2b6 100644 --- a/src/app/screens/connectors/ConnectGaloy/index.tsx +++ b/src/app/screens/connectors/ConnectGaloy/index.tsx @@ -3,7 +3,7 @@ import Input from "@components/form/Input"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import axios from "axios"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectLnbits/index.tsx b/src/app/screens/connectors/ConnectLnbits/index.tsx index e7e99e6a8c..8d0f5a4c24 100644 --- a/src/app/screens/connectors/ConnectLnbits/index.tsx +++ b/src/app/screens/connectors/ConnectLnbits/index.tsx @@ -3,7 +3,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectMyNode/index.tsx b/src/app/screens/connectors/ConnectMyNode/index.tsx index 8d19e4ee30..d2d89b29d2 100644 --- a/src/app/screens/connectors/ConnectMyNode/index.tsx +++ b/src/app/screens/connectors/ConnectMyNode/index.tsx @@ -3,7 +3,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx index 5c9c158fe1..5eaad41e21 100644 --- a/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx +++ b/src/app/screens/connectors/ConnectRaspiBlitz/index.tsx @@ -3,7 +3,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectStart9/index.tsx b/src/app/screens/connectors/ConnectStart9/index.tsx index 45c1106ef4..02c346b248 100644 --- a/src/app/screens/connectors/ConnectStart9/index.tsx +++ b/src/app/screens/connectors/ConnectStart9/index.tsx @@ -3,7 +3,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/app/screens/connectors/ConnectUmbrel/index.tsx b/src/app/screens/connectors/ConnectUmbrel/index.tsx index f27fa59922..ee703d51e5 100644 --- a/src/app/screens/connectors/ConnectUmbrel/index.tsx +++ b/src/app/screens/connectors/ConnectUmbrel/index.tsx @@ -3,7 +3,7 @@ import ConnectorForm from "@components/ConnectorForm"; import TextField from "@components/form/TextField"; import ConnectionErrorToast from "@components/toasts/ConnectionErrorToast"; import { useState } from "react"; -import { useTranslation, Trans } from "react-i18next"; +import { Trans, useTranslation } from "react-i18next"; import { useNavigate } from "react-router-dom"; import { toast } from "react-toastify"; import msg from "~/common/lib/msg"; diff --git a/src/common/lib/api.ts b/src/common/lib/api.ts index 246b604ee5..0c77c2a1bd 100644 --- a/src/common/lib/api.ts +++ b/src/common/lib/api.ts @@ -6,6 +6,7 @@ import { MakeInvoiceResponse, } from "~/extension/background-script/connectors/connector.interface"; import type { + Account, AccountInfo, Accounts, Allowance, @@ -33,6 +34,10 @@ export interface AccountInfoRes { name: string; } +export interface GetAccountRes + extends Pick { + nostrEnabled: boolean; +} interface StatusRes { configured: boolean; unlocked: boolean; @@ -92,6 +97,7 @@ export const swrGetAccountInfo = async ( }); }; export const getAccounts = () => msg.request("getAccounts"); +export const getAccount = () => msg.request("getAccount"); export const updateAllowance = () => msg.request("updateAllowance"); export const selectAccount = (id: string) => msg.request("selectAccount", { id }); @@ -130,6 +136,7 @@ export const getCurrencyRate = async () => msg.request<{ rate: number }>("getCurrencyRate"); export default { + getAccount, getAccountInfo, getAccounts, getInfo, diff --git a/src/extension/background-script/actions/accounts/__tests__/add.test.ts b/src/extension/background-script/actions/accounts/__tests__/add.test.ts index b245ddc854..d05ed55355 100644 --- a/src/extension/background-script/actions/accounts/__tests__/add.test.ts +++ b/src/extension/background-script/actions/accounts/__tests__/add.test.ts @@ -27,6 +27,7 @@ const message: MessageAccountAdd = { connector: "lnd", config: "123456config", name: "purple", + nostrPrivateKey: "123456nostr", }, origin: { internal: true }, prompt: true, @@ -57,6 +58,7 @@ describe("add account to account-list", () => { connector: "lnd", config: "secret-config-string-42", name: "purple", + nostrPrivateKey: "123456nostr", }, }, }); @@ -77,11 +79,13 @@ describe("add account to account-list", () => { config: "abc", connector: "lnd", name: "BLUE", + nostrPrivateKey: "123", }, "666": { config: "xyz", connector: "lnd", name: "GREEN", + nostrPrivateKey: "123", }, }, }; @@ -102,9 +106,20 @@ describe("add account to account-list", () => { connector: "lnd", config: "secret-config-string-42", name: "purple", + nostrPrivateKey: "123456nostr", + }, + "666": { + config: "xyz", + connector: "lnd", + name: "GREEN", + nostrPrivateKey: "123", + }, + "888": { + config: "abc", + connector: "lnd", + name: "BLUE", + nostrPrivateKey: "123", }, - "666": { config: "xyz", connector: "lnd", name: "GREEN" }, - "888": { config: "abc", connector: "lnd", name: "BLUE" }, }, }); diff --git a/src/extension/background-script/actions/accounts/__tests__/get.test.ts b/src/extension/background-script/actions/accounts/__tests__/get.test.ts new file mode 100644 index 0000000000..e70944e78c --- /dev/null +++ b/src/extension/background-script/actions/accounts/__tests__/get.test.ts @@ -0,0 +1,87 @@ +import type { GetAccountRes } from "~/common/lib/api"; +import state from "~/extension/background-script/state"; +import type { MessageAccountGet } from "~/types"; + +import getAccount from "../get"; + +jest.mock("~/extension/background-script/state"); + +const mockState = { + getConnector: () => ({ + getInfo: () => Promise.resolve({ data: { alias: "getalby.com" } }), + getBalance: () => Promise.resolve({ data: { balance: 0 } }), + }), + getAccount: () => ({ + config: + "U2FsdGVkX19YMFK/8YpN5XQbMsmbVmlOJgpZCIRlt25K6ur4EPp4XdRUQC7+ep/m1k8d2yy69QfuGpsgn2SZOv4DQaPsdYTTwjj0mibQG/dkJ9OCp88zXuMpconrmRu5w4uZWEvdg7p5GQfIYJCvTPLUq+1zH3iH0xX7GhlrlQ8=", + connector: "lndhub", + id: "1e1e8ea6-493e-480b-9855-303d37506e97", + name: "Alby", + }), + currentAccountId: "1e1e8ea6-493e-480b-9855-303d37506e97", + accounts: { + "8b7f1dc6-ab87-4c6c-bca5-19fa8632731e": { + config: "config-123-456", + connector: "lndhub", + id: "8b7f1dc6-ab87-4c6c-bca5-19fa8632731e", + name: "Alby", + nostrPrivateKey: "nostr-123-456", + }, + "1e1e8ea6-493e-480b-9855-303d37506e97": { + config: "config-123-456", + connector: "lndhub", + id: "1e1e8ea6-493e-480b-9855-303d37506e97", + name: "Alby", + }, + }, +}; + +describe("account info", () => { + afterEach(() => { + jest.clearAllMocks(); + }); + + test("get current account info", async () => { + const message: MessageAccountGet = { + application: "LBE", + origin: { internal: true }, + prompt: true, + action: "getAccount", + }; + + state.getState = jest.fn().mockReturnValue(mockState); + + const result: GetAccountRes = { + id: "1e1e8ea6-493e-480b-9855-303d37506e97", + name: "Alby", + connector: "lndhub", + nostrEnabled: false, + }; + + expect(await getAccount(message)).toStrictEqual({ + data: result, + }); + }); + test("get account info by id", async () => { + const message: MessageAccountGet = { + application: "LBE", + origin: { internal: true }, + prompt: true, + args: { id: "8b7f1dc6-ab87-4c6c-bca5-19fa8632731e" }, + action: "getAccount", + }; + + state.getState = jest.fn().mockReturnValue(mockState); + + const result: GetAccountRes = { + id: "8b7f1dc6-ab87-4c6c-bca5-19fa8632731e", + name: "Alby", + connector: "lndhub", + nostrEnabled: true, + }; + + expect(await getAccount(message)).toStrictEqual({ + data: result, + }); + }); +}); diff --git a/src/extension/background-script/actions/accounts/get.ts b/src/extension/background-script/actions/accounts/get.ts new file mode 100644 index 0000000000..d19cb2f238 --- /dev/null +++ b/src/extension/background-script/actions/accounts/get.ts @@ -0,0 +1,29 @@ +import state from "~/extension/background-script/state"; +import type { MessageAccountGet } from "~/types"; + +const get = async (message: MessageAccountGet) => { + const id = message?.args?.id || state.getState().currentAccountId; + + if (!id) + return { + error: "No account selected.", + }; + + const accounts = state.getState().accounts; + const account = accounts[id]; + + if (!account) return; + + const result = { + id: account.id, + connector: account.connector, + name: account.name, + nostrEnabled: !!account.nostrPrivateKey, + }; + + return { + data: result, + }; +}; + +export default get; diff --git a/src/extension/background-script/actions/accounts/index.ts b/src/extension/background-script/actions/accounts/index.ts index 29142f1621..e41ef2f8f9 100644 --- a/src/extension/background-script/actions/accounts/index.ts +++ b/src/extension/background-script/actions/accounts/index.ts @@ -2,10 +2,22 @@ import add from "./add"; import all from "./all"; import decryptedDetails from "./decryptedDetails"; import edit from "./edit"; +import get from "./get"; import info from "./info"; import lock from "./lock"; import remove from "./remove"; import select from "./select"; import unlock from "./unlock"; -export { all, unlock, lock, add, edit, select, info, remove, decryptedDetails }; +export { + all, + unlock, + lock, + add, + edit, + select, + info, + remove, + get, + decryptedDetails, +}; diff --git a/src/extension/background-script/actions/accounts/select.ts b/src/extension/background-script/actions/accounts/select.ts index 0fd44ef529..f64e55505b 100644 --- a/src/extension/background-script/actions/accounts/select.ts +++ b/src/extension/background-script/actions/accounts/select.ts @@ -14,6 +14,7 @@ const select = async (message: MessageAccountSelect) => { state.setState({ account, + nostr: null, // reset memoized nostr instance connector: null, // reset memoized connector currentAccountId: accountId, }); diff --git a/src/extension/background-script/actions/nostr/generatePrivateKey.ts b/src/extension/background-script/actions/nostr/generatePrivateKey.ts index 753bbd8fb4..a7aac8ec25 100644 --- a/src/extension/background-script/actions/nostr/generatePrivateKey.ts +++ b/src/extension/background-script/actions/nostr/generatePrivateKey.ts @@ -1,10 +1,33 @@ import * as secp256k1 from "@noble/secp256k1"; import Hex from "crypto-js/enc-hex"; import sha512 from "crypto-js/sha512"; +import type { MessagePrivateKeyGenerate } from "~/types"; import state from "../../state"; -const generatePrivateKey = async () => { +const generatePrivateKey = async (message: MessagePrivateKeyGenerate) => { + const type = message?.args?.type; + + const privateKey = + type === "random" ? generateRandomKey() : await deriveKey(); + + if (privateKey) + return { + data: { + privateKey: secp256k1.utils.bytesToHex(privateKey), + }, + }; + else + return { + error: "Error generating private key.", + }; +}; + +const generateRandomKey = () => { + return secp256k1.utils.randomPrivateKey(); +}; + +const deriveKey = async () => { const connector = await state.getState().getConnector(); try { const response = await connector.signMessage({ @@ -23,12 +46,7 @@ const generatePrivateKey = async () => { // Use SHA-512 to provide enough key material for secp256k1 (> 40 bytes) const hash = sha512(keymaterial).toString(Hex); const privateKey = secp256k1.utils.hashToPrivateKey(hash); - - return { - data: { - privateKey: secp256k1.utils.bytesToHex(privateKey), - }, - }; + return privateKey; } catch (e) { console.error(e); } diff --git a/src/extension/background-script/actions/nostr/getPrivateKey.ts b/src/extension/background-script/actions/nostr/getPrivateKey.ts index cf093ae274..714a377c86 100644 --- a/src/extension/background-script/actions/nostr/getPrivateKey.ts +++ b/src/extension/background-script/actions/nostr/getPrivateKey.ts @@ -1,9 +1,30 @@ +import { decryptData } from "~/common/lib/crypto"; +import type { MessagePrivateKeyGet } from "~/types"; + import state from "../../state"; -const getPrivateKey = async () => { - const privateKey = state.getState().getNostr().getPrivateKey(); +const getPrivateKey = async (message: MessagePrivateKeyGet) => { + const id = message?.args?.id; + + if (!id) { + return { + data: state.getState().getNostr().privateKey, + }; + } + + const accounts = state.getState().accounts; + if (Object.keys(accounts).includes(id)) { + const password = state.getState().password as string; + const account = accounts[id]; + if (!account.nostrPrivateKey) return { data: null }; + const privateKey = decryptData(account.nostrPrivateKey, password); + return { + data: privateKey, + }; + } + return { - data: privateKey, + error: "Account does not exist.", }; }; diff --git a/src/extension/background-script/actions/nostr/setPrivateKey.ts b/src/extension/background-script/actions/nostr/setPrivateKey.ts index c7fa543bc7..b6f475951a 100644 --- a/src/extension/background-script/actions/nostr/setPrivateKey.ts +++ b/src/extension/background-script/actions/nostr/setPrivateKey.ts @@ -1,10 +1,32 @@ +import { encryptData } from "~/common/lib/crypto"; import type { MessagePrivateKeySet } from "~/types"; import state from "../../state"; const setPrivateKey = async (message: MessagePrivateKeySet) => { - await state.getState().getNostr().setPrivateKey(message.args.privateKey); - return {}; + const id = message.args?.id || state.getState().currentAccountId; + + const password = state.getState().password as string; + const privateKey = message.args.privateKey; + const accounts = state.getState().accounts; + + if (id && Object.keys(accounts).includes(id)) { + const account = accounts[id]; + account.nostrPrivateKey = privateKey + ? encryptData(privateKey, password) + : null; + accounts[id] = account; + state.setState({ accounts }); + await state.getState().saveToStorage(); + return { + data: { + accountId: id, + }, + }; + } + return { + error: "No account selected.", + }; }; export default setPrivateKey; diff --git a/src/extension/background-script/actions/settings/changePassword.ts b/src/extension/background-script/actions/settings/changePassword.ts index 28d93d59e9..919afca8cb 100644 --- a/src/extension/background-script/actions/settings/changePassword.ts +++ b/src/extension/background-script/actions/settings/changePassword.ts @@ -8,7 +8,6 @@ const changePassword = async (message: Message) => { const password = state.getState().password as string; const newPassword = message.args.password as string; const tmpAccounts = { ...accounts }; - const nostPrivateKey = await state.getState().getNostr().getPrivateKey(); for (const accountId in tmpAccounts) { const accountConfig = decryptData( @@ -16,9 +15,16 @@ const changePassword = async (message: Message) => { password ); tmpAccounts[accountId].config = encryptData(accountConfig, newPassword); + const accountNostrKey = decryptData( + accounts[accountId].nostrPrivateKey as string, + password + ); + tmpAccounts[accountId].nostrPrivateKey = encryptData( + accountNostrKey, + newPassword + ); } state.setState({ accounts: tmpAccounts, password: newPassword }); - await state.getState().getNostr().setPrivateKey(nostPrivateKey); // make sure we immediately persist the updated accounts await state.getState().saveToStorage(); diff --git a/src/extension/background-script/migrations/index.ts b/src/extension/background-script/migrations/index.ts index ddec35b1dc..81443b33d6 100644 --- a/src/extension/background-script/migrations/index.ts +++ b/src/extension/background-script/migrations/index.ts @@ -52,6 +52,19 @@ const migrations = { // state is saved with the setMigrated call } }, + migrateisUsingGlobalNostrKey: async () => { + const { nostrPrivateKey, accounts } = state.getState(); + + if (nostrPrivateKey) { + Object.values(accounts).map((account) => { + if (!account.nostrPrivateKey) account.nostrPrivateKey = nostrPrivateKey; + }); + + state.setState({ + accounts, + }); + } + }, }; const migrate = async () => { @@ -64,6 +77,11 @@ const migrate = async () => { await migrations["migrateisUsingLegacyLnurlAuthKeySetting"](); await setMigrated("migrateisUsingLegacyLnurlAuthKeySetting"); } + if (shouldMigrate("migrateisUsingGlobalNostrKey")) { + console.info("Running migration for: migrateisUsingGlobalNostrKey"); + await migrations["migrateisUsingGlobalNostrKey"](); + await setMigrated("migrateisUsingGlobalNostrKey"); + } if (shouldMigrate("migratedeleteLegacyWeblnPermissions")) { console.info("Running migration for: migratedeleteLegacyWeblnPermissions"); await migrations["migratedeleteLegacyWeblnPermissions"](); diff --git a/src/extension/background-script/nostr/__test__/nostr.test.ts b/src/extension/background-script/nostr/__test__/nostr.test.ts index 61d918c9b6..33ec724609 100644 --- a/src/extension/background-script/nostr/__test__/nostr.test.ts +++ b/src/extension/background-script/nostr/__test__/nostr.test.ts @@ -12,18 +12,41 @@ const bob = { publicKey: "519f5ae2cd7d4b970c4edadb2efc947c9b803838de918d1c5bfd4b9c1a143b72", }; +const carol = { + privateKey: + "43a2d71f40dde6fb7588e7962a54b8bbd8dd4bd617a9a5c58b7bf0d8f3482f11", + publicKey: "a8c7d70a7d2e2826ce519a0a490fb953464c9d130235c321282983cd73be333f", +}; + describe("nostr", () => { test("encrypt & decrypt", async () => { - const nostr = new Nostr(); - nostr.getPrivateKey = jest.fn().mockReturnValue(alice.privateKey); + const aliceNostr = new Nostr(alice.privateKey); const message = "Secret message that is sent from Alice to Bob"; - const encrypted = nostr.encrypt(bob.publicKey, message); + const encrypted = aliceNostr.encrypt(bob.publicKey, message); - nostr.getPrivateKey = jest.fn().mockReturnValue(bob.privateKey); + const bobNostr = new Nostr(bob.privateKey); - const decrypted = nostr.decrypt(alice.publicKey, encrypted); + const decrypted = bobNostr.decrypt(alice.publicKey, encrypted); expect(decrypted).toMatch(message); }); + + test("Carol can't decrypt Alice's message for Bob", async () => { + const aliceNostr = new Nostr(alice.privateKey); + + const message = "Secret message that is sent from Alice to Bob"; + const encrypted = aliceNostr.encrypt(bob.publicKey, message); + + const carolNostr = new Nostr(carol.privateKey); + + let decrypted; + try { + decrypted = carolNostr.decrypt(alice.publicKey, encrypted); + } catch (e) { + decrypted = "error decrypting message"; + } + + expect(decrypted).not.toMatch(message); + }); }); diff --git a/src/extension/background-script/nostr/index.ts b/src/extension/background-script/nostr/index.ts index 4fb1bc9137..007b563e5a 100644 --- a/src/extension/background-script/nostr/index.ts +++ b/src/extension/background-script/nostr/index.ts @@ -5,51 +5,33 @@ import { AES } from "crypto-js"; import Base64 from "crypto-js/enc-base64"; import Hex from "crypto-js/enc-hex"; import Utf8 from "crypto-js/enc-utf8"; -import { decryptData, encryptData } from "~/common/lib/crypto"; import { Event } from "~/extension/ln/nostr/types"; -import { signEvent, getEventHash } from "../actions/nostr/helpers"; -import state from "../state"; +import { getEventHash, signEvent } from "../actions/nostr/helpers"; class Nostr { - getPrivateKey() { - const password = state.getState().password as string; - const encryptedKey = state.getState().nostrPrivateKey as string; - if (encryptedKey) { - try { - return decryptData(encryptedKey, password); - } catch (e) { - console.error("Could not decrypt the Nostr key"); - console.error(e); - } - } + privateKey: string; - return null; + constructor(privateKey: string) { + this.privateKey = privateKey; } getPublicKey() { const publicKey = secp256k1.schnorr.getPublicKey( - secp256k1.utils.hexToBytes(this.getPrivateKey()) + secp256k1.utils.hexToBytes(this.privateKey) ); const publicKeyHex = secp256k1.utils.bytesToHex(publicKey); return publicKeyHex; } - async setPrivateKey(privateKey: string) { - const password = state.getState().password as string; - - state.setState({ nostrPrivateKey: encryptData(privateKey, password) }); - await state.getState().saveToStorage(); - } - async signEvent(event: Event): Promise { - const signature = await signEvent(event, this.getPrivateKey()); + const signature = await signEvent(event, this.privateKey); event.sig = signature; return event; } encrypt(pubkey: string, text: string) { - const key = secp256k1.getSharedSecret(this.getPrivateKey(), "02" + pubkey); + const key = secp256k1.getSharedSecret(this.privateKey, "02" + pubkey); const normalizedKey = Buffer.from(key.slice(1, 33)); const hexNormalizedKey = secp256k1.utils.bytesToHex(normalizedKey); const hexKey = Hex.parse(hexNormalizedKey); @@ -65,7 +47,7 @@ class Nostr { decrypt(pubkey: string, ciphertext: string) { const [cip, iv] = ciphertext.split("?iv="); - const key = secp256k1.getSharedSecret(this.getPrivateKey(), "02" + pubkey); + const key = secp256k1.getSharedSecret(this.privateKey, "02" + pubkey); const normalizedKey = Buffer.from(key.slice(1, 33)); const hexNormalizedKey = secp256k1.utils.bytesToHex(normalizedKey); const hexKey = Hex.parse(hexNormalizedKey); diff --git a/src/extension/background-script/router.ts b/src/extension/background-script/router.ts index 5dba8ab46f..7cdf113039 100644 --- a/src/extension/background-script/router.ts +++ b/src/extension/background-script/router.ts @@ -38,6 +38,7 @@ const routes = { addAccount: accounts.add, editAccount: accounts.edit, getAccounts: accounts.all, + getAccount: accounts.get, removeAccount: accounts.remove, selectAccount: accounts.select, setPassword: setup.setPassword, diff --git a/src/extension/background-script/state.ts b/src/extension/background-script/state.ts index 0d5d4adf15..c02b39f8db 100644 --- a/src/extension/background-script/state.ts +++ b/src/extension/background-script/state.ts @@ -110,8 +110,13 @@ const state = createState((set, get) => ({ if (get().nostr) { return get().nostr as Nostr; } + const currentAccountId = get().currentAccountId as string; + const account = get().accounts[currentAccountId]; + + const password = get().password as string; + const privateKey = decryptData(account.nostrPrivateKey as string, password); - const nostr = new Nostr(); + const nostr = new Nostr(privateKey); set({ nostr: nostr }); return nostr; @@ -121,7 +126,7 @@ const state = createState((set, get) => ({ if (connector) { await connector.unload(); } - set({ password: null, connector: null, account: null }); + set({ password: null, connector: null, account: null, nostr: null }); }, isUnlocked: () => { return get().password !== null; diff --git a/src/extension/content-script/onstart.ts b/src/extension/content-script/onstart.ts index b0154ae2fa..70e0a163cb 100644 --- a/src/extension/content-script/onstart.ts +++ b/src/extension/content-script/onstart.ts @@ -14,7 +14,7 @@ async function onstart() { injectScript(browser.runtime.getURL("js/inpageScriptWebLN.bundle.js")); // window.nostr - const nostrEnabled = (await api.getSettings()).nostrEnabled; + const nostrEnabled = (await api.getAccount()).nostrEnabled; if (nostrEnabled) { injectScript(browser.runtime.getURL("js/inpageScriptNostr.bundle.js")); } diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index e70c8014c1..d2e0a6f4cb 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -374,27 +374,61 @@ }, "accounts": { "title": "Accounts", - "actions": { - "add_account": "Add account" - }, - "edit": { - "title": "Edit Account", + "account_view": { + "title1": "Account Information", + "title2": "Edit Account", "name": { - "label": "Name" + "title": "Name", + "placeholder": "Account Name" + }, + "export": { + "title": "Export Account", + "screen_reader": "Export account details", + "waiting": "waiting for LndHub data...", + "your_ln_address": "Your Lightning Address:", + "tip_mobile": "Tip: Use this wallet with your mobile device", + "export_uri": "LNDHub Credentials URI", + "scan_qr": "Import this wallet into Zeus or BlueWallet by scanning the QRCode." + }, + "nostr": { + "title": "Nostr", + "hint": "is a simple and open protocol that aims to create censorship-resistant social networks. Nostr works with cryptographic keys. To publish something you sign it with your key and send it to multiple relays. You can use Alby to manage your Nostr key. Many Nostr applications will then allow you to simply use the key from the Alby extension.", + "private_key": { + "title": "Manage your keys", + "subtitle": "Paste your private key or generate a new one. Make sure you backup your private key before you generate a new one. <0>Learn more »", + "warning": "This will delete your old private key. Are you sure?", + "success": "Private key encrypted & saved successfully.", + "successfully_removed": "Private key removed successfully.", + "label": "Private Key" + }, + "public_key": { + "label": "Public Key" + }, + "generate_keys": { + "title": "Generate new Nostr keys", + "screen_reader": "Generate new nostr keys for your account", + "hint": "You can generate a random set of Nostr keys or derive keys from this account details (using a signed canonical phrase). <0>Learn more »", + "actions": { + "random_keys": "Generate random keys", + "derived_keys": "Derive keys from account" + } + }, + "actions": { + "generate": "Generate new keys" + } }, - "screen_reader": "Edit account name" - }, - "export": { - "title": "Export Account", - "screen_reader": "Export account details", - "waiting": "waiting for LndHub data...", - "your_ln_address": "Your Lightning Address:", - "tip_mobile": "Tip: Use this wallet with your mobile device", - "export_uri": "LNDHub Credentials URI", - "scan_qr": "Import this wallet into Zeus or BlueWallet by scanning the QRCode." + "remove": { + "title": "Remove This Account", + "subtitle": "All the linked allowances will be deleted. Please be certain.", + "confirm": "Are you sure you want to remove account: {{name}}? \nThis can not be undone. If you used this account to login to websites you might lose access to those." + }, + "actions": { + "remove_account": "Remove account", + "export": "Export" + } }, - "remove": { - "confirm": "Are you sure you want to remove account: {{name}}? \nThis can not be undone. If you used this account to login to websites you might lose access to those." + "actions": { + "add_account": "Add account" } }, "enable": { @@ -512,10 +546,8 @@ "hint": "is a simple and open protocol that aims to create censorship-resistant social networks. Nostr works with cryptographic keys. To publish something you sign it with your key and send it to multiple relays. You can use Alby to manage your Nostr key. Many Nostr applications will then allow you to simply use the key from the Alby extension.", "private_key": { "title": "Private key", - "subtitle": "Paste your private key or generate a new one. Generating a key will create a new key based on the current account you use. It can be re-generated, but please make sure you backup this private key. <0>Learn more »", - "generate": "Generate", - "warning": "This will delete your old private key. Are you sure?", - "success": "Private key encrypted & saved successfully." + "subtitle": "This section is moved to accounts page as keys are account specific now.", + "go_to": "Go To Accounts" } } }, @@ -704,6 +736,7 @@ "success": "Success", "error": "Error", "settings": "Settings", + "accounts": "Accounts", "discover": "Discover", "websites": "Websites", "sats_one": "sat", diff --git a/src/types.ts b/src/types.ts index 51c752d90f..788478993b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -16,6 +16,7 @@ export interface Account { connector: ConnectorType; config: string; name: string; + nostrPrivateKey?: string | null; } export interface Accounts { @@ -166,6 +167,11 @@ export interface MessagePaymentAll extends MessageDefault { }; } +export interface MessageAccountGet extends MessageDefault { + args?: { id?: Account["id"] }; + action: "getAccount"; +} + export interface MessageAccountRemove extends MessageDefault { args?: { id: Account["id"] }; action: "removeAccount"; @@ -372,8 +378,23 @@ export interface MessagePublicKeyGet extends MessageDefault { action: "getPublicKeyOrPrompt"; } +export interface MessagePrivateKeyGet extends MessageDefault { + args?: { + id?: Account["id"]; + }; + action: "getPrivateKey"; +} + +export interface MessagePrivateKeyGenerate extends MessageDefault { + args?: { + type?: "random"; + }; + action: "generatePrivateKey"; +} + export interface MessagePrivateKeySet extends MessageDefault { args: { + id?: Account["id"]; privateKey: string; }; action: "setPrivateKey"; From 7c217127ee6402e338dbfed2e38deb8319c89106 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=B6gel?= Date: Wed, 1 Feb 2023 21:16:15 +0100 Subject: [PATCH 116/123] chore: re: https://github.com/getAlby/lightning-browser-extension/issues/2018 Compressed images will be uploaded to DigitalOcean (DO) bucket. changed file extension from SVG to PNG because those were: a. fake SVGs that only contained embedded PNGs b. real SVG files I found on the net did not fit square formatting or had weird viewbox/size parameters so I couldn't get them to fit into our page without editing the SVGs in Adobe Illustrator. + PNGs are scaled to 256x256 (where the original PNG was large enough, one was slightly smaller and I kept its original size), which is more than enough for the 56x56 CSS pixel elements we have on the discover page. --- src/app/screens/Discover/websites.json | 32 +++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json index 0d6d20c0c7..25deba0e8c 100644 --- a/src/app/screens/Discover/websites.json +++ b/src/app/screens/Discover/websites.json @@ -5,19 +5,19 @@ { "title": "LNMarkets", "subtitle": "Instant Bitcoin derivatives trading", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnmarketes.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnmarkets.png", "url": "https://lnmarkets.com/" }, { "title": "Kollider", "subtitle": "Instant Bitcoin derivatives trading", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/kollider_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/kollider_thumbnail.png", "url": "https://kollider.xyz/" }, { "title": "LOFT", "subtitle": "Trade investment products in Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/loft-trade_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/loft-trade_thumbnail.png", "url": "https://loft.trade/" } ] @@ -28,13 +28,13 @@ { "title": "Lightning Poker", "subtitle": "Play Poker with Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-poker_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-poker_thumbnail.png", "url": "https://lightning-poker.com/" }, { "title": "LNBlackJack", "subtitle": "Play Blackjack with Bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnblackjack_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnblackjack_thumbnail.png", "url": "https://www.lnblackjack.com/" }, { @@ -46,7 +46,7 @@ { "title": "LNflip", "subtitle": "Play coin flip matches against other players", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnflip_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lnflip_thumbnail.png", "url": "https://www.lnflip.com/" } ] @@ -57,25 +57,25 @@ { "title": "Podverse", "subtitle": "Podcast player with bitcoin payments", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/podverse_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/podverse_thumbnail.png", "url": "https://podverse.fm/" }, { "title": "Stacker.News", "subtitle": "Lightning powered Bitcoin news site", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/stacker-news_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/stacker-news_thumbnail.png", "url": "https://stacker.news/" }, { "title": "Wavlake", "subtitle": "Lightning powered music player", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/wavlake.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/wavlake.png", "url": "https://www.wavlake.com/" }, { "title": "Y'alls", "subtitle": "Articles about the Lightning Network", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/yalls.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/yalls.png", "url": "https://yalls.org/" } ] @@ -92,7 +92,7 @@ { "title": "Lightning Network Stores", "subtitle": "Collection of stores and websites accepting bitcoin", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-network-stores_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightning-network-stores_thumbnail.png", "url": "https://lightningnetworkstores.com/" }, { @@ -150,31 +150,31 @@ { "title": "Geyser", "subtitle": "Crowdfunding projects with Bitcoin Lightning", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/geyser_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/geyser_thumbnail.png", "url": "https://geyser.fund/" }, { "title": "Amboss", "subtitle": "Lightning Network node explorer", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/amboss-space_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/amboss-space_thumbnail.png", "url": "https://amboss.space/" }, { "title": "Lightsats", "subtitle": "Onboard people to bitcoin by sending them tips", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightsats_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/lightsats_thumbnail.png", "url": "https://lightsats.com/" }, { "title": "Sats for Likes", "subtitle": "Earn sats for accomplishing tasks", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/sats4likes.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/sats4likes.png", "url": "https://www.sats4likes.com/" }, { "title": "Vida", "subtitle": "Earn sats anytime someone wants to connect and chatt", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/vida_thumbnail.svg", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/vida_thumbnail.png", "url": "https://vida.page/" }, { From 0700a5c38b0e4da5273d5af5826a55cf56fd4654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=B6gel?= Date: Wed, 1 Feb 2023 21:29:22 +0100 Subject: [PATCH 117/123] chore: aaaa This should be the same bucket under a different name / domain. --- src/app/screens/Discover/websites.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json index 25deba0e8c..ac65fdde26 100644 --- a/src/app/screens/Discover/websites.json +++ b/src/app/screens/Discover/websites.json @@ -186,7 +186,7 @@ { "title": "channel.ninja", "subtitle": "Get recommended channel partners for your lightning node", - "logo": "https://fra1.digitaloceanspaces.com/alby-storage/alby-extension-website-screen/channelninja.png", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/channelninja.png", "url": "https://channel.ninja/" } ] From 2508eb8a4121c6d7b03f28054e186ae00e803795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=B6gel?= Date: Wed, 1 Feb 2023 21:45:41 +0100 Subject: [PATCH 118/123] chore: add Nostr clients: add Hamstr, ABC-sort. --- src/app/screens/Discover/websites.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/app/screens/Discover/websites.json b/src/app/screens/Discover/websites.json index ac65fdde26..3871da8cce 100644 --- a/src/app/screens/Discover/websites.json +++ b/src/app/screens/Discover/websites.json @@ -112,18 +112,24 @@ "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/astral_thumbnail.png", "url": "https://astral.ninja/" }, - { - "title": "Snort", - "subtitle": "Fast nostr web client.", - "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/snort_thumbnail.png", - "url": "https://snort.social" - }, { "title": "emon.chat", "subtitle": "Instant messaging client with built in lightning payments.", "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/emon_thumbnail.svg", "url": "https://emon.chat/" }, + { + "title": "Hamstr", + "subtitle": "A twitter-style nostr web client", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/hamstr-to.png", + "url": "https://hamstr.to/home" + }, + { + "title": "Snort", + "subtitle": "Fast nostr web client.", + "logo": "https://cdn.getalby-assets.com/alby-extension-website-screen/snort_thumbnail.png", + "url": "https://snort.social" + }, { "title": "Yo, Sup?", "subtitle": "The blue bird experience for Nostr.", From 2df99e9fcb40132fdfc8ebed906c53b3b0e2d8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?BSN=20=E2=88=9E/21M=20=E2=82=BF?= Date: Tue, 31 Jan 2023 14:45:52 +0000 Subject: [PATCH 119/123] Translated using Weblate (German) Currently translated at 100.0% (497 of 497 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/de/ --- src/i18n/locales/de/translation.json | 44 +++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 4 deletions(-) diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index 8fdafbfb0c..d9e2520eee 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -9,9 +9,9 @@ }, "set_password": { "title": "Passwort zum Entsperren festlegen", - "description": "Dieses Passwort wird verwendet, um deine Brieftasche zu schützen und Zugriff auf die Browsererweiterung zu gewähren. Es kann nicht zurückgesetzt werden und ist von deinem Alby-Kontopasswort getrennt.", + "description": "Die Daten Ihres Lightning-Kontos sind mit einem Freischalt Passwort sicher verschlüsselt. Vergesse dieses Passwort nicht! Du benötigst es, um die Alby Erweiterung zu entsperren (in diesem Browser)", "choose_password": { - "label": "Wähle ein Entsperrpasswort:" + "label": "Wähle ein Password zum Entsperren:" }, "errors": { "mismatched_password": "Die Passwörter stimmen nicht überein.", @@ -275,7 +275,18 @@ "label": "Gebe dein Kollider Benutzernamen ein" } }, - "title": "Verbinde Lightning Wallet" + "title": "Verbinde Lightning Wallet", + "lnc": { + "title": "LND mit LNC", + "page": { + "title": "Verbinde dich mit deinem LND Knoten", + "description": "Erstelle eine neue Sitzung im Terminal (litd), um eine neue Paarungsphrase zu erhalten, und gebe sie hier ein" + }, + "pairing_phrase": { + "label": "Dein Paarungssatz ", + "placeholder": "geheimer stapel sats phrase" + } + } }, "unlock": { "unlock_error": { @@ -652,7 +663,8 @@ "entertaiment": "Unterhaltung", "shopping": "Einkaufen", "miscellaneous": "Sonstiges", - "showcases": "Schaukästen" + "showcases": "Schaukästen", + "nostr": "Nostr" }, "tips": { "title": "Deine Alby-Wallet ist bereit", @@ -883,6 +895,30 @@ "nip04decrypt": "Daten entschlüsseln.", "nip04encrypt": "Daten verschlüsseln.", "signmessage": "Unterschreibe deine Nachricht mit deinem Schlüssel." + }, + "lnc": { + "connectpeer": "Stelle eine Verbindung zu einer Gegenstelle her.", + "disconnectpeer": "Trenne die Verbindung zu einer entfernten Gegenstelle.", + "estimatefee": "Schätze den Gebührensatz und die Gesamtgebühren für eine Transaktion.", + "getnodeinfo": "Abrufen der Kanalinformationen für einen Knoten.", + "getchaninfo": "Ermittelt die Netzansage für den angegebenen Kanal.", + "listpayments": "Erhalte eine Liste aller ausgehenden Zahlungen.", + "queryroutes": "Abfrage nach einer möglichen Route.", + "verifymessage": "Überprüfung einer Signatur über eine Nachricht.", + "listpeers": "Ermittelt eine Liste aller derzeit aktiven Peers.", + "sendtoroute": "Nehme eine Zahlung über die angegebene Route vor.", + "decodepayreq": "Dekodierung einer Zahlungsanforderungszeichenfolge.", + "addinvoice": "Erstelle eine neue Rechnungen.", + "routermc": "Lese den internen Status der Missionskontrolle.", + "gettransactions": "Abrufen einer Liste aller für die Wallet relevanten Transaktionen.", + "getnetworkinfo": "Abrufen grundlegender Statistiken über die bekannte Kanalkurve.", + "lookupinvoice": "Rechnungsdetails nachschlagen.", + "getinfo": "Abrufen der Knoteninformationen.", + "listchannels": "Erhalte eine Beschreibung aller offenen Kanäle.", + "listinvoices": "Erhalte eine Liste aller Rechnungen.", + "channelbalance": "Erhalte einen Bericht über den Gesamtbetrag der Mittel für alle offenen Kanäle.", + "walletbalance": "Ermittel die gesamten nicht verbrauchten Ausgaben deiner Wallet.", + "openchannel": "Öffne einen neuen Kanal." } } } From d71ba5b528a2fd63334aac921501723a3b6fe8e1 Mon Sep 17 00:00:00 2001 From: webfans Date: Wed, 1 Feb 2023 01:25:12 +0000 Subject: [PATCH 120/123] Translated using Weblate (Chinese (Simplified)) Currently translated at 64.9% (323 of 497 strings) Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/zh_Hans/ --- src/i18n/locales/zh_Hans/translation.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 0e68af91a3..8a0dddd2bf 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -32,7 +32,8 @@ "actions": { "delete_edit_account": "删除无效账户并重新编辑" } - } + }, + "title": "欢迎使用Alby" }, "choose_connector": { "lnd": { @@ -546,6 +547,17 @@ "payment_summary": { "description": "付款至: {{destination}}" } + }, + "choose_path": { + "title": "连接", + "description": "要使用Alby进行在线支付,请将Alby连接到你的闪电网络钱包。", + "other": { + "title": "其他钱包" + }, + "alby": { + "description": "注册或使用您现有的Alby账户,立即开始闪电支付。", + "create_new": "注册" + } } }, "common": { From 7fe6811d62b3d704414cb3757cbb662a55de19aa Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 1 Feb 2023 21:08:50 +0100 Subject: [PATCH 121/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 14 ++------------ src/i18n/locales/de/translation.json | 12 +----------- src/i18n/locales/eo/translation.json | 14 ++------------ src/i18n/locales/es/translation.json | 10 +--------- src/i18n/locales/fi/translation.json | 14 ++------------ src/i18n/locales/it/translation.json | 14 ++------------ src/i18n/locales/nl/translation.json | 14 ++------------ src/i18n/locales/pt_BR/translation.json | 12 +----------- src/i18n/locales/sv/translation.json | 14 ++------------ src/i18n/locales/tl/translation.json | 10 +--------- src/i18n/locales/zh_Hans/translation.json | 12 +----------- 11 files changed, 17 insertions(+), 123 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index 190246a904..9ae2f21251 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -285,23 +285,15 @@ "add_account": "" }, "edit": { - "title": "", "name": { "label": "" - }, - "screen_reader": "" + } }, "export": { "title": "", - "screen_reader": "", "waiting": "", - "your_ln_address": "", "tip_mobile": "", - "export_uri": "", "scan_qr": "" - }, - "remove": { - "confirm": "" } }, "enable": { @@ -419,9 +411,7 @@ "private_key": { "title": "", "subtitle": "", - "generate": "", - "warning": "", - "success": "" + "warning": "" } } }, diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index d9e2520eee..d15f74b575 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -306,10 +306,8 @@ "settings": { "nostr": { "private_key": { - "warning": "Das wird deinen alten Private Key löschen. Bist du sicher?", "success": "Privaten Schlüssel erfolgreich verschlüsselt und gespeichert.", "title": "Privater Schlüssel", - "generate": "Generiere", "subtitle": "Füge deinen privaten Schlüssel ein oder erzeuge einen neuen Schlüssel. Beim Generieren eines Schlüssels wird ein neuer Schlüssel auf der Grundlage des aktuellen Kontos, das du verwendest, erstellt. Er kann erneut generiert werden, aber bitte stelle sicher, dass du diesen privaten Schlüssel sicherst. <0>Mehr erfahren\"" }, "hint": "Es ist ein einfaches und offenes Protokoll, das darauf abzielt, zensurresistente soziale Netzwerke zu schaffen. Nostr arbeitet mit kryptographischen Schlüsseln. Um etwas zu veröffentlichen, signiere es mit deinem Schlüssel und senden es an mehrere Relays. Du kannst Alby verwenden, um deinen Nostr-Schlüssel zu verwalten. Viele Nostr-Anwendungen erlauben dann, einfach den Schlüssel aus der Alby-Erweiterung zu verwenden.", @@ -427,24 +425,16 @@ "accounts": { "title": "Konten", "export": { - "title": "Konto exportieren", "screen_reader": "Kontodaten exportieren", - "waiting": "Warten auf LndHub Daten...", "scan_qr": "Importiere diese Brieftasche in Zeus oder BlueWallet, indem du den QRCode scannst.", - "your_ln_address": "Deine Lightning Adresse:", - "tip_mobile": "Tipp: Verwende diese Geldbörse mit deinem Mobilgerät", - "export_uri": "LNDHub Anmeldeinformationen URI" + "tip_mobile": "Tipp: Verwende diese Geldbörse mit deinem Mobilgerät" }, "edit": { "name": { "label": "Name" }, - "screen_reader": "Kontonamen bearbeiten", "title": "Konto bearbeiten" }, - "remove": { - "confirm": "Bist du dir sicher, dass du das Konto entfernen möchtest: {{Name}}? \nDies kann nicht rückgängig gemacht werden. Wenn du dich mit diesem Konto bei Websites angemeldet haben, verlierst du möglicherweise den Zugriff auf diese." - }, "actions": { "add_account": "Konto hinzufügen" } diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index 087f622cc5..f67d83dd02 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -285,23 +285,15 @@ "add_account": "" }, "edit": { - "title": "", "name": { "label": "Nomo" - }, - "screen_reader": "" + } }, "export": { "title": "", - "screen_reader": "", "waiting": "", - "your_ln_address": "", "tip_mobile": "", - "export_uri": "", "scan_qr": "" - }, - "remove": { - "confirm": "" } }, "enable": { @@ -419,9 +411,7 @@ "private_key": { "title": "Privata ŝlosilo", "subtitle": "", - "generate": "Generi", - "warning": "", - "success": "" + "warning": "" } } }, diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 16622fdfba..e3258b5752 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -194,23 +194,15 @@ "add_account": "Añadir Cuenta" }, "edit": { - "title": "Editar Cuenta", "name": { "label": "Nombre" - }, - "screen_reader": "Editar nombre de cuenta" + } }, "export": { "title": "Cuenta de exportación", - "screen_reader": "Exportar detalles de la cuenta", "waiting": "esperando los datos de LndHub...", - "your_ln_address": "Su Dirección de Lightning:", "tip_mobile": "Consejo: Use esta billetera con su dispositivo móvil", - "export_uri": "Credenciales de la URI LNDHub", "scan_qr": "Importe esta billetera a Zeus o BlueWallet escaneando el código QR." - }, - "remove": { - "confirm": "¿Está seguro de que desea eliminar la cuenta: {{name}}? \nEsto no se puede deshacer. Si usó esta cuenta para iniciar sesión en sitios web, es posible que pierda el acceso a ellos." } }, "enable": { diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index a630f62f76..006d7b121a 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -285,23 +285,15 @@ "add_account": "Lisää tili" }, "edit": { - "title": "Muokkaa tiliä", "name": { "label": "Nimi" - }, - "screen_reader": "Muokkaa tilin nimeä" + } }, "export": { "title": "Vie tili", - "screen_reader": "Vie tilin yksityiskohdat", "waiting": "Odotetaan LndHub-tietoja...", - "your_ln_address": "Lightning-osoitteesi:", "tip_mobile": "Vinkki: Käytä tätä lompakkoa mobiililaitteesi kanssa", - "export_uri": "LNDHub-tunnistetietojen URI", "scan_qr": "Tuo tämä lompakko Zeusiin tai sinilompakkoon skannaamalla QRCode." - }, - "remove": { - "confirm": "Haluatko varmasti poistaa tilin: {{name}}?\nTätä ei voi peruuttaa. Jos käytit tätä tiliä verkkosivustoille kirjautumiseen, saatat menettää pääsyn niihin." } }, "enable": { @@ -419,9 +411,7 @@ "private_key": { "title": "Yksityinen avain", "subtitle": "Avaimen luominen luo uuden avaimen nykyisen käyttämäsi tilin perusteella. Varmista, että varmuuskopioit tämän yksityisen avaimen.", - "generate": "Luo", - "warning": "Tämä poistaa vanhan yksityisen avaimesi. Oletko varma?", - "success": "Yksityinen avain salattu ja tallennettu onnistuneesti." + "warning": "Tämä poistaa vanhan yksityisen avaimesi. Oletko varma?" } } }, diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index c053e712a8..c88826c8b7 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -253,23 +253,15 @@ "add_account": "Aggiungi account" }, "edit": { - "title": "Modifica account", "name": { "label": "Nome" - }, - "screen_reader": "Modifica nome dell'account" + } }, "export": { "title": "Esporta Account", - "screen_reader": "Esporta i dettagli dell'account", "waiting": "in attesa dei dati di LndHub...", - "your_ln_address": "Il tuo indirizzo Lightning:", "tip_mobile": "Suggerimento: Utilizza questo portafoglio con il tuo dispositivo mobile", - "export_uri": "URI delle credenziali di LNDHub", "scan_qr": "Importa questo portafoglio in Zeus o BlueWallet scansionando il QRCode." - }, - "remove": { - "confirm": "Sei sicuro di voler rimuovere l'account: {{name}}? \nQuesta operazione non può essere annullata. Se hai usato questo account per accedere a siti web, potresti perdere l'accesso a questi ultimi." } }, "enable": { @@ -387,9 +379,7 @@ "private_key": { "title": "Chiave privata", "subtitle": "La generazione di una chiave creerà una nuova chiave basata sull'account correntemente utilizzato. Assicurati di fare un backup della chiave privata.", - "generate": "Genera", - "warning": "In questo modo si cancellerà la vecchia chiave privata. Sei sicuro?", - "success": "Chiave privata criptata e salvata con successo." + "warning": "In questo modo si cancellerà la vecchia chiave privata. Sei sicuro?" } } }, diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index 358870be3b..ae6ffd71bd 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -286,23 +286,15 @@ "add_account": "" }, "edit": { - "title": "", "name": { "label": "" - }, - "screen_reader": "" + } }, "export": { "title": "", - "screen_reader": "", "waiting": "", - "your_ln_address": "", "tip_mobile": "", - "export_uri": "", "scan_qr": "" - }, - "remove": { - "confirm": "" } }, "enable": { @@ -421,9 +413,7 @@ "private_key": { "title": "", "subtitle": "", - "generate": "", - "warning": "", - "success": "" + "warning": "" } } }, diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 1b1be13d62..6d393304df 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -289,23 +289,15 @@ "add_account": "Adicionar conta" }, "edit": { - "title": "Editar Conta", "name": { "label": "Nome" - }, - "screen_reader": "Editar nome da conta" + } }, "export": { "title": "Exportar Conta", - "screen_reader": "Exportar detalhes da conta", "waiting": "aguardando dados LndHub...", - "your_ln_address": "Seu Endereço Relâmpago:", "tip_mobile": "Dica: Use esta carteira no seu dispositivo móvel", - "export_uri": "Credenciais URI LNDHub", "scan_qr": "Leia o Código QR para importar esta carteira na Zeus ou BlueWallet." - }, - "remove": { - "confirm": "Tem certeza de que deseja remover a conta: {{name}}? \nEsta ação não pode ser desfeita. Se você usou essa conta para logar em sites, poderá perder o acesso a eles." } }, "enable": { @@ -422,9 +414,7 @@ "title": "Nostr", "private_key": { "subtitle": "Cole ou gere uma nova chave privada. Ao gerar uma chave, ela será criada a partir da conta atual que você usa. Certifique-se de fazer backup desta chave privada. <0>Saiba mais »", - "warning": "Isso excluirá sua chave privada antiga. Tem certeza de que deseja prosseguir?", "title": "Chave privada", - "generate": "Gerar", "success": "A chave privada foi encriptada e salva com sucesso." }, "hint": "é um protocolo simples e aberto que visa criar redes sociais resistentes à censura. Os perfis na rede Nostr são chaves criptográficas. Para publicar algo, você assina com sua chave e a informação é enviada para servidores. Na Alby você pode usar e gerenciar seu perfil em diferentes aplicações que suportam esse recurso." diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index 916a599c9f..d200503263 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -253,23 +253,15 @@ "add_account": "Lägg till konto" }, "edit": { - "title": "Redigera konto", "name": { "label": "Namn" - }, - "screen_reader": "Redigera namn på konto" + } }, "export": { "title": "Exportera Konto", - "screen_reader": "Exportera kontodetaljer", "waiting": "väntar på LndHub- data...", - "your_ln_address": "Din Lightning-adress:", "tip_mobile": "Tips: Använd denna plånbok på din mobila enhet", - "export_uri": "LNDHub Credentials URI", "scan_qr": "Importera denna plånbok till Zeus eller BlueWallet genom att skanna QR-kod." - }, - "remove": { - "confirm": "Är du säker på att du vill radera kontot: {{name}}?\nDetta kan inte ångras. Om du loggat in på webbplatser med kontot kan du förlora åtkomst till dessa." } }, "enable": { @@ -387,9 +379,7 @@ "private_key": { "title": "Privat nyckel", "subtitle": "Generering av nyckel skapar en ny nyckel baserat på det konto du använder för tillfället. Se till att säkerhetskopiera den privata nyckeln.", - "generate": "Skapa", - "warning": "Detta raderar din gamla privata nyckel. Är du säker?", - "success": "Privat nyckel krypterad och sparad." + "warning": "Detta raderar din gamla privata nyckel. Är du säker?" } } }, diff --git a/src/i18n/locales/tl/translation.json b/src/i18n/locales/tl/translation.json index 0e0aaa20c6..9b1b9f65cd 100644 --- a/src/i18n/locales/tl/translation.json +++ b/src/i18n/locales/tl/translation.json @@ -253,23 +253,15 @@ "add_account": "" }, "edit": { - "title": "", "name": { "label": "" - }, - "screen_reader": "" + } }, "export": { "title": "", - "screen_reader": "", "waiting": "", - "your_ln_address": "", "tip_mobile": "", - "export_uri": "", "scan_qr": "" - }, - "remove": { - "confirm": "" } }, "enable": { diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 8a0dddd2bf..cd28aa7c80 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -282,25 +282,17 @@ }, "accounts": { "edit": { - "title": "编辑账户", "name": { "label": "名称" - }, - "screen_reader": "编辑账户名称" + } }, "export": { "waiting": "正在等待 LndHub 数据...", - "title": "导出账户", "your_ln_address": "你的闪电地址:", - "tip_mobile": "提示:用你的移动设备使用这个钱包", "export_uri": "LNDHub凭证URI", - "scan_qr": "通过扫描二维码将这个钱包导入Zeus或BlueWallet。", "screen_reader": "导出帐户详情" }, "title": "账户", - "remove": { - "confirm": "是否确定要删除帐户:{{name}}?\n这是无法撤消的。如果你使用此账户登录网站,则可能无法访问这些网站。" - }, "actions": { "add_account": "添加账户" } @@ -332,9 +324,7 @@ "nostr": { "private_key": { "title": "私钥", - "generate": "生成", "warning": "这将删除你的旧私钥。是否确定?", - "success": "私钥已加密并成功保存。", "subtitle": "生成密钥将根据你当前使用的帐户创建一个新密钥。请确保备份此私钥。" }, "title": "Nostr", From 9b04044b4ea544426fdbf9834f7093fb053db5fc Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 1 Feb 2023 22:11:51 +0100 Subject: [PATCH 122/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 12 ++---------- src/i18n/locales/de/translation.json | 8 ++------ src/i18n/locales/eo/translation.json | 12 ++---------- src/i18n/locales/es/translation.json | 9 +-------- src/i18n/locales/fi/translation.json | 12 ++---------- src/i18n/locales/it/translation.json | 12 ++---------- src/i18n/locales/nl/translation.json | 12 ++---------- src/i18n/locales/pt_BR/translation.json | 12 ++---------- src/i18n/locales/sv/translation.json | 12 ++---------- src/i18n/locales/tl/translation.json | 9 +-------- src/i18n/locales/zh_Hans/translation.json | 10 +--------- 11 files changed, 19 insertions(+), 101 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index 9ae2f21251..88d51370da 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -284,16 +284,9 @@ "actions": { "add_account": "" }, - "edit": { - "name": { - "label": "" - } - }, "export": { "title": "", - "waiting": "", - "tip_mobile": "", - "scan_qr": "" + "tip_mobile": "" } }, "enable": { @@ -410,8 +403,7 @@ "hint": "", "private_key": { "title": "", - "subtitle": "", - "warning": "" + "subtitle": "" } } }, diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index d15f74b575..2582318b52 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -306,7 +306,6 @@ "settings": { "nostr": { "private_key": { - "success": "Privaten Schlüssel erfolgreich verschlüsselt und gespeichert.", "title": "Privater Schlüssel", "subtitle": "Füge deinen privaten Schlüssel ein oder erzeuge einen neuen Schlüssel. Beim Generieren eines Schlüssels wird ein neuer Schlüssel auf der Grundlage des aktuellen Kontos, das du verwendest, erstellt. Er kann erneut generiert werden, aber bitte stelle sicher, dass du diesen privaten Schlüssel sicherst. <0>Mehr erfahren\"" }, @@ -425,15 +424,12 @@ "accounts": { "title": "Konten", "export": { - "screen_reader": "Kontodaten exportieren", - "scan_qr": "Importiere diese Brieftasche in Zeus oder BlueWallet, indem du den QRCode scannst.", - "tip_mobile": "Tipp: Verwende diese Geldbörse mit deinem Mobilgerät" + "scan_qr": "Importiere diese Brieftasche in Zeus oder BlueWallet, indem du den QRCode scannst." }, "edit": { "name": { "label": "Name" - }, - "title": "Konto bearbeiten" + } }, "actions": { "add_account": "Konto hinzufügen" diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index f67d83dd02..d7840b6ef0 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -284,16 +284,9 @@ "actions": { "add_account": "" }, - "edit": { - "name": { - "label": "Nomo" - } - }, "export": { "title": "", - "waiting": "", - "tip_mobile": "", - "scan_qr": "" + "tip_mobile": "" } }, "enable": { @@ -410,8 +403,7 @@ "hint": "", "private_key": { "title": "Privata ŝlosilo", - "subtitle": "", - "warning": "" + "subtitle": "" } } }, diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index e3258b5752..03c900a625 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -193,16 +193,9 @@ "actions": { "add_account": "Añadir Cuenta" }, - "edit": { - "name": { - "label": "Nombre" - } - }, "export": { "title": "Cuenta de exportación", - "waiting": "esperando los datos de LndHub...", - "tip_mobile": "Consejo: Use esta billetera con su dispositivo móvil", - "scan_qr": "Importe esta billetera a Zeus o BlueWallet escaneando el código QR." + "tip_mobile": "Consejo: Use esta billetera con su dispositivo móvil" } }, "enable": { diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index 006d7b121a..79aae17b3f 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -284,16 +284,9 @@ "actions": { "add_account": "Lisää tili" }, - "edit": { - "name": { - "label": "Nimi" - } - }, "export": { "title": "Vie tili", - "waiting": "Odotetaan LndHub-tietoja...", - "tip_mobile": "Vinkki: Käytä tätä lompakkoa mobiililaitteesi kanssa", - "scan_qr": "Tuo tämä lompakko Zeusiin tai sinilompakkoon skannaamalla QRCode." + "tip_mobile": "Vinkki: Käytä tätä lompakkoa mobiililaitteesi kanssa" } }, "enable": { @@ -410,8 +403,7 @@ "hint": "on yksinkertainen ja avoin protokolla, jonka tarkoituksena on luoda sensuurin kestäviä sosiaalisia verkostoja. Nostr toimii kryptografisten avainten kanssa. Jos haluat julkaista jotain, allekirjoita se avaimellasi ja lähetä se useille välittäjille. Voit käyttää Albyä Nostr-avaimen hallintaan. Monet Nostr-sovellukset sallivat sitten yksinkertaisesti käyttää avainta Alby-laajennuksesta.", "private_key": { "title": "Yksityinen avain", - "subtitle": "Avaimen luominen luo uuden avaimen nykyisen käyttämäsi tilin perusteella. Varmista, että varmuuskopioit tämän yksityisen avaimen.", - "warning": "Tämä poistaa vanhan yksityisen avaimesi. Oletko varma?" + "subtitle": "Avaimen luominen luo uuden avaimen nykyisen käyttämäsi tilin perusteella. Varmista, että varmuuskopioit tämän yksityisen avaimen." } } }, diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index c88826c8b7..d00a683a3b 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -252,16 +252,9 @@ "actions": { "add_account": "Aggiungi account" }, - "edit": { - "name": { - "label": "Nome" - } - }, "export": { "title": "Esporta Account", - "waiting": "in attesa dei dati di LndHub...", - "tip_mobile": "Suggerimento: Utilizza questo portafoglio con il tuo dispositivo mobile", - "scan_qr": "Importa questo portafoglio in Zeus o BlueWallet scansionando il QRCode." + "tip_mobile": "Suggerimento: Utilizza questo portafoglio con il tuo dispositivo mobile" } }, "enable": { @@ -378,8 +371,7 @@ "hint": "è un protocollo semplice e aperto che mira a creare reti sociali resistenti alla censura. Nostr funziona con chiavi crittografiche. Per pubblicare qualcosa si firma con la propria chiave e la si invia a più relè. È possibile utilizzare Alby per gestire la propria chiave Nostr. Molte applicazioni Nostr vi permetteranno poi di utilizzare semplicemente la chiave dall'estensione Alby.", "private_key": { "title": "Chiave privata", - "subtitle": "La generazione di una chiave creerà una nuova chiave basata sull'account correntemente utilizzato. Assicurati di fare un backup della chiave privata.", - "warning": "In questo modo si cancellerà la vecchia chiave privata. Sei sicuro?" + "subtitle": "La generazione di una chiave creerà una nuova chiave basata sull'account correntemente utilizzato. Assicurati di fare un backup della chiave privata." } } }, diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index ae6ffd71bd..e28fd9427e 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -285,16 +285,9 @@ "actions": { "add_account": "" }, - "edit": { - "name": { - "label": "" - } - }, "export": { "title": "", - "waiting": "", - "tip_mobile": "", - "scan_qr": "" + "tip_mobile": "" } }, "enable": { @@ -412,8 +405,7 @@ "hint": "", "private_key": { "title": "", - "subtitle": "", - "warning": "" + "subtitle": "" } } }, diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 6d393304df..8ba03c586d 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -288,16 +288,9 @@ "actions": { "add_account": "Adicionar conta" }, - "edit": { - "name": { - "label": "Nome" - } - }, "export": { "title": "Exportar Conta", - "waiting": "aguardando dados LndHub...", - "tip_mobile": "Dica: Use esta carteira no seu dispositivo móvel", - "scan_qr": "Leia o Código QR para importar esta carteira na Zeus ou BlueWallet." + "tip_mobile": "Dica: Use esta carteira no seu dispositivo móvel" } }, "enable": { @@ -414,8 +407,7 @@ "title": "Nostr", "private_key": { "subtitle": "Cole ou gere uma nova chave privada. Ao gerar uma chave, ela será criada a partir da conta atual que você usa. Certifique-se de fazer backup desta chave privada. <0>Saiba mais »", - "title": "Chave privada", - "success": "A chave privada foi encriptada e salva com sucesso." + "title": "Chave privada" }, "hint": "é um protocolo simples e aberto que visa criar redes sociais resistentes à censura. Os perfis na rede Nostr são chaves criptográficas. Para publicar algo, você assina com sua chave e a informação é enviada para servidores. Na Alby você pode usar e gerenciar seu perfil em diferentes aplicações que suportam esse recurso." } diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index d200503263..6291b354d6 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -252,16 +252,9 @@ "actions": { "add_account": "Lägg till konto" }, - "edit": { - "name": { - "label": "Namn" - } - }, "export": { "title": "Exportera Konto", - "waiting": "väntar på LndHub- data...", - "tip_mobile": "Tips: Använd denna plånbok på din mobila enhet", - "scan_qr": "Importera denna plånbok till Zeus eller BlueWallet genom att skanna QR-kod." + "tip_mobile": "Tips: Använd denna plånbok på din mobila enhet" } }, "enable": { @@ -378,8 +371,7 @@ "hint": "är ett enkelt och öppet protokoll som syftar till att skapa sociala nätverk som är motståndskraftiga mot censur. Nostr använder kryptografiska nycklar. För att publicera något signerar du med dina nycklar som skickas till multipla reläer. Du kan använda Alby för att hantera din Nostr-nyckel. Flertalet Nostr-applikationer tillåter dig att använda nyckeln med hjälp av Alby-tillägget.", "private_key": { "title": "Privat nyckel", - "subtitle": "Generering av nyckel skapar en ny nyckel baserat på det konto du använder för tillfället. Se till att säkerhetskopiera den privata nyckeln.", - "warning": "Detta raderar din gamla privata nyckel. Är du säker?" + "subtitle": "Generering av nyckel skapar en ny nyckel baserat på det konto du använder för tillfället. Se till att säkerhetskopiera den privata nyckeln." } } }, diff --git a/src/i18n/locales/tl/translation.json b/src/i18n/locales/tl/translation.json index 9b1b9f65cd..f5ef16e7b9 100644 --- a/src/i18n/locales/tl/translation.json +++ b/src/i18n/locales/tl/translation.json @@ -252,16 +252,9 @@ "actions": { "add_account": "" }, - "edit": { - "name": { - "label": "" - } - }, "export": { "title": "", - "waiting": "", - "tip_mobile": "", - "scan_qr": "" + "tip_mobile": "" } }, "enable": { diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index cd28aa7c80..7e349b1254 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -281,16 +281,9 @@ } }, "accounts": { - "edit": { - "name": { - "label": "名称" - } - }, "export": { "waiting": "正在等待 LndHub 数据...", - "your_ln_address": "你的闪电地址:", - "export_uri": "LNDHub凭证URI", - "screen_reader": "导出帐户详情" + "export_uri": "LNDHub凭证URI" }, "title": "账户", "actions": { @@ -324,7 +317,6 @@ "nostr": { "private_key": { "title": "私钥", - "warning": "这将删除你的旧私钥。是否确定?", "subtitle": "生成密钥将根据你当前使用的帐户创建一个新密钥。请确保备份此私钥。" }, "title": "Nostr", From 1561ec1dae314c7a208ad9f39bdc3f369bde3307 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 2 Feb 2023 09:46:02 +0100 Subject: [PATCH 123/123] Update translation files Updated by "Cleanup translation files" hook in Weblate. Translation: getAlby - lightning-browser-extension/getAlby - lightning-browser-extension Translate-URL: https://hosted.weblate.org/projects/getalby-lightning-browser-extension/getalby-lightning-browser-extension/ --- src/i18n/locales/cs/translation.json | 1 - src/i18n/locales/de/translation.json | 3 --- src/i18n/locales/eo/translation.json | 1 - src/i18n/locales/es/translation.json | 1 - src/i18n/locales/fi/translation.json | 1 - src/i18n/locales/it/translation.json | 1 - src/i18n/locales/nl/translation.json | 1 - src/i18n/locales/pt_BR/translation.json | 1 - src/i18n/locales/sv/translation.json | 1 - src/i18n/locales/tl/translation.json | 1 - src/i18n/locales/zh_Hans/translation.json | 1 - 11 files changed, 13 deletions(-) diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index 88d51370da..96f0d14b1e 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -285,7 +285,6 @@ "add_account": "" }, "export": { - "title": "", "tip_mobile": "" } }, diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index 2582318b52..0747a88fdf 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -423,9 +423,6 @@ }, "accounts": { "title": "Konten", - "export": { - "scan_qr": "Importiere diese Brieftasche in Zeus oder BlueWallet, indem du den QRCode scannst." - }, "edit": { "name": { "label": "Name" diff --git a/src/i18n/locales/eo/translation.json b/src/i18n/locales/eo/translation.json index d7840b6ef0..d0b88fe1d4 100644 --- a/src/i18n/locales/eo/translation.json +++ b/src/i18n/locales/eo/translation.json @@ -285,7 +285,6 @@ "add_account": "" }, "export": { - "title": "", "tip_mobile": "" } }, diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index 03c900a625..2bb3ddf4cf 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -194,7 +194,6 @@ "add_account": "Añadir Cuenta" }, "export": { - "title": "Cuenta de exportación", "tip_mobile": "Consejo: Use esta billetera con su dispositivo móvil" } }, diff --git a/src/i18n/locales/fi/translation.json b/src/i18n/locales/fi/translation.json index 79aae17b3f..fa542f2476 100644 --- a/src/i18n/locales/fi/translation.json +++ b/src/i18n/locales/fi/translation.json @@ -285,7 +285,6 @@ "add_account": "Lisää tili" }, "export": { - "title": "Vie tili", "tip_mobile": "Vinkki: Käytä tätä lompakkoa mobiililaitteesi kanssa" } }, diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index d00a683a3b..c9745d086f 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -253,7 +253,6 @@ "add_account": "Aggiungi account" }, "export": { - "title": "Esporta Account", "tip_mobile": "Suggerimento: Utilizza questo portafoglio con il tuo dispositivo mobile" } }, diff --git a/src/i18n/locales/nl/translation.json b/src/i18n/locales/nl/translation.json index e28fd9427e..827653e19f 100644 --- a/src/i18n/locales/nl/translation.json +++ b/src/i18n/locales/nl/translation.json @@ -286,7 +286,6 @@ "add_account": "" }, "export": { - "title": "", "tip_mobile": "" } }, diff --git a/src/i18n/locales/pt_BR/translation.json b/src/i18n/locales/pt_BR/translation.json index 8ba03c586d..a3fec13975 100644 --- a/src/i18n/locales/pt_BR/translation.json +++ b/src/i18n/locales/pt_BR/translation.json @@ -289,7 +289,6 @@ "add_account": "Adicionar conta" }, "export": { - "title": "Exportar Conta", "tip_mobile": "Dica: Use esta carteira no seu dispositivo móvel" } }, diff --git a/src/i18n/locales/sv/translation.json b/src/i18n/locales/sv/translation.json index 6291b354d6..e06bf5680c 100644 --- a/src/i18n/locales/sv/translation.json +++ b/src/i18n/locales/sv/translation.json @@ -253,7 +253,6 @@ "add_account": "Lägg till konto" }, "export": { - "title": "Exportera Konto", "tip_mobile": "Tips: Använd denna plånbok på din mobila enhet" } }, diff --git a/src/i18n/locales/tl/translation.json b/src/i18n/locales/tl/translation.json index f5ef16e7b9..95ab9a8360 100644 --- a/src/i18n/locales/tl/translation.json +++ b/src/i18n/locales/tl/translation.json @@ -253,7 +253,6 @@ "add_account": "" }, "export": { - "title": "", "tip_mobile": "" } }, diff --git a/src/i18n/locales/zh_Hans/translation.json b/src/i18n/locales/zh_Hans/translation.json index 7e349b1254..83218cc5c5 100644 --- a/src/i18n/locales/zh_Hans/translation.json +++ b/src/i18n/locales/zh_Hans/translation.json @@ -282,7 +282,6 @@ }, "accounts": { "export": { - "waiting": "正在等待 LndHub 数据...", "export_uri": "LNDHub凭证URI" }, "title": "账户",