diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-06-28 02:17:32 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-06-28 02:17:32 +0800 |
commit | b6f546ebe0b71ce450c1e724fc8f3b670bf97773 (patch) | |
tree | 94f6afa5b4e0519c5dfa47c0b7cd24fb6c8f14e7 /packages/website/ts/components | |
parent | 2a092143dc01d84e5dc0b6dc2998cfd4efb38d73 (diff) | |
download | dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.gz dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.bz2 dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.lz dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.xz dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.tar.zst dexon-sol-tools-b6f546ebe0b71ce450c1e724fc8f3b670bf97773.zip |
Fix convention stuff
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 10 |
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)} |