Rename userHasAllowances bool to follow proper convention
This commit is contained in:
@@ -137,11 +137,11 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
|
||||
<SetAllowancesOnboardingStep
|
||||
zrxAllowanceToggle={this._renderZrxAllowanceToggle()}
|
||||
ethAllowanceToggle={this._renderEthAllowanceToggle()}
|
||||
userHasAllowancesForWethAndZrx={this._userHasAllowancesForWethAndZrx()}
|
||||
doesUserHaveAllowancesForWethAndZrx={this._doesUserHaveAllowancesForWethAndZrx()}
|
||||
/>
|
||||
),
|
||||
placement: 'right',
|
||||
continueButtonDisplay: this._userHasAllowancesForWethAndZrx() ? 'enabled' : 'disabled',
|
||||
continueButtonDisplay: this._doesUserHaveAllowancesForWethAndZrx() ? 'enabled' : 'disabled',
|
||||
},
|
||||
{
|
||||
target: '.wallet',
|
||||
@@ -178,7 +178,7 @@ class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProp
|
||||
private _userHasVisibleWeth(): boolean {
|
||||
return this._getWethBalance() > new BigNumber(0);
|
||||
}
|
||||
private _userHasAllowancesForWethAndZrx(): boolean {
|
||||
private _doesUserHaveAllowancesForWethAndZrx(): boolean {
|
||||
const ethToken = utils.getEthToken(this.props.tokenByAddress);
|
||||
const zrxToken = utils.getZrxToken(this.props.tokenByAddress);
|
||||
if (ethToken && zrxToken) {
|
||||
|
||||
@@ -5,13 +5,13 @@ import { Text } from 'ts/components/ui/text';
|
||||
export interface SetAllowancesOnboardingStepProps {
|
||||
zrxAllowanceToggle: React.ReactNode;
|
||||
ethAllowanceToggle: React.ReactNode;
|
||||
userHasAllowancesForWethAndZrx: boolean;
|
||||
doesUserHaveAllowancesForWethAndZrx: boolean;
|
||||
}
|
||||
|
||||
export const SetAllowancesOnboardingStep: React.StatelessComponent<SetAllowancesOnboardingStepProps> = ({
|
||||
ethAllowanceToggle,
|
||||
zrxAllowanceToggle,
|
||||
userHasAllowancesForWethAndZrx,
|
||||
doesUserHaveAllowancesForWethAndZrx,
|
||||
}) => (
|
||||
<div className="flex items-center flex-column">
|
||||
<Text>Unlock your tokens for trading. You only need to do this once for each token.</Text>
|
||||
@@ -25,6 +25,6 @@ export const SetAllowancesOnboardingStep: React.StatelessComponent<SetAllowances
|
||||
<Container marginTop="10px">{zrxAllowanceToggle}</Container>
|
||||
</div>
|
||||
</Container>
|
||||
{userHasAllowancesForWethAndZrx && <Text>Perfect! Both your ZRX and WETH tokens are unlocked.</Text>}
|
||||
{doesUserHaveAllowancesForWethAndZrx && <Text>Perfect! Both your ZRX and WETH tokens are unlocked.</Text>}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user