diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2019-02-27 02:30:41 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-02-27 02:30:41 +0800 |
commit | a2320c76fef084b7ec01839ab9c17b474839b3c0 (patch) | |
tree | 7620668c68c0de4e0de6ef745beb2cdc508ff50b /ui/app/selectors.js | |
parent | fc1655eecbf3da969dc9c9a8fc3ae95221ffa30b (diff) | |
download | tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.gz tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.bz2 tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.lz tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.xz tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.zst tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.zip |
Show/Hide Fiat on Testnets based on User Preference (#6153)
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index 976342455..a36671b42 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -1,3 +1,5 @@ +import {NETWORK_TYPES} from './constants/common' + const abi = require('human-standard-token-abi') import { transactionsSelector, @@ -37,6 +39,7 @@ const selectors = { getNetworkIdentifier, isBalanceCached, getAdvancedInlineGasShown, + getIsMainnet, } module.exports = selectors @@ -228,6 +231,11 @@ function getTotalUnapprovedCount ({ metamask }) { unapprovedTypedMessagesCount } +function getIsMainnet (state) { + const networkType = getNetworkIdentifier(state) + return networkType === NETWORK_TYPES.MAINNET +} + function preferencesSelector ({ metamask }) { return metamask.preferences } |