aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-22 07:43:55 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-22 12:25:43 +0800
commited8acdb11c349bd92ee89cf9c8c9921df185b67c (patch)
tree5556acfafe82c852580b552d44da4abe7e40b606 /packages
parent26370da13d7bed06d59efeba0a4921387b874e06 (diff)
downloaddexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.tar
dexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.tar.gz
dexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.tar.bz2
dexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.tar.lz
dexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.tar.xz
dexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.tar.zst
dexon-sol-tools-ed8acdb11c349bd92ee89cf9c8c9921df185b67c.zip
Re add wrapped ether item
Diffstat (limited to 'packages')
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx31
1 files changed, 24 insertions, 7 deletions
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 276a94fdb..09d094a16 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -383,15 +383,32 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
const style = shouldShowWrapEtherItem
? { ...walletItemStyles.focusedItem, ...styles.paddedItem }
: { ...styles.tokenItem, ...styles.borderedItem, ...styles.paddedItem };
+ const etherToken = this._getEthToken();
return (
- <div className="flex items-center" style={style}>
- <div className="px2">{icon}</div>
- <div className="flex-none pr2 pt2 pb2">
- {primaryText}
- {secondaryText}
+ <div className="flex flex-column">
+ <div className="flex items-center" style={style}>
+ <div className="px2">{icon}</div>
+ <div className="flex-none pr2 pt2 pb2">
+ {primaryText}
+ {secondaryText}
+ </div>
+ <div className="flex-auto" />
+ <div>{this._renderAccessoryItems(accessoryItemConfig)}</div>
</div>
- <div className="flex-auto" />
- <div>{this._renderAccessoryItems(accessoryItemConfig)}</div>
+ {shouldShowWrapEtherItem && (
+ <WrapEtherItem
+ userAddress={this.props.userAddress}
+ networkId={this.props.networkId}
+ blockchain={this.props.blockchain}
+ dispatcher={this.props.dispatcher}
+ userEtherBalanceInWei={this.props.userEtherBalanceInWei}
+ direction={accessoryItemConfig.wrappedEtherDirection}
+ etherToken={etherToken}
+ lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
+ onConversionSuccessful={this._closeWrappedEtherActionRow.bind(this)}
+ refetchEthTokenStateAsync={this._refetchTokenStateAsync.bind(this, etherToken.address)}
+ />
+ )}
</div>
);
}