From c4e2dcafa4bd5f4b905680e2c1b80d6ddb6ab6fb Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 25 Jun 2018 16:26:34 -0700 Subject: Have basic network switching working --- .../ts/components/onboarding/portal_onboarding_flow.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'packages/website/ts/components/onboarding') diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 10d4af30e..35b51140d 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -159,9 +159,11 @@ class PlainPortalOnboardingFlow extends React.Component new BigNumber(0) && zrxTokenAllowance > new BigNumber(0); + 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 false; } @@ -222,6 +224,9 @@ class PlainPortalOnboardingFlow extends React.Component Date: Wed, 27 Jun 2018 11:17:32 -0700 Subject: Fix convention stuff --- .../ts/components/onboarding/portal_onboarding_flow.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/website/ts/components/onboarding') 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 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 this.props.refetchTokenStateAsync(token.address)} -- cgit