Re add wrapped ether item

This commit is contained in:
Brandon Millman
2018-05-21 16:43:55 -07:00
parent 26370da13d
commit ed8acdb11c

View File

@@ -383,15 +383,32 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
const style = shouldShowWrapEtherItem const style = shouldShowWrapEtherItem
? { ...walletItemStyles.focusedItem, ...styles.paddedItem } ? { ...walletItemStyles.focusedItem, ...styles.paddedItem }
: { ...styles.tokenItem, ...styles.borderedItem, ...styles.paddedItem }; : { ...styles.tokenItem, ...styles.borderedItem, ...styles.paddedItem };
const etherToken = this._getEthToken();
return ( return (
<div className="flex items-center" style={style}> <div className="flex flex-column">
<div className="px2">{icon}</div> <div className="flex items-center" style={style}>
<div className="flex-none pr2 pt2 pb2"> <div className="px2">{icon}</div>
{primaryText} <div className="flex-none pr2 pt2 pb2">
{secondaryText} {primaryText}
{secondaryText}
</div>
<div className="flex-auto" />
<div>{this._renderAccessoryItems(accessoryItemConfig)}</div>
</div> </div>
<div className="flex-auto" /> {shouldShowWrapEtherItem && (
<div>{this._renderAccessoryItems(accessoryItemConfig)}</div> <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> </div>
); );
} }