From 18667d739c112955478ab07cb245dc435b31a974 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 15 Oct 2018 17:39:52 -0700 Subject: Hide USD price when ETH-USD price is not available --- packages/instant/src/components/order_details.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'packages/instant/src/components') diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index 9256d1398..bd31bfba8 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -68,6 +68,11 @@ export const EthAmountRow: React.StatelessComponent = ({ const fontWeight = shouldEmphasize ? 700 : 400; const usdFormatter = isEthAmountInBaseUnits ? format.ethBaseAmountInUsd : format.ethUnitAmountInUsd; const ethFormatter = isEthAmountInBaseUnits ? format.ethBaseAmount : format.ethUnitAmount; + const usdPriceSection = _.isUndefined(ethUsdPrice) ? null : ( + + ({usdFormatter(ethAmount, ethUsdPrice)}) + + ); return ( @@ -75,9 +80,7 @@ export const EthAmountRow: React.StatelessComponent = ({ {rowLabel} - - ({usdFormatter(ethAmount, ethUsdPrice)}) - + {usdPriceSection} {ethFormatter(ethAmount)} -- cgit