aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/transaction-breakdown/transaction-breakdown.component.js
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2019-02-27 02:30:41 +0800
committerWhymarrh Whitby <whymarrh.whitby@gmail.com>2019-02-27 02:30:41 +0800
commita2320c76fef084b7ec01839ab9c17b474839b3c0 (patch)
tree7620668c68c0de4e0de6ef745beb2cdc508ff50b /ui/app/components/transaction-breakdown/transaction-breakdown.component.js
parentfc1655eecbf3da969dc9c9a8fc3ae95221ffa30b (diff)
downloadtangerine-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/components/transaction-breakdown/transaction-breakdown.component.js')
-rw-r--r--ui/app/components/transaction-breakdown/transaction-breakdown.component.js18
1 files changed, 12 insertions, 6 deletions
diff --git a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js b/ui/app/components/transaction-breakdown/transaction-breakdown.component.js
index 141e16e17..26f52317d 100644
--- a/ui/app/components/transaction-breakdown/transaction-breakdown.component.js
+++ b/ui/app/components/transaction-breakdown/transaction-breakdown.component.js
@@ -18,15 +18,17 @@ export default class TransactionBreakdown extends PureComponent {
transaction: PropTypes.object,
className: PropTypes.string,
nativeCurrency: PropTypes.string.isRequired,
+ showFiat: PropTypes.bool,
}
static defaultProps = {
transaction: {},
+ showFiat: true,
}
render () {
const { t } = this.context
- const { transaction, className, nativeCurrency } = this.props
+ const { transaction, className, nativeCurrency, showFiat } = this.props
const { txParams: { gas, gasPrice, value } = {}, txReceipt: { gasUsed } = {} } = transaction
const gasLimit = typeof gasUsed === 'string' ? gasUsed : gas
@@ -84,11 +86,15 @@ export default class TransactionBreakdown extends PureComponent {
type={PRIMARY}
value={totalInHex}
/>
- <UserPreferencedCurrencyDisplay
- className="transaction-breakdown__value"
- type={SECONDARY}
- value={totalInHex}
- />
+ {
+ showFiat && (
+ <UserPreferencedCurrencyDisplay
+ className="transaction-breakdown__value"
+ type={SECONDARY}
+ value={totalInHex}
+ />
+ )
+ }
</div>
</TransactionBreakdownRow>
</div>