aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components/onboarding
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-06-28 02:17:32 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-06-28 02:17:32 +0800
commitb6f546ebe0b71ce450c1e724fc8f3b670bf97773 (patch)
tree94f6afa5b4e0519c5dfa47c0b7cd24fb6c8f14e7 /packages/website/ts/components/onboarding
parent2a092143dc01d84e5dc0b6dc2998cfd4efb38d73 (diff)
downloaddexon-0x-contracts-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.gz
dexon-0x-contracts-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.zst
dexon-0x-contracts-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.zip
Fix convention stuff
Diffstat (limited to 'packages/website/ts/components/onboarding')
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
index 35b51140d..296b410fe 100644
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
@@ -162,7 +162,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
const ethTokenState = this.props.trackedTokenStateByAddress[ethToken.address];
const zrxTokenState = this.props.trackedTokenStateByAddress[zrxToken.address];
if (ethTokenState && zrxTokenState) {
- return ethTokenState.allowance > new BigNumber(0) && zrxTokenState.allowance > new BigNumber(0);
+ return ethTokenState.allowance.gt(0) && zrxTokenState.allowance.gt(0);
}
}
return false;
@@ -223,15 +223,15 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
if (!token) {
return null;
}
- const tokenState = this.props.trackedTokenStateByAddress[token.address];
- if (!tokenState) {
+ const tokenStateIfExists = this.props.trackedTokenStateByAddress[token.address];
+ if (_.isUndefined(tokenStateIfExists)) {
return null;
}
return (
<AllowanceToggle
token={token}
- tokenState={tokenState}
- isDisabled={!tokenState.isLoaded}
+ tokenState={tokenStateIfExists}
+ isDisabled={!tokenStateIfExists.isLoaded}
blockchain={this.props.blockchain}
// tslint:disable-next-line:jsx-no-lambda
refetchTokenStateAsync={async () => this.props.refetchTokenStateAsync(token.address)}