Skip to content

Commit

Permalink
chore: review text changes (#740)
Browse files Browse the repository at this point in the history
  • Loading branch information
eswarasai authored May 18, 2023
1 parent 6ebd758 commit a58a807
Show file tree
Hide file tree
Showing 27 changed files with 113 additions and 79 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-carpets-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'fuels-wallet': minor
---

Updated the texts on the screens
4 changes: 2 additions & 2 deletions packages/app/playwright/crx/crx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ test.describe('FuelWallet Extension', () => {
await getButtonByText(page, /Next/i).click();

/** Confirm Mnemonic */
await hasText(page, /Enter your Recovery Phrase/i);
await hasText(page, /Enter seed phrase/i);
await getButtonByText(page, /Paste/i).click();
await getButtonByText(page, /Next/i).click();

/** Adding password */
await hasText(page, /Encrypt your wallet/i);
await hasText(page, /Create password for encryption/i);
const passwordInput = await getByAriaLabel(page, 'Your Password');
await passwordInput.type(WALLET_PASSWORD);
await passwordInput.press('Tab');
Expand Down
6 changes: 3 additions & 3 deletions packages/app/playwright/e2e/CreateWallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ test.describe('CreateWallet', () => {
await getButtonByText(page, /I accept/i).click();

/** Copy Mnemonic */
await hasText(page, /Backup your Recovery Phrase/i);
await hasText(page, /Backup seed phrase/i);
await getButtonByText(page, /Copy/i).click();
const savedCheckbox = await getByAriaLabel(page, 'Confirm Saved');
await savedCheckbox.click();
await getButtonByText(page, /Next/i).click();

/** Confirm Mnemonic */
await hasText(page, /Enter your Recovery Phrase/i);
await hasText(page, /Enter seed phrase/i);
await getButtonByText(page, /Paste/i).click();
await getButtonByText(page, /Next/i).click();
// await page.pause();

/** Adding password */
await hasText(page, /Encrypt your wallet/i);
await hasText(page, /Create password for encryption/i);
const passwordInput = await getByAriaLabel(page, 'Your Password');
await passwordInput.type(WALLET_PASSWORD);
await passwordInput.press('Tab');
Expand Down
10 changes: 5 additions & 5 deletions packages/app/playwright/e2e/RecoverWallet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ test.describe('RecoverWallet', () => {
await getButtonByText(page, /Paste/i).click();

/** Confirm Mnemonic */
await hasText(page, /Enter your Recovery Phrase/i);
await hasText(page, /Enter seed phrase/i);
await getButtonByText(page, /Paste/i).click();
await getButtonByText(page, /Next/i).click();

/** Adding password */
await hasText(page, /Encrypt your wallet/i);
await hasText(page, /Create password for encryption/i);
const passwordInput = await getByAriaLabel(page, 'Your Password');
await passwordInput.type(WALLET_PASSWORD);
await passwordInput.press('Tab');
Expand All @@ -65,7 +65,7 @@ test.describe('RecoverWallet', () => {
await getButtonByText(page, /I accept/i).click();

await getByAriaLabel(page, 'Select format').selectOption(
'I have a 24 words seed phrase'
'I have a 24 words Seed Phrase'
);

/** Copy words to clipboard area */
Expand All @@ -75,12 +75,12 @@ test.describe('RecoverWallet', () => {
await getButtonByText(page, /Paste/i).click();

/** Confirm Mnemonic */
await hasText(page, /Enter your Recovery Phrase/i);
await hasText(page, /Enter seed phrase/i);
await getButtonByText(page, /Paste/i).click();
await getButtonByText(page, /Next/i).click();

/** Adding password */
await hasText(page, /Encrypt your wallet/i);
await hasText(page, /Create password for encryption/i);
const passwordInput = await getByAriaLabel(page, 'Your Password');
await passwordInput.type(WALLET_PASSWORD);
await passwordInput.press('Tab');
Expand Down
1 change: 1 addition & 0 deletions packages/app/playwright/e2e/UnlockScreen.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ test.describe('UnlockScreen', () => {

await page.getByText('Forgot password?').click();
await hasText(page, /Reset wallet/i);
await getByAriaLabel(page, 'Confirm Reset').click();
await getByAriaLabel(page, 'Reset wallet').click();
await hasText(page, /Create a new Fuel Wallet/i);
});
Expand Down
8 changes: 4 additions & 4 deletions packages/app/playwright/e2e/ViewRecoveryPhrase.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import test, { expect, chromium } from '@playwright/test';
import { getButtonByText, getByAriaLabel, hasText } from '../commons';
import { mockData, WALLET_PASSWORD } from '../mocks';

test.describe('ViewRecoveryPhrase', () => {
test.describe('ViewSeedPhrase', () => {
let browser: Browser;
let page: Page;
let mnemonic: string;
Expand All @@ -16,10 +16,10 @@ test.describe('ViewRecoveryPhrase', () => {
mnemonic = mock.mnemonic;
});

test('should view recovery phrase', async () => {
test('should view seed phrase', async () => {
test.step('should show unlock screen', async () => {
await getByAriaLabel(page, 'Menu').click();
await page.getByText(/View Recovery Phrase/i).click();
await page.getByText(/View Seed Phrase/i).click();

// Should show unlock screen
await hasText(page, /Confirm your Password/i);
Expand All @@ -29,7 +29,7 @@ test.describe('ViewRecoveryPhrase', () => {

test.step('should show the seed phrase', async () => {
// Should show unlock screen
await hasText(page, /Recovery Phrase/i);
await hasText(page, /Seed Phrase/i);
await getButtonByText(page, 'Copy button').click();
const clipboardValue = await navigator.clipboard.readText();
expect(clipboardValue).toEqual(mnemonic);
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/systems/Account/pages/Logout/Logout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export const Logout = () => {
seedphrase and accounts.
</Text>
<Text color="gray11" css={{ mb: '$2' }}>
Make sure you have securely backed up your seed phrase before
Make sure you have securely backed up your Seed Phrase before
removing the wallet.
</Text>
<Text color="gray11" css={{ mb: '$2' }}>
If you have not backed up your seed phrase, you will lose access to
If you have not backed up your Seed Phrase, you will lose access to
your funds.
</Text>
<Text color="gray11" css={{ mb: '$2' }}></Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function Mnemonic({
key={size}
value={size}
aria-label={`${size} words`}
>{`I have a ${size} words seed phrase`}</option>
>{`I have a ${size} words Seed Phrase`}</option>
))}
</select>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ExportAccount } from '~/systems/Account/pages/ExportAccount';
import { ImportAccount } from '~/systems/Account/pages/ImportAccount';
import { AddNetwork, Networks, UpdateNetwork } from '~/systems/Network/pages';
import { useOverlay } from '~/systems/Overlay';
import { ViewRecoveryPhrase } from '~/systems/Settings/pages';
import { ViewSeedPhrase } from '~/systems/Settings/pages';
import { TxApprove } from '~/systems/Transaction';

export function OverlayDialog() {
Expand All @@ -33,7 +33,7 @@ export function OverlayDialog() {
{overlay.is('transactions.approve') && <TxApprove />}

{/* Settings */}
{overlay.is('settings.viewRecoveryPhrase') && <ViewRecoveryPhrase />}
{overlay.is('settings.viewSeedPhrase') && <ViewSeedPhrase />}
</Dialog.Content>
</Dialog>
);
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/systems/Overlay/events.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ export function overlayEvents(store: Store) {
input: { modal: 'transactions.approve' },
});
},
openViewRecoveryPhrase() {
openViewSeedPhrase() {
store.send(Services.overlay, {
type: 'OPEN',
input: {
modal: 'settings.viewRecoveryPhrase',
modal: 'settings.viewSeedPhrase',
},
});
},
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/systems/Overlay/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ export enum Overlays {
'networks.add' = 'networks.add',
'networks.update' = 'networks.update',
'transactions.approve' = 'transactions.approve',
'settings.viewRecoveryPhrase' = 'settings.viewRecoveryPhrase',
'settings.viewSeedPhrase' = 'settings.viewSeedPhrase',
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export function ChangePassword() {
</Focus.Scope>
<Alert direction="row" status={'warning'} css={{ mt: '$2' }}>
<Alert.Description>
If you lose your password and your seed phrase, all your funds
If you lose your password and your Seed Phrase, all your funds
can be lost forever.
</Alert.Description>
</Alert>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { BoxCentered, Button, Stack, Text } from '@fuel-ui/react';
import type { ComponentStoryFn, Meta } from '@storybook/react';

import { ViewRecoveryPhrase } from './ViewRecoveryPhrase';
import { ViewSeedPhrase } from './ViewSeedPhrase';

import { store } from '~/store';
import { useAccounts } from '~/systems/Account';
import { Layout } from '~/systems/Core';
import { mockVault } from '~/systems/Core/__tests__/utils/mockVault';

export default {
component: ViewRecoveryPhrase,
title: 'Settings/Pages/2. View Recovery Phrase',
component: ViewSeedPhrase,
title: 'Settings/Pages/2. View Seed Phrase',
decorators: [(Story) => <Story />],
parameters: {
layout: 'fullscreen',
Expand All @@ -20,7 +20,7 @@ export default {
},
} as Meta;

const Template: ComponentStoryFn<typeof ViewRecoveryPhrase> = () => {
const Template: ComponentStoryFn<typeof ViewSeedPhrase> = () => {
const { account, isLoading } = useAccounts();
return (
<Layout isLoading={isLoading}>
Expand All @@ -29,7 +29,7 @@ const Template: ComponentStoryFn<typeof ViewRecoveryPhrase> = () => {
<Text>Password: 123123123</Text>
{account && (
<Button
onPress={() => store.openViewRecoveryPhrase()}
onPress={() => store.openViewSeedPhrase()}
isLoading={isLoading}
>
Toggle Modal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Mnemonic } from '~/systems/Core';
import { useOverlay } from '~/systems/Overlay';
import { UnlockCard } from '~/systems/Unlock';

export function ViewRecoveryPhrase() {
export function ViewSeedPhrase() {
const { close } = useOverlay();
const { handlers, error, isUnlockOpened, isLoading, words } =
useExportVault();
Expand All @@ -28,7 +28,7 @@ export function ViewRecoveryPhrase() {

return (
<>
<Dialog.Heading>Recovery Phrase</Dialog.Heading>
<Dialog.Heading>Seed Phrase</Dialog.Heading>
<Dialog.Description as="div">
<Flex gap="$4" direction="column" align="center">
<Box css={styles.mnemonicWrapper}>
Expand All @@ -37,7 +37,7 @@ export function ViewRecoveryPhrase() {
<Alert status="warning" css={styles.alert}>
<Alert.Description>
<Text fontSize="xs" css={styles.alertDescription}>
DON&APOS;T SHARE your Recovery Phrase. {'\n'}
DON&apos;T SHARE your Seed Phrase. {'\n'}
This phrase provides access to all your accounts. Sharing or
losing it may result in a permanent loss of funds.
</Text>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './ViewSeedPhrase';
2 changes: 1 addition & 1 deletion packages/app/src/systems/Settings/pages/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { ViewRecoveryPhrase } from './ViewRecoveryPhrase';
export { ViewSeedPhrase } from './ViewSeedPhrase';
export { ChangePassword } from './ChangePassword';
export { Connections } from './Connections';
6 changes: 3 additions & 3 deletions packages/app/src/systems/Sidebar/constants/sidebarItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ export const sidebarItems = (currentNetworkUrl: string): Array<MenuItemObj> => [
path: Pages.assets(),
},
{
key: 'view-recovery-phrase',
key: 'view-seed-phrase',
icon: 'Lock',
label: 'View Recovery Phrase',
label: 'View Seed Phrase',
onPress() {
store.openViewRecoveryPhrase();
store.openViewSeedPhrase();
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export function CreatePassword({
height={116}
/>
<Header
title="Encrypt your wallet"
subtitle="Add a safe password to encrypt your wallet"
title="Create password for encryption"
subtitle="This password will be used to unlock your wallet."
/>
<Stack css={{ width: '100%' }} gap="$4">
<ControlledField
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function MnemonicRead({ words, onCancel, onNext }: MnemonicReadProps) {
alt="Showing your Mnemonic"
/>
<Header
title="Backup your Recovery Phrase"
title="Backup Seed Phrase"
subtitle="You will need it on the next step"
/>
<Stack css={styles.content} gap="$4">
Expand All @@ -40,7 +40,7 @@ export function MnemonicRead({ words, onCancel, onNext }: MnemonicReadProps) {
}}
/>
<Form.Label htmlFor="confirmSaved">
I have backed up my recovery phrase in a secure place.
I have backed up my Seed Phrase securely.
</Form.Label>
</Form.Control>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export function MnemonicWrite({
width={129}
height={116}
/>
<Header title="Enter your Recovery Phrase" />
<Header title="Enter seed phrase" />
<Stack gap="$3" css={{ width: 400 }}>
{error && (
<Alert css={{ fontSize: '$sm', py: '$2' }} status="error">
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/systems/SignUp/machines/signUpMachine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ export const signUpMachine = createMachine(
invalidMnemonic: {
entry: [
assignErrorMessage(
'The seed phrase is not valid check the words for typos or missing words'
'The Seed Phrase is not valid. Check the words for typos or missing words'
),
],
},
mnemonicNotMatch: {
entry: [
assignErrorMessage(
"The seed phrase doesn't match. Check the phrase for typos or missing words"
"The Seed Phrase doesn't match. Check the phrase for typos or missing words"
),
],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export function RecoverWallet() {
<Layout title="Recovering Wallet" isPublic>
<Alert status="warning" css={styles.alert}>
<Alert.Description>
This wallet is current on development, and your phrase is not safely
stored, DO NOT IMPORT YOUR CURRENT SEED PHRASE.
This wallet is in development, and your phrase is not safely stored.
DO NOT IMPORT YOUR CURRENT SEED PHRASE.
</Alert.Description>
</Alert>
{state.matches('waitingMnemonic') && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ describe('ActivityList', () => {
wrapper: TestWrapper,
}
);
expect(
screen.getByText(/You don't have activities yet/i)
).toBeInTheDocument();
expect(screen.getByText(/No activity yet/i)).toBeInTheDocument();
});

it('should render the same amount of activity items as transactions', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ export function ActivityListEmpty({ isDevnet }: ActivityEmptyProps) {
height={208}
wrapperCSS={{ mb: '$5', mt: '$16' }}
/>
<Heading as="h5">You don&apos;t have activities yet</Heading>
<Heading as="h5">No activity yet</Heading>
<Text fontSize="sm" css={styles.text}>
Create transactions to see it here
When you make a transaction you&apos;ll see it here
</Text>
{isDevnet && (
/**
Expand Down
Loading

0 comments on commit a58a807

Please sign in to comment.