diff options
author | Mark Stacey <markjstacey@gmail.com> | 2019-08-03 02:43:15 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-03 02:43:15 +0800 |
commit | 2649b9b8bb5b675217e3ab9258d96797f3bcdfba (patch) | |
tree | 1866473dcc2fcd1f13acb7d19500adbd88cb75dd | |
parent | 6a0dbcdb31e4c49737578cce4034ab2fcf906e2e (diff) | |
download | tangerine-wallet-browser-2649b9b8bb5b675217e3ab9258d96797f3bcdfba.tar.gz tangerine-wallet-browser-2649b9b8bb5b675217e3ab9258d96797f3bcdfba.tar.zst tangerine-wallet-browser-2649b9b8bb5b675217e3ab9258d96797f3bcdfba.zip |
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.
-rw-r--r-- | ui/app/pages/home/home.container.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/app/pages/home/home.container.js b/ui/app/pages/home/home.container.js index 4195fbe79..2ef05679d 100644 --- a/ui/app/pages/home/home.container.js +++ b/ui/app/pages/home/home.container.js @@ -23,6 +23,7 @@ const mapStateToProps = state => { privacyMode, } = {}, seedPhraseBackedUp, + tokens, } = metamask const accountBalance = getCurrentEthBalance(state) const { forgottenPassword } = appState @@ -39,7 +40,7 @@ const mapStateToProps = state => { showPrivacyModeNotification: migratedPrivacyMode, activeTab, viewingUnconnectedDapp: isUnconnected && isPopup, - shouldShowSeedPhraseReminder: parseInt(accountBalance, 16) > 0 && !seedPhraseBackedUp, + shouldShowSeedPhraseReminder: !seedPhraseBackedUp && (parseInt(accountBalance, 16) > 0 || tokens.length > 0), } } |