diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-07-07 05:09:36 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-07-07 05:21:30 +0800 |
commit | 9669a4d1216b7d22107580daf3e2bff464eb2ade (patch) | |
tree | e408ae8281b8fc09ac253b7547027639e5f2943c /packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | |
parent | 7418926ebb156165f328a89cf58ec758737ee999 (diff) | |
download | dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.tar dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.tar.gz dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.tar.bz2 dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.tar.lz dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.tar.xz dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.tar.zst dexon-sol-tools-9669a4d1216b7d22107580daf3e2bff464eb2ade.zip |
Create Balance component and make token symbols smaller than token amounts
Diffstat (limited to 'packages/website/ts/components/onboarding/portal_onboarding_flow.tsx')
-rw-r--r-- | packages/website/ts/components/onboarding/portal_onboarding_flow.tsx | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 503f2163d..a79cf1ee1 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -140,13 +140,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp { position: nextToWalletPosition, title: 'Step 2: Wrap ETH', - content: ( - <WrapEthOnboardingStep3 - formattedWethBalanceIfExists={ - this._userHasVisibleWeth() ? this._getFormattedWethBalance() : undefined - } - /> - ), + content: <WrapEthOnboardingStep3 wethAmount={this._getWethBalance()} />, continueButtonDisplay: this._userHasVisibleWeth() ? 'enabled' : 'disabled', }, { @@ -187,11 +181,6 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp const ethTokenState = this.props.trackedTokenStateByAddress[ethToken.address]; return ethTokenState.balance; } - private _getFormattedWethBalance(): string { - const ethToken = utils.getEthToken(this.props.tokenByAddress); - const ethTokenState = this.props.trackedTokenStateByAddress[ethToken.address]; - return utils.getFormattedAmountFromToken(ethToken, ethTokenState); - } private _userHasVisibleWeth(): boolean { return this._getWethBalance() > new BigNumber(0); } |