From 73d8a2adf748e06552a1a7a7a188433c4c41095b Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 2 Jul 2018 16:52:20 -0700 Subject: Always show the wrap ether row in between ETH and WETH --- packages/website/ts/components/wallet/wallet.tsx | 33 +++++++++++----------- .../ts/components/wallet/wrap_ether_item.tsx | 5 ++-- 2 files changed, 20 insertions(+), 18 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 1f1e3598a..a75404637 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -320,8 +320,24 @@ export class Wallet extends React.Component { this.state.wrappedEtherDirection === accessoryItemConfig.wrappedEtherDirection && !_.isUndefined(this.props.userEtherBalanceInWei); const etherToken = this._getEthToken(); + const wrapEtherItem = shouldShowWrapEtherItem ? ( + this.props.refetchTokenStateAsync(etherToken.address)} + /> + ) : null; return (
+ {this.state.wrappedEtherDirection === Side.Receive && wrapEtherItem} {
} accessory={this._renderAccessoryItems(accessoryItemConfig)} - backgroundColor={shouldShowWrapEtherItem ? colors.walletFocusedItemBackground : undefined} /> - {shouldShowWrapEtherItem && ( - this.props.refetchTokenStateAsync(etherToken.address)} - /> - )} + {this.state.wrappedEtherDirection === Side.Deposit && wrapEtherItem} ); } diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx index 851b35f90..2b4cf93fe 100644 --- a/packages/website/ts/components/wallet/wrap_ether_item.tsx +++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx @@ -8,6 +8,7 @@ import * as React from 'react'; import { Blockchain } from 'ts/blockchain'; import { EthAmountInput } from 'ts/components/inputs/eth_amount_input'; import { TokenAmountInput } from 'ts/components/inputs/token_amount_input'; +import { Container } from 'ts/components/ui/container'; import { Dispatcher } from 'ts/redux/dispatcher'; import { colors } from 'ts/style/colors'; import { BlockchainCallErrs, Side, Token } from 'ts/types'; @@ -94,7 +95,7 @@ export class WrapEtherItem extends React.Component +
{this._renderIsEthConversionHappeningSpinner()}
{topLabelText}
@@ -142,7 +143,7 @@ export class WrapEtherItem extends React.Component -
+
); } private _onValueChange(_isValid: boolean, amount?: BigNumber): void { -- cgit