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/components/send/account-list-item/account-list-item.component.js | |
parent | fc1655eecbf3da969dc9c9a8fc3ae95221ffa30b (diff) | |
download | tangerine-wallet-browser-a2320c76fef084b7ec01839ab9c17b474839b3c0.tar.gz 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/components/send/account-list-item/account-list-item.component.js')
-rw-r--r-- | ui/app/components/send/account-list-item/account-list-item.component.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ui/app/components/send/account-list-item/account-list-item.component.js b/ui/app/components/send/account-list-item/account-list-item.component.js index 665383e58..0420af46b 100644 --- a/ui/app/components/send/account-list-item/account-list-item.component.js +++ b/ui/app/components/send/account-list-item/account-list-item.component.js @@ -19,8 +19,13 @@ export default class AccountListItem extends Component { handleClick: PropTypes.func, icon: PropTypes.node, balanceIsCached: PropTypes.bool, + showFiat: PropTypes.bool, }; + static defaultProps = { + showFiat: true, + } + static contextTypes = { t: PropTypes.func, }; @@ -34,6 +39,7 @@ export default class AccountListItem extends Component { handleClick, icon = null, balanceIsCached, + showFiat, } = this.props const { name, address, balance } = account || {} @@ -83,11 +89,15 @@ export default class AccountListItem extends Component { balanceIsCached ? <span className="account-list-item__cached-star">*</span> : null } </div> - <UserPreferencedCurrencyDisplay - type={SECONDARY} - value={balance} - hideTitle={true} - /> + { + showFiat && ( + <UserPreferencedCurrencyDisplay + type={SECONDARY} + value={balance} + hideTitle={true} + /> + ) + } </div> </Tooltip> ) |