From 52db2f52df546459c87a0299c40439f727267030 Mon Sep 17 00:00:00 2001 From: shawnbusuttil Date: Wed, 28 Feb 2024 11:48:44 +0000 Subject: [PATCH] refactor: stabilize branch --- .../wallet-setup/components/WalletSetup.tsx | 8 ++++++- .../components/WalletSetupWizard.tsx | 5 +++-- .../components/__tests__/WalletSetup.test.tsx | 4 ++-- .../WalletSetupRevamp/wallet-steps-revamp.ts | 22 ------------------- 4 files changed, 12 insertions(+), 27 deletions(-) delete mode 100644 packages/core/src/ui/components/WalletSetupRevamp/wallet-steps-revamp.ts diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetup.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetup.tsx index 76210ab73..7abab18e2 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetup.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetup.tsx @@ -1,4 +1,10 @@ -import { WalletSetupStepsRevamp as WalletSetupSteps, WalletSetupFlowProvider, WalletSetupFlow } from '@lace/core'; +import { + WalletSetupSteps, + WalletSetupFlowProvider, + WalletSetupFlow, + useTranslate, + WalletSetupOptionsStep +} from '@lace/core'; import { useAnalyticsContext } from '@providers/AnalyticsProvider'; import { PostHogAction, diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetupWizard.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetupWizard.tsx index dba62c0c2..a66fe7bf0 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetupWizard.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/WalletSetupWizard.tsx @@ -9,7 +9,8 @@ import { WalletSetupFinalStep, WalletSetupNamePasswordStep, WalletSetupRecoveryPhraseLengthStep, - WalletSetupStepsRevamp as WalletSetupSteps, + WalletSetupSteps, + walletSetupWizard } from '@lace/core'; import { Wallet } from '@lace/cardano'; import { WalletSetupLayout } from '@src/views/browser-view/components/Layout'; @@ -377,4 +378,4 @@ export const WalletSetupWizard = ({ )} ); -}; \ No newline at end of file +}; diff --git a/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/__tests__/WalletSetup.test.tsx b/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/__tests__/WalletSetup.test.tsx index bdefe5bd9..9f3bc37f5 100644 --- a/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/__tests__/WalletSetup.test.tsx +++ b/apps/browser-extension-wallet/src/views/browser-view/features/wallet-setup/components/__tests__/WalletSetup.test.tsx @@ -10,7 +10,7 @@ import { ThemeProvider } from '@providers/ThemeProvider'; import { MemoryRouter } from 'react-router-dom'; import { WalletSetup } from '../WalletSetup'; import { I18nextProvider } from 'react-i18next'; -import { WalletSetupStepsRevamp as WalletSetupSteps } from '@lace/core'; +import { WalletSetupSteps } from '@lace/core'; import { render, fireEvent, waitFor } from '@testing-library/react'; jest.mock('@stores', () => ({ @@ -54,7 +54,7 @@ const SetupContainerTest = () => ( - + diff --git a/packages/core/src/ui/components/WalletSetupRevamp/wallet-steps-revamp.ts b/packages/core/src/ui/components/WalletSetupRevamp/wallet-steps-revamp.ts deleted file mode 100644 index e2d8e0be6..000000000 --- a/packages/core/src/ui/components/WalletSetupRevamp/wallet-steps-revamp.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { WalletSetupStepsRevamp, WalletSetupWizardRevamp } from './wallet-steps-revamp.common'; - -export const walletSetupWizardRevamp: WalletSetupWizardRevamp = { - [WalletSetupStepsRevamp.Register]: { - next: WalletSetupStepsRevamp.RecoveryPhraseLength - }, - [WalletSetupStepsRevamp.RecoveryPhraseLength]: { - prev: WalletSetupStepsRevamp.Register, - next: WalletSetupStepsRevamp.Mnemonic - }, - [WalletSetupStepsRevamp.Mnemonic]: { - prev: WalletSetupStepsRevamp.RecoveryPhraseLength, - next: WalletSetupStepsRevamp.Create - }, - [WalletSetupStepsRevamp.Create]: { - prev: WalletSetupStepsRevamp.Mnemonic, - next: WalletSetupStepsRevamp.Finish - }, - [WalletSetupStepsRevamp.Finish]: { - prev: WalletSetupStepsRevamp.Create - } -};