From 0e6d4b76d9c57a1d8187aa86f580e5fd9729fab5 Mon Sep 17 00:00:00 2001 From: Norton Andreev Date: Thu, 21 Nov 2024 19:20:15 +0200 Subject: [PATCH] web-wallet: Fix inconsistent terminology usage for "Mnemonic Phrase" Resolves #3035 --- web-wallet/CHANGELOG.md | 2 ++ .../ExistingWalletNotice.svelte | 4 ++-- .../lib/dusk/components/Mnemonic/Mnemonic.svelte | 6 +++--- .../dusk/components/__tests__/Mnemonic.spec.js | 16 ++++++++-------- .../setup/create/MnemonicPreSetup.svelte | 4 ++-- .../__tests__/__snapshots__/page.spec.js.snap | 10 +++++----- .../setup/create/__tests__/page.spec.js | 4 ++-- .../__tests__/__snapshots__/page.spec.js.snap | 6 +++--- .../setup/restore/__tests__/page.spec.js | 16 ++++++++++++---- .../routes/components-showcase/Checkboxes.svelte | 2 +- 10 files changed, 40 insertions(+), 30 deletions(-) diff --git a/web-wallet/CHANGELOG.md b/web-wallet/CHANGELOG.md index 5dd23931e7..bcced32da1 100644 --- a/web-wallet/CHANGELOG.md +++ b/web-wallet/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fix UI not scrolling to top after wizard and sub-route navigation [#2997] - Fix edge case in Dusk to Lux conversion [#3032] +- Fix inconsistent terminology usage for "Mnemonic Phrase" [#3035] ## [0.8.0] - 2024-11-19 @@ -367,6 +368,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#3010]: https://github.com/dusk-network/rusk/issues/3010 [#3028]: https://github.com/dusk-network/rusk/issues/3028 [#3032]: https://github.com/dusk-network/rusk/issues/3032 +[#3035]: https://github.com/dusk-network/rusk/issues/3035 diff --git a/web-wallet/src/lib/components/ExistingWalletNotice/ExistingWalletNotice.svelte b/web-wallet/src/lib/components/ExistingWalletNotice/ExistingWalletNotice.svelte index 8856305972..408d84ddbc 100644 --- a/web-wallet/src/lib/components/ExistingWalletNotice/ExistingWalletNotice.svelte +++ b/web-wallet/src/lib/components/ExistingWalletNotice/ExistingWalletNotice.svelte @@ -12,8 +12,8 @@

Initializing a new wallet will replace your existing local wallet cache, erasing any stored data. Ensure you have securely backed up your current - wallet's seed phrase to prevent loss. Proceeding without a backup can lead - to irreversible loss of access to your assets. + wallet's mnemonic phrase to prevent loss. Proceeding without a backup can + lead to irreversible loss of access to your assets.

{ + const pasteMnemonic = () => { navigator.clipboard .readText() .then((data) => { @@ -140,9 +140,9 @@ {#if type === "authenticate" && shouldShowPaste}
`; -exports[`Create > should render the \`Securely store your seed phrase!\` agreement step after the ToS 1`] = ` +exports[`Create > should render the \`Securely store your mnemonic phrase!\` agreement step after the ToS 1`] = `
@@ -2977,7 +2977,7 @@ exports[`Create > should render the \`Securely store your seed phrase!\` agreeme

- Securely store your seed phrase! + Securely store your mnemonic phrase!

@@ -3002,7 +3002,7 @@ exports[`Create > should render the \`Securely store your seed phrase!\` agreeme class="dusk-agreement__label" for="dusk-checkbox-16" > - I understand that without my seed phrase I cannot access my wallet and its assets. + I understand that without my mnemonic phrase I cannot access my wallet and its assets. @@ -3170,8 +3170,8 @@ exports[`Create > should render the Existing Wallet notice step of the Create fl

Initializing a new wallet will replace your existing local wallet cache, erasing any stored data. Ensure you have securely backed up your current - wallet's seed phrase to prevent loss. Proceeding without a backup can lead - to irreversible loss of access to your assets. + wallet's mnemonic phrase to prevent loss. Proceeding without a backup can + lead to irreversible loss of access to your assets.

{ expect(container.firstChild).toMatchSnapshot(); }); - it("should render the `Securely store your seed phrase!` agreement step after the ToS", async () => { + it("should render the `Securely store your mnemonic phrase!` agreement step after the ToS", async () => { const { container, getByRole } = render(Create); const mathRandomSpy = vi.spyOn(Math, "random").mockReturnValue(42); @@ -116,7 +116,7 @@ describe("Create", async () => { mathRandomSpy.mockRestore(); }); - it("should not allow the user proceed unless both agreement checks are selected on the `Securely store your seed phrase!` step", async () => { + it("should not allow the user proceed unless both agreement checks are selected on the `Securely store your mnemonic phrase!` step", async () => { const { getByRole, getAllByRole } = render(Create); await fireEvent.click(getByRole("button", { name: "Accept" })); diff --git a/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap b/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap index 671bf2b535..cc60846e1d 100644 --- a/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap +++ b/web-wallet/src/routes/(welcome)/setup/restore/__tests__/__snapshots__/page.spec.js.snap @@ -44,8 +44,8 @@ exports[`Restore > should render the Existing Wallet notice step of the Restore

Initializing a new wallet will replace your existing local wallet cache, erasing any stored data. Ensure you have securely backed up your current - wallet's seed phrase to prevent loss. Proceeding without a backup can lead - to irreversible loss of access to your assets. + wallet's mnemonic phrase to prevent loss. Proceeding without a backup can + lead to irreversible loss of access to your assets.

should render the Mnemonic Authenticate step after accepting - Paste seed phrase + Paste mnemonic phrase diff --git a/web-wallet/src/routes/(welcome)/setup/restore/__tests__/page.spec.js b/web-wallet/src/routes/(welcome)/setup/restore/__tests__/page.spec.js index 37004bf22e..9312f84c32 100644 --- a/web-wallet/src/routes/(welcome)/setup/restore/__tests__/page.spec.js +++ b/web-wallet/src/routes/(welcome)/setup/restore/__tests__/page.spec.js @@ -104,7 +104,9 @@ describe("Restore", async () => { expect(nextButton).toBeDisabled(); - await fireEvent.click(getByRole("button", { name: "Paste seed phrase" })); + await fireEvent.click( + getByRole("button", { name: "Paste mnemonic phrase" }) + ); await tick(); expect(nextButton).not.toBeDisabled(); @@ -123,7 +125,9 @@ describe("Restore", async () => { expect(get(toastList).length).toBe(0); - await fireEvent.click(getByRole("button", { name: "Paste seed phrase" })); + await fireEvent.click( + getByRole("button", { name: "Paste mnemonic phrase" }) + ); await tick(); expect(get(toastList).length).toBe(1); @@ -143,7 +147,9 @@ describe("Restore", async () => { expect(nextButton).toBeDisabled(); - await fireEvent.click(getByRole("button", { name: "Paste seed phrase" })); + await fireEvent.click( + getByRole("button", { name: "Paste mnemonic phrase" }) + ); await tick(); expect(nextButton).toBeEnabled(); await fireEvent.click(nextButton); @@ -186,7 +192,9 @@ describe("Restore", async () => { expect(nextButton).toBeDisabled(); - await fireEvent.click(getByRole("button", { name: "Paste seed phrase" })); + await fireEvent.click( + getByRole("button", { name: "Paste mnemonic phrase" }) + ); await tick(); expect(nextButton).toBeEnabled(); await fireEvent.click(nextButton); diff --git a/web-wallet/src/routes/components-showcase/Checkboxes.svelte b/web-wallet/src/routes/components-showcase/Checkboxes.svelte index 181b7f2a91..27fd7eab6e 100644 --- a/web-wallet/src/routes/components-showcase/Checkboxes.svelte +++ b/web-wallet/src/routes/components-showcase/Checkboxes.svelte @@ -15,7 +15,7 @@