Skip to content

Commit 1a0085c

Browse files
authored
feat: add faq to migration flow (#963)
* feat: update initial migration state from settings when selecting 'upgrade wallet' beta link from settings, begin the migration from it's initial state instead of in progress * feat: add FAQ link to every migration screen * fix: end all slide descriptions with punctuation * feat: remove previously dismissed migration on settings click
1 parent ad37144 commit 1a0085c

File tree

8 files changed

+36
-11
lines changed

8 files changed

+36
-11
lines changed

src/api/migration-tool/cross-extension-messaging/nami-migration-client.extension.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ export const dismissMigration = ({
3030
});
3131
};
3232

33-
export const disableMigration = () =>
34-
storage.local.set({
33+
export const disableMigration = async () => {
34+
const date = new Date();
35+
const timeInPast = date.setTime(date.getTime() - 1000);
36+
await storage.local.set({
37+
[DISMISS_MIGRATION_UNTIL]: timeInPast,
3538
[MIGRATION_KEY]: MigrationState.None,
3639
});
40+
};
3741

3842
export const handleLaceMigrationRequests = () =>
3943
runtime.onMessageExternal.addListener(

src/ui/app/pages/settings.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ import { Events } from '../../../features/analytics/events';
5252
import { LegalSettings } from '../../../features/settings/legal/LegalSettings';
5353
import { usePostHog } from 'posthog-js/react';
5454
import { useFeatureFlagsContext } from '../../../features/feature-flags/provider';
55-
import { enableMigration } from '../../../api/migration-tool/cross-extension-messaging/nami-migration-client.extension';
5655
import {
5756
MigrationState,
5857
MIGRATION_KEY,
5958
} from '../../../api/migration-tool/migrator/migration-state.data';
59+
import { disableMigration } from '../../../api/migration-tool/cross-extension-messaging/nami-migration-client.extension';
6060
import { storage } from 'webextension-polyfill';
6161

6262
const Settings = () => {
@@ -129,7 +129,7 @@ const Overview = () => {
129129
width="65%"
130130
rightIcon={<ChevronRightIcon />}
131131
onClick={async () => {
132-
await enableMigration();
132+
await disableMigration();
133133
}}
134134
>
135135
<Flex

src/ui/lace-migration/components/all-done/all-done.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const AllDone = ({ isLaceInstalled, onAction }) => {
1919
)}
2020
</Box>
2121
}
22-
description="Your Nami wallet is now part of the Lace family"
22+
description="Your Nami wallet is now part of the Lace family."
2323
buttonText={isLaceInstalled ? 'Open Lace' : 'Download Lace'}
2424
buttonIcon={Arrow}
2525
onButtonClick={onAction}

src/ui/lace-migration/components/almost-there/almost-there.component.jsx

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@ import { ReactComponent as Arrow } from '../../assets/arrow.svg';
66
import { ReactComponent as PendingDark } from '../../assets/pending-dark-mode.svg';
77
import { ReactComponent as PendingWhite } from '../../assets/pending-white-mode.svg';
88

9-
export const AlmostThere = ({ isLaceInstalled, onAction, isDismissable, dismissibleSeconds }) => {
9+
export const AlmostThere = ({
10+
isLaceInstalled,
11+
onAction,
12+
isDismissable,
13+
dismissibleSeconds,
14+
}) => {
1015
const { colorMode } = useColorMode();
1116
return (
1217
<Slide
1318
showTerms={false}
14-
title={isLaceInstalled ? "It's time to upgrade your wallet!" : "Let’s begin..."}
19+
title={
20+
isLaceInstalled ? "It's time to upgrade your wallet!" : 'Let’s begin...'
21+
}
1522
image={
1623
<Box mb={'60px'}>
1724
{colorMode === 'light' ? (
@@ -21,7 +28,11 @@ export const AlmostThere = ({ isLaceInstalled, onAction, isDismissable, dismissi
2128
)}
2229
</Box>
2330
}
24-
description={isLaceInstalled ? 'Your Nami wallet is now part of the Lace family' : 'Download the Lace extension to begin'}
31+
description={
32+
isLaceInstalled
33+
? 'Your Nami wallet is now part of the Lace family.'
34+
: 'Download the Lace extension to begin.'
35+
}
2536
buttonText={isLaceInstalled ? 'Open Lace' : 'Download Lace'}
2637
buttonIcon={isLaceInstalled ? Arrow : Download}
2738
onButtonClick={onAction}

src/ui/lace-migration/components/carousel/slides/Slide1.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const Slide1 = ({ onAction, isDismissable, dismissibleSeconds }) => {
1414
<BackpackImg width="91px" height="126px" />
1515
</Box>
1616
}
17-
description="The Nami Wallet is now integrated into Lace. Click 'Upgrade your wallet' to begin the process"
17+
description="The Nami Wallet is now integrated into Lace. Click 'Upgrade your wallet' to begin the process."
1818
buttonText="Upgrade your wallet"
1919
buttonIcon={Arrow}
2020
onButtonClick={onAction}

src/ui/lace-migration/components/carousel/slides/Slide2.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const Slide2 = ({ onAction, isDismissable, dismissibleSeconds }) => {
2020
)}
2121
</Box>
2222
}
23-
description="On the surface, Nami is the same. But now, with Lace's advanced technology supporting it"
23+
description="On the surface, Nami is the same. But now, with Lace's advanced technology supporting it."
2424
buttonText="Upgrade your wallet"
2525
buttonIcon={Arrow}
2626
onButtonClick={onAction}

src/ui/lace-migration/components/no-wallet/no-wallet.component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export const NoWallet = ({ onAction, isDismissable, dismissibleSeconds }) => (
1212
<BackpackImg width="91px" height="126px" />
1313
</Box>
1414
}
15-
description="To create or import a wallet, proceed using the Lace extension"
15+
description="To create or import a wallet, proceed using the Lace extension."
1616
buttonText="Get started with Lace"
1717
buttonIcon={LaceIcon}
1818
onButtonClick={onAction}

src/ui/lace-migration/components/slide.component.jsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,16 @@ export const Slide = ({
153153
<Box>{image}</Box>
154154
<Text fontSize="16px" fontWeight="400">
155155
{description}
156+
<Link
157+
target="_blank"
158+
href="https://www.lace.io/faq?question=what-is-happening-with-nami"
159+
title="FAQ"
160+
color="#3489F7"
161+
textDecoration="underline"
162+
style={{ marginLeft: 4 }}
163+
>
164+
FAQ
165+
</Link>
156166
</Text>
157167
</Flex>
158168
</Box>

0 commit comments

Comments
 (0)