mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Display seed phrase reminder if user has tokens (#6952)
The seed phrase reminder will now be triggered if the user has eth *OR* if the user has added a token. This is to ensure that a user can't have a positive token balance without being reminded to backup the account. Checking for the token in preferences was easier than checking the actual token balance, because the token balance is not yet in Redux. That would require a more substantial refactor.
This commit is contained in:
parent
6a0dbcdb31
commit
2649b9b8bb
@ -23,6 +23,7 @@ const mapStateToProps = state => {
|
|||||||
privacyMode,
|
privacyMode,
|
||||||
} = {},
|
} = {},
|
||||||
seedPhraseBackedUp,
|
seedPhraseBackedUp,
|
||||||
|
tokens,
|
||||||
} = metamask
|
} = metamask
|
||||||
const accountBalance = getCurrentEthBalance(state)
|
const accountBalance = getCurrentEthBalance(state)
|
||||||
const { forgottenPassword } = appState
|
const { forgottenPassword } = appState
|
||||||
@ -39,7 +40,7 @@ const mapStateToProps = state => {
|
|||||||
showPrivacyModeNotification: migratedPrivacyMode,
|
showPrivacyModeNotification: migratedPrivacyMode,
|
||||||
activeTab,
|
activeTab,
|
||||||
viewingUnconnectedDapp: isUnconnected && isPopup,
|
viewingUnconnectedDapp: isUnconnected && isPopup,
|
||||||
shouldShowSeedPhraseReminder: parseInt(accountBalance, 16) > 0 && !seedPhraseBackedUp,
|
shouldShowSeedPhraseReminder: !seedPhraseBackedUp && (parseInt(accountBalance, 16) > 0 || tokens.length > 0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user