aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-13 07:57:28 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-12-13 07:57:28 +0800
commit167a3fbc112120b6a583f3ec3c8fdd70d39df078 (patch)
treecdf4b9288c69f0116d231a4130b5b0e1a217dc9f /packages
parent2e7d363f2cf76e383bb8723cfb0f2e3c1e4783d8 (diff)
downloaddexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.tar
dexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.tar.gz
dexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.tar.bz2
dexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.tar.lz
dexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.tar.xz
dexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.tar.zst
dexon-sol-tools-167a3fbc112120b6a583f3ec3c8fdd70d39df078.zip
Use BN equals and call function
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/components/order_details.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx
index 6ce19742f..96bdb7150 100644
--- a/packages/instant/src/components/order_details.tsx
+++ b/packages/instant/src/components/order_details.tsx
@@ -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);