aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMark Stacey <markjstacey@gmail.com>2019-08-03 02:43:15 +0800
committerGitHub <noreply@github.com>2019-08-03 02:43:15 +0800
commit2649b9b8bb5b675217e3ab9258d96797f3bcdfba (patch)
tree1866473dcc2fcd1f13acb7d19500adbd88cb75dd /ui
parent6a0dbcdb31e4c49737578cce4034ab2fcf906e2e (diff)
downloadtangerine-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.
Diffstat (limited to 'ui')
-rw-r--r--ui/app/pages/home/home.container.js3
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),
}
}