1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00

Track whether seed phrase has been backed up (#9830)

The `seedPhraseBackedUp` now tracks whether or not the seed phrase has
been backed up. Previously this defaulted to `true`, which left no way
to distinguish whether it had been backed up or not during onboarding.

The default is now `null`, and the UI logic has been updated to account
for this, so that "existing users" (i.e. users that have a backup that
is years old) aren't mistakenly considered to have not backed up their
seed phrase. This value is already set explicitly to `true` or `false`
during onboarding, in both the create and import flow.

This change was made primarily to make it easier to fix the onboarding
library integration, which will be done in a subsequent PR.
This commit is contained in:
Mark Stacey 2020-11-10 12:34:20 -03:30 committed by GitHub
parent 980b140891
commit a6cc2d3d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -27,7 +27,7 @@ export default class OnboardingController {
onboardingTabs: {},
}
const initState = {
seedPhraseBackedUp: true,
seedPhraseBackedUp: null,
...opts.initState,
...initialTransientState,
}

View File

@ -64,7 +64,7 @@ const mapStateToProps = (state) => {
swapsEnabled,
unconfirmedTransactionsCount: unconfirmedTransactionsCountSelector(state),
shouldShowSeedPhraseReminder:
!seedPhraseBackedUp &&
seedPhraseBackedUp === false &&
(parseInt(accountBalance, 16) > 0 || tokens.length > 0),
isPopup,
isNotification,