diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 04:52:53 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-08-08 04:52:53 +0800 |
commit | 0a616ad3b8b87c8142598b535154564cb9276cbe (patch) | |
tree | 2069631964815b60dafd7f093cdd47579ec4d129 /packages/website/ts/components/onboarding | |
parent | 57a44291233548da9785aec3cde92171342c9eb3 (diff) | |
parent | 8199e8794331f555679496d32cb87ad8513c31d1 (diff) | |
download | dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.gz dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.bz2 dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.lz dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.xz dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.tar.zst dexon-sol-tools-0a616ad3b8b87c8142598b535154564cb9276cbe.zip |
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/sra/add-sra-package
Diffstat (limited to 'packages/website/ts/components/onboarding')
-rw-r--r-- | packages/website/ts/components/onboarding/onboarding_tooltip.tsx | 2 | ||||
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 19 |
2 files changed, 10 insertions, 11 deletions
diff --git a/packages/website/ts/components/onboarding/onboarding_tooltip.tsx b/packages/website/ts/components/onboarding/onboarding_tooltip.tsx index 15d47908d..ff5f0bab6 100644 --- a/packages/website/ts/components/onboarding/onboarding_tooltip.tsx +++ b/packages/website/ts/components/onboarding/onboarding_tooltip.tsx @@ -24,7 +24,7 @@ export const OnboardingTooltip: React.StatelessComponent<OnboardingTooltipProps> ); }; OnboardingTooltip.defaultProps = { - pointerDisplay: 'left', + pointerDisplay: PointerDirection.Left, }; OnboardingTooltip.displayName = 'OnboardingTooltip'; diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index f395674a1..522687758 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -21,7 +21,7 @@ import { WrapEthOnboardingStep2, WrapEthOnboardingStep3, } from 'ts/components/onboarding/wrap_eth_onboarding_step'; -import { AllowanceToggle } from 'ts/containers/inputs/allowance_toggle'; +import { AllowanceStateToggle } from 'ts/containers/inputs/allowance_state_toggle'; import { BrowserType, ProviderType, ScreenWidths, Token, TokenByAddress, TokenStateByAddress } from 'ts/types'; import { analytics } from 'ts/utils/analytics'; import { utils } from 'ts/utils/utils'; @@ -149,8 +149,8 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp title: 'Step 3: Unlock Tokens', content: ( <SetAllowancesOnboardingStep - zrxAllowanceToggle={this._renderZrxAllowanceToggle()} - ethAllowanceToggle={this._renderEthAllowanceToggle()} + zrxAllowanceToggle={this._renderZrxAllowanceStateToggle()} + ethAllowanceToggle={this._renderEthAllowanceStateToggle()} doesUserHaveAllowancesForWethAndZrx={this._doesUserHaveAllowancesForWethAndZrx()} /> ), @@ -243,15 +243,15 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp stepIndex: this.props.stepIndex, }); } - private _renderZrxAllowanceToggle(): React.ReactNode { + private _renderZrxAllowanceStateToggle(): React.ReactNode { const zrxToken = utils.getZrxToken(this.props.tokenByAddress); - return this._renderAllowanceToggle(zrxToken); + return this._renderAllowanceStateToggle(zrxToken); } - private _renderEthAllowanceToggle(): React.ReactNode { + private _renderEthAllowanceStateToggle(): React.ReactNode { const ethToken = utils.getEthToken(this.props.tokenByAddress); - return this._renderAllowanceToggle(ethToken); + return this._renderAllowanceStateToggle(ethToken); } - private _renderAllowanceToggle(token: Token): React.ReactNode { + private _renderAllowanceStateToggle(token: Token): React.ReactNode { if (!token) { return null; } @@ -260,10 +260,9 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp return null; } return ( - <AllowanceToggle + <AllowanceStateToggle token={token} tokenState={tokenStateIfExists} - isDisabled={!tokenStateIfExists.isLoaded} blockchain={this.props.blockchain} // tslint:disable-next-line:jsx-no-lambda refetchTokenStateAsync={async () => this.props.refetchTokenStateAsync(token.address)} |