From 677e77d0ae3f0daf9c5c6d43f73a089c24d60ea6 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Thu, 14 Jun 2018 10:28:02 -0700
Subject: Add Portal v2 logging

---
 packages/website/ts/components/wallet/wallet.tsx | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index f80be6313..237e86306 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -1,9 +1,10 @@
-import { EtherscanLinkSuffixes, Styles, utils as sharedUtils } from '@0xproject/react-shared';
+import { constants as sharedConstants, EtherscanLinkSuffixes, Styles, utils as sharedUtils } from '@0xproject/react-shared';
 import { BigNumber, errorUtils } from '@0xproject/utils';
 import { Web3Wrapper } from '@0xproject/web3-wrapper';
 import * as _ from 'lodash';
 import CircularProgress from 'material-ui/CircularProgress';
 import FloatingActionButton from 'material-ui/FloatingActionButton';
+
 import { ListItem } from 'material-ui/List';
 import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
 import ContentAdd from 'material-ui/svg-icons/content/add';
@@ -12,6 +13,7 @@ import * as React from 'react';
 import { Link } from 'react-router-dom';
 import firstBy = require('thenby');
 
+import { analytics } from 'ts/utils/analytics';
 import { Blockchain } from 'ts/blockchain';
 import { AllowanceToggle } from 'ts/components/inputs/allowance_toggle';
 import { Container } from 'ts/components/ui/container';
@@ -495,18 +497,24 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
             }
         }
         const onClick = isWrappedEtherDirectionOpen
-            ? this._closeWrappedEtherActionRow.bind(this)
+            ? this._closeWrappedEtherActionRow.bind(this, wrappedEtherDirection)
             : this._openWrappedEtherActionRow.bind(this, wrappedEtherDirection);
         return (
             <IconButton iconName={buttonIconName} labelText={buttonLabel} onClick={onClick} color={colors.mediumBlue} />
         );
     }
     private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void {
+        const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
+        const action = wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
+        analytics.logEvent('Portal', action, networkName);
         this.setState({
             wrappedEtherDirection,
         });
     }
-    private _closeWrappedEtherActionRow(): void {
+    private _closeWrappedEtherActionRow(wrappedEtherDirection: Side): void {
+        const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
+        const action = wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
+        analytics.logEvent('Portal', action, networkName);
         this.setState({
             wrappedEtherDirection: undefined,
         });
-- 
cgit v1.2.3


From 81d6df925e430f2199ddef44b3ccd353e6c3c19b Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Thu, 14 Jun 2018 15:47:59 -0700
Subject: Run linter

---
 packages/website/ts/components/wallet/wallet.tsx | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 237e86306..42aa5af5d 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -1,4 +1,9 @@
-import { constants as sharedConstants, EtherscanLinkSuffixes, Styles, utils as sharedUtils } from '@0xproject/react-shared';
+import {
+    constants as sharedConstants,
+    EtherscanLinkSuffixes,
+    Styles,
+    utils as sharedUtils,
+} from '@0xproject/react-shared';
 import { BigNumber, errorUtils } from '@0xproject/utils';
 import { Web3Wrapper } from '@0xproject/web3-wrapper';
 import * as _ from 'lodash';
@@ -13,7 +18,6 @@ import * as React from 'react';
 import { Link } from 'react-router-dom';
 import firstBy = require('thenby');
 
-import { analytics } from 'ts/utils/analytics';
 import { Blockchain } from 'ts/blockchain';
 import { AllowanceToggle } from 'ts/components/inputs/allowance_toggle';
 import { Container } from 'ts/components/ui/container';
@@ -37,6 +41,7 @@ import {
     TokenStateByAddress,
     WebsitePaths,
 } from 'ts/types';
+import { analytics } from 'ts/utils/analytics';
 import { constants } from 'ts/utils/constants';
 import { utils } from 'ts/utils/utils';
 import { styles as walletItemStyles } from 'ts/utils/wallet_item_styles';
@@ -505,7 +510,8 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
     }
     private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void {
         const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
-        const action = wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
+        const action =
+            wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
         analytics.logEvent('Portal', action, networkName);
         this.setState({
             wrappedEtherDirection,
@@ -513,7 +519,8 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
     }
     private _closeWrappedEtherActionRow(wrappedEtherDirection: Side): void {
         const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
-        const action = wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
+        const action =
+            wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
         analytics.logEvent('Portal', action, networkName);
         this.setState({
             wrappedEtherDirection: undefined,
-- 
cgit v1.2.3


From db9ff7675404b6d409cc195159a8334c59208c25 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Mon, 18 Jun 2018 16:57:28 -0700
Subject: Only elevate wallet zIndex when onboarding is in progress

---
 packages/website/ts/components/wallet/wallet.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 3a6d9942d..3f24d18c5 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -23,7 +23,6 @@ import { WrapEtherItem } from 'ts/components/wallet/wrap_ether_item';
 import { AllowanceToggle } from 'ts/containers/inputs/allowance_toggle';
 import { Dispatcher } from 'ts/redux/dispatcher';
 import { colors } from 'ts/style/colors';
-import { zIndex } from 'ts/style/z_index';
 import {
     BlockchainErrs,
     ProviderType,
@@ -59,6 +58,7 @@ export interface WalletProps {
     onAddToken: () => void;
     onRemoveToken: () => void;
     refetchTokenStateAsync: (tokenAddress: string) => Promise<void>;
+    style: React.CSSProperties;
 }
 
 interface WalletState {
@@ -79,7 +79,6 @@ interface AccessoryItemConfig {
 const styles: Styles = {
     root: {
         width: '100%',
-        zIndex: zIndex.aboveOverlay,
         position: 'relative',
     },
     footerItemInnerDiv: {
@@ -134,6 +133,9 @@ const NO_ALLOWANCE_TOGGLE_SPACE_WIDTH = 56;
 const ACCOUNT_PATH = `${WebsitePaths.Portal}/account`;
 
 export class Wallet extends React.Component<WalletProps, WalletState> {
+    public static defaultProps = {
+        style: {},
+    };
     constructor(props: WalletProps) {
         super(props);
         this.state = {
@@ -141,11 +143,10 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
             isHoveringSidebar: false,
         };
     }
-
     public render(): React.ReactNode {
         const isBlockchainLoaded = this.props.blockchainIsLoaded && this.props.blockchainErr === BlockchainErrs.NoError;
         return (
-            <Island className="flex flex-column wallet" style={styles.root}>
+            <Island className="flex flex-column wallet" style={{ ...styles.root, ...this.props.style }}>
                 {isBlockchainLoaded ? this._renderLoadedRows() : this._renderLoadingRows()}
             </Island>
         );
-- 
cgit v1.2.3


From bdd299dd9ee4699ccf5a4ab648e721e03ab2a139 Mon Sep 17 00:00:00 2001
From: fragosti <francesco.agosti93@gmail.com>
Date: Mon, 18 Jun 2018 17:24:31 -0700
Subject: Fix onboarding persisting when changing routes

---
 packages/website/ts/components/wallet/wallet.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/website/ts/components/wallet/wallet.tsx')

diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
index 3f24d18c5..b6d22c99a 100644
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ b/packages/website/ts/components/wallet/wallet.tsx
@@ -270,7 +270,7 @@ export class Wallet extends React.Component<WalletProps, WalletState> {
                         <ListItem
                             primaryText={
                                 <div className="flex right" style={styles.manageYourWalletText}>
-                                    {'manage your wallet'}
+                                    manage your wallet
                                 </div>
                                 // https://github.com/palantir/tslint-react/issues/140
                                 // tslint:disable-next-line:jsx-curly-spacing
-- 
cgit v1.2.3

