Skip to content

Commit

Permalink
feat: [lw-9745]: revamp mnemonic verification
Browse files Browse the repository at this point in the history
  • Loading branch information
greatertomi committed Mar 4, 2024
1 parent 96a01ff commit 13c100c
Show file tree
Hide file tree
Showing 30 changed files with 843 additions and 159 deletions.
1 change: 0 additions & 1 deletion apps/browser-extension-wallet/.env.defaults
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ USE_PASSWORD_VERIFICATION=false
USE_DAPP_CONNECTOR=true
USE_TREZOR_HW=false
USE_TOKEN_PRICING=true
USE_DIFFERENT_MNEMONIC_LENGTHS=true
USE_NFT_FOLDERS=true
USE_MULTI_CURRENCY=true
USE_HIDE_MY_BALANCE=true
Expand Down
1 change: 0 additions & 1 deletion apps/browser-extension-wallet/.env.developerpreview
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ USE_PASSWORD_VERIFICATION=false
USE_DAPP_CONNECTOR=true
USE_TREZOR_HW=false
USE_TOKEN_PRICING=true
USE_DIFFERENT_MNEMONIC_LENGTHS=true
USE_NFT_FOLDERS=true
USE_MULTI_CURRENCY=true
USE_HIDE_MY_BALANCE=true
Expand Down
2 changes: 0 additions & 2 deletions apps/browser-extension-wallet/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ USE_PASSWORD_VERIFICATION=false
USE_DAPP_CONNECTOR=true
USE_TREZOR_HW=false
USE_TOKEN_PRICING=true
USE_DIFFERENT_MNEMONIC_LENGTHS=true
USE_NFT_FOLDERS=true
USE_MULTI_CURRENCY=true
USE_HIDE_MY_BALANCE=true
Expand All @@ -25,7 +24,6 @@ USE_HANDLE_AB=false
USE_DATA_CHECK=false
USE_POSTHOG_ANALYTICS=true
USE_POSTHOG_ANALYTICS_FOR_OPTED_OUT=false
USE_MATOMO_ANALYTICS_FOR_OPTED_OUT=false
USE_MULTI_DELEGATION_STAKING_ACTIVITY=true
USE_MULTI_DELEGATION_STAKING_GRID_VIEW=false
USE_ROS_STAKING_COLUMN=false
Expand Down
22 changes: 19 additions & 3 deletions apps/browser-extension-wallet/src/lib/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1273,14 +1273,30 @@
"passphraseInfo3": "Find out more.",
"passphraseError": "Make sure the words of your recovery phrase are in the right order and spelled correctly."
},
"walletSetupMnemonicIntroStep": {
"walletSetupMnemonicStepRevamp": {
"writePassphraseTitle": "Save your recovery phrase",
"enterPassphrase": "Enter your recovery passphrase",
"enterPassphraseLength": "Choose recovery phrase length",
"enterPassphraseDescription": "Let's check you've got the correct recovery phrase. Type each word in the right order or paste from clipboard to verify it.",
"writePassphraseSubtitle1": "Consider your recovery phrase as the master key to your wallet.",
"writePassphraseSubtitle2": "Watch video.",
"passphraseError": "Make sure the words of your recovery phrase are in the right order and spelled correctly.",
"enterWallet": "Enter wallet",
"copyToClipboard": "Copy to clipboard",
"pasteFromClipboard": "Paste from clipboard"
},
"mnemonicVideoPopupContent": {
"title": "Keeping your wallet secure",
"description": "Consider your recovery phrase as the master key to your wallet, and the only way to access your funds.",
"link": "Read More."
"description": "Learn about what is a recovery phrase, and how to keep it safe from the video below.",
"link": "Read More.",
"closeButton": "Got it"
},
"walletSetupMnemonicVerificationStep": {
"enterPassphrase": "Enter your secret passphrase"
},
"walletSetupMnemonicVerificationStepRevamp": {
"enterPassphrase": "Enter your recovery phrase"
},
"walletSetupOptionsStep": {
"title": "Let's explore Web3 together",
"subTitle": "Choose an option to get started",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const SettingsSecurity = ({
const [settings] = useAppSettingsContext();
const { mnemonicVerificationFrequency } = settings;
const frequency = PHRASE_FREQUENCY_OPTIONS.find(({ value }) => value === mnemonicVerificationFrequency)?.label;
const [analyticsAccepted, { updateLocalStorage: setEnhancedAnalyticsOptInStatus }] = useLocalStorage(
const [analyticsStatus, { updateLocalStorage: setEnhancedAnalyticsOptInStatus }] = useLocalStorage(
ENHANCED_ANALYTICS_OPT_IN_STATUS_LS_KEY,
EnhancedAnalyticsOptInStatus.OptedOut
);
Expand Down Expand Up @@ -116,7 +116,7 @@ export const SettingsSecurity = ({
addon={
<Switch
testId="settings-analytics-switch"
checked={analyticsAccepted === EnhancedAnalyticsOptInStatus.OptedIn}
checked={analyticsStatus === EnhancedAnalyticsOptInStatus.OptedIn}
onChange={handleAnalyticsChoice}
className={styles.analyticsSwitch}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
:global {
.ant-input-password > input[type='password'],
.ant-input-password > input[type='text'] {
width: 380px;
transition: none !important;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
WalletSetupSteps,
WalletSetupFlowProvider,
WalletSetupFlow,
useTranslate,
WalletSetupOptionsStep
} from '@lace/core';
import { WalletSetupSteps, WalletSetupFlowProvider, WalletSetupFlow } from '@lace/core';
import { useAnalyticsContext } from '@providers/AnalyticsProvider';
import { walletRoutePaths } from '@routes/wallet-paths';
import { ILocalStorage } from '@src/types';
Expand Down
Loading

0 comments on commit 13c100c

Please sign in to comment.