From a65eebd9df30a45a305dfa5bd4366bf7961586a1 Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Thu, 4 Apr 2024 22:34:18 +0200 Subject: [PATCH 1/2] Fix translation file --- src/app/components/FatalErrorHandler/index.tsx | 2 +- src/locales/en/translation.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/components/FatalErrorHandler/index.tsx b/src/app/components/FatalErrorHandler/index.tsx index 148967ed78..2c240651a5 100644 --- a/src/app/components/FatalErrorHandler/index.tsx +++ b/src/app/components/FatalErrorHandler/index.tsx @@ -61,7 +61,7 @@ export function FatalErrorHandler({ children }: Props) { return ( - {t('appTitle')} + {t('appTitle', diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index e1675deb21..8545f5bb60 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -1,5 +1,4 @@ { - "appTitle": "Oasis Wallet", "account": { "addEscrow": { "confirmDelegatingToInactive": { @@ -94,6 +93,7 @@ "showingStale": "Showing validator list as of {{staleTimestamp}}." } }, + "appTitle": "Oasis Wallet", "backends": { "oasismonitor": "Oasis Monitor API", "oasisscan": "Oasis Scan API" @@ -169,7 +169,7 @@ "description": "The error that has occurred triggers the wallet to stop. Your funds are safe.

Please try refreshing the page and reopening your wallet to see if the issue persists. You can check the current status of the network below.", "heading": "An error occurred.", "instruction": "If the issue is not resolved after refreshing, please email our support team at and attached the error report.", - "reload": "Reload extension" + "reloadExtension": "Reload extension" }, "fiatOnramp": { "astarFootnote": "It is hereby noted that AStar Technologies, a Cayman Islands exempted company is acting on behalf and for the purposes of Oasis, and is also the provider of the Oasis Wallet.", From fe45c5452b27181c6a1d30e715b1f9270283e648 Mon Sep 17 00:00:00 2001 From: lukaw3d Date: Thu, 4 Apr 2024 22:33:42 +0200 Subject: [PATCH 2/2] Update profile deletion text --- .changelog/1869.internal.md | 1 + playwright/tests/persist.spec.ts | 8 ++----- playwright/tests/toolbar.spec.ts | 2 +- .../Persist/DeleteProfileButton.tsx | 22 ++++++++++++++++--- src/app/components/Persist/UnlockForm.tsx | 2 +- .../Toolbar/Features/Profile/index.tsx | 2 +- src/locales/en/translation.json | 4 +++- 7 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 .changelog/1869.internal.md diff --git a/.changelog/1869.internal.md b/.changelog/1869.internal.md new file mode 100644 index 0000000000..3823a3db6a --- /dev/null +++ b/.changelog/1869.internal.md @@ -0,0 +1 @@ +Show better description in Delete Profile dialog if user forgot their password diff --git a/playwright/tests/persist.spec.ts b/playwright/tests/persist.spec.ts index cf10af2bc1..6acc523486 100644 --- a/playwright/tests/persist.spec.ts +++ b/playwright/tests/persist.spec.ts @@ -225,12 +225,8 @@ test.describe('Persist', () => { }) async function testDeletingAndCreatingNew(page: Page) { - await page.getByRole('button', { name: 'Delete profile' }).click() - await page - .getByLabel( - "Are you sure you want to delete this profile? This action cannot be undone and will erase your private keys.To continue please enter 'delete' below.", - ) - .fill('delete') + await page.getByRole('button', { name: 'Forgot password?' }).click() + await page.getByLabel(/To confirm and proceed/).fill('delete') await page.getByRole('button', { name: 'Yes, delete' }).click() await page.getByRole('button', { name: /Open wallet/ }).click() diff --git a/playwright/tests/toolbar.spec.ts b/playwright/tests/toolbar.spec.ts index bdccc68df7..b986d6021c 100644 --- a/playwright/tests/toolbar.spec.ts +++ b/playwright/tests/toolbar.spec.ts @@ -24,7 +24,7 @@ test.describe('Profile tab', () => { await page.getByTestId('account-selector').click() await page.getByTestId('toolbar-profile-tab').click() await page.getByRole('button', { name: 'Delete profile' }).click() - await page.getByLabel(/Are you sure you want/).fill('delete') + await page.getByLabel(/To confirm and proceed/).fill('delete') await page.getByRole('button', { name: 'Yes, delete' }).click() await expect(page).not.toHaveURL(new RegExp(`/account/${privateKeyAddress}`)) }) diff --git a/src/app/components/Persist/DeleteProfileButton.tsx b/src/app/components/Persist/DeleteProfileButton.tsx index 965cbc5f27..0557ee8da7 100644 --- a/src/app/components/Persist/DeleteProfileButton.tsx +++ b/src/app/components/Persist/DeleteProfileButton.tsx @@ -12,9 +12,10 @@ import { Header } from 'app/components/Header' interface DeleteProfileButtonProps { prominent?: boolean + variant: 'voluntary' | 'forgot-password' } -export function DeleteProfileButton({ prominent }: DeleteProfileButtonProps) { +export function DeleteProfileButton({ prominent, variant }: DeleteProfileButtonProps) { const { t } = useTranslation() const dispatch = useDispatch() const navigate = useNavigate() @@ -33,7 +34,11 @@ export function DeleteProfileButton({ prominent }: DeleteProfileButtonProps) { <>