Use helper function to check for error

This commit is contained in:
Steve Klebanoff
2018-12-12 15:46:46 -08:00
parent 9e5e1f568b
commit 2e7d363f2c

View File

@@ -85,9 +85,7 @@ export class OrderDetails extends React.Component<OrderDetailsProps> {
const canDisplayCurrency =
secondaryCurrency === BaseCurrency.ETH ||
(secondaryCurrency === BaseCurrency.USD &&
this.props.ethUsdPrice &&
this.props.ethUsdPrice.greaterThan(BIG_NUMBER_ZERO));
(secondaryCurrency === BaseCurrency.USD && this.props.ethUsdPrice && !this._hadErrorFetchingUsdPrice);
if (this.props.buyQuoteInfo && canDisplayCurrency) {
return this._displayAmount(secondaryCurrency, this.props.buyQuoteInfo.totalEthAmount);