Use BN equals and call function

This commit is contained in:
Steve Klebanoff
2018-12-12 15:57:28 -08:00
parent 2e7d363f2c
commit 167a3fbc11

View File

@@ -77,7 +77,7 @@ export class OrderDetails extends React.Component<OrderDetailsProps> {
}
private _hadErrorFetchingUsdPrice(): boolean {
return this.props.ethUsdPrice === BIG_NUMBER_ZERO;
return this.props.ethUsdPrice ? this.props.ethUsdPrice.equals(BIG_NUMBER_ZERO) : false;
}
private _totalCostSecondaryValue(): React.ReactNode {
@@ -85,7 +85,7 @@ export class OrderDetails extends React.Component<OrderDetailsProps> {
const canDisplayCurrency =
secondaryCurrency === BaseCurrency.ETH ||
(secondaryCurrency === BaseCurrency.USD && this.props.ethUsdPrice && !this._hadErrorFetchingUsdPrice);
(secondaryCurrency === BaseCurrency.USD && this.props.ethUsdPrice && !this._hadErrorFetchingUsdPrice());
if (this.props.buyQuoteInfo && canDisplayCurrency) {
return this._displayAmount(secondaryCurrency, this.props.buyQuoteInfo.totalEthAmount);