From ea948ac2c885c395f1e07b285c65232264c58b7b Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Fri, 11 May 2018 16:09:22 -0700 Subject: Trade direct route --- packages/website/ts/components/portal/portal.tsx | 79 ++++++++++------------ .../website/ts/components/portal/portal_menu.tsx | 2 +- 2 files changed, 37 insertions(+), 44 deletions(-) diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index fb047a28a..09f2ba10a 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -221,7 +221,6 @@ export class Portal extends React.Component { path={`${WebsitePaths.Portal}/weth`} render={this._renderEthWrapper.bind(this)} /> - { path={`${WebsitePaths.Portal}/trades`} component={this._renderTradeHistory.bind(this)} /> + @@ -308,24 +311,42 @@ export class Portal extends React.Component { } private _renderEthWrapper() { return ( - +
+ + <EthWrappers + networkId={this.props.networkId} + blockchain={this._blockchain} + dispatcher={this.props.dispatcher} + tokenByAddress={this.props.tokenByAddress} + userAddress={this.props.userAddress} + userEtherBalanceInWei={this.props.userEtherBalanceInWei} + lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch} + /> + </div> ); } private _renderTradeHistory() { return ( - <TradeHistory - tokenByAddress={this.props.tokenByAddress} - userAddress={this.props.userAddress} - networkId={this.props.networkId} - /> + <div> + <Title labelText={'Trade History'} /> + <TradeHistory + tokenByAddress={this.props.tokenByAddress} + userAddress={this.props.userAddress} + networkId={this.props.networkId} + /> + </div> + ); + } + private _renderTradeDirect(match: any, location: Location, history: History) { + return ( + <div> + <Title labelText={'Trade Direct'} /> + <GenerateOrderForm + blockchain={this._blockchain} + hashData={this.props.hashData} + dispatcher={this.props.dispatcher} + /> + </div> ); } private _renderTokenBalances() { @@ -350,34 +371,6 @@ export class Portal extends React.Component<PortalProps, PortalState> { </div> ); } - private _renderFillOrder(match: any, location: Location, history: History) { - const initialFillOrder = !_.isUndefined(this.props.userSuppliedOrderCache) - ? this.props.userSuppliedOrderCache - : this._sharedOrderIfExists; - return ( - <FillOrder - blockchain={this._blockchain} - blockchainErr={this.props.blockchainErr} - initialOrder={initialFillOrder} - isOrderInUrl={!_.isUndefined(this._sharedOrderIfExists)} - orderFillAmount={this.props.orderFillAmount} - networkId={this.props.networkId} - userAddress={this.props.userAddress} - tokenByAddress={this.props.tokenByAddress} - dispatcher={this.props.dispatcher} - lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch} - /> - ); - } - private _renderGenerateOrderForm(match: any, location: Location, history: History) { - return ( - <GenerateOrderForm - blockchain={this._blockchain} - hashData={this.props.hashData} - dispatcher={this.props.dispatcher} - /> - ); - } private _renderRelayerIndex() { return ( <div> diff --git a/packages/website/ts/components/portal/portal_menu.tsx b/packages/website/ts/components/portal/portal_menu.tsx index e073596e2..c8e2dacfa 100644 --- a/packages/website/ts/components/portal/portal_menu.tsx +++ b/packages/website/ts/components/portal/portal_menu.tsx @@ -18,7 +18,7 @@ interface MenuItemEntry { const menuItemEntries: MenuItemEntry[] = [ { to: `${WebsitePaths.Portal}/account`, - labelText: 'Account Overview', + labelText: 'Account overview', iconName: 'zmdi-balance-wallet', }, { -- cgit