From db77cd10c550803c4f3fac585adc0a7f6ffa8999 Mon Sep 17 00:00:00 2001
From: Steve Klebanoff <steve.klebanoff@gmail.com>
Date: Tue, 16 Oct 2018 11:25:52 -0700
Subject: feat(instant): Handle AssetBuyer errors

---
 .../instant/src/components/asset_amount_input.tsx     | 19 +++----------------
 1 file changed, 3 insertions(+), 16 deletions(-)

(limited to 'packages/instant/src/components/asset_amount_input.tsx')

diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx
index 7c6b03ee9..a7df2da4d 100644
--- a/packages/instant/src/components/asset_amount_input.tsx
+++ b/packages/instant/src/components/asset_amount_input.tsx
@@ -3,7 +3,8 @@ import { BigNumber } from '@0xproject/utils';
 import * as _ from 'lodash';
 import * as React from 'react';
 
-import { assetMetaData } from '../data/asset_meta_data';
+import { bestNameForAsset } from '../util/asset_data';
+
 import { ColorOption } from '../style/theme';
 import { util } from '../util/util';
 
@@ -26,26 +27,12 @@ export class AssetAmountInput extends React.Component<AssetAmountInputProps> {
                 <AmountInput {...rest} onChange={this._handleChange} />
                 <Container display="inline-block" marginLeft="10px">
                     <Text fontSize={rest.fontSize} fontColor={ColorOption.white} textTransform="uppercase">
-                        {this._getAssetSymbolLabel()}
+                        {bestNameForAsset(this.props.assetData, '???')}
                     </Text>
                 </Container>
             </Container>
         );
     }
-    private readonly _getAssetSymbolLabel = (): string => {
-        const unknownLabel = '???';
-        if (_.isUndefined(this.props.assetData)) {
-            return unknownLabel;
-        }
-        const metaData = assetMetaData[this.props.assetData];
-        if (_.isUndefined(metaData)) {
-            return unknownLabel;
-        }
-        if (metaData.assetProxyId === AssetProxyId.ERC20) {
-            return metaData.symbol;
-        }
-        return unknownLabel;
-    };
     private readonly _handleChange = (value?: BigNumber): void => {
         this.props.onChange(value, this.props.assetData);
     };
-- 
cgit v1.2.3


From 1d079490871ebb0d63bf182a75695303a3a9f1f2 Mon Sep 17 00:00:00 2001
From: Steve Klebanoff <steve.klebanoff@gmail.com>
Date: Tue, 16 Oct 2018 17:30:32 -0700
Subject: linting, removing unused imports

---
 packages/instant/src/components/asset_amount_input.tsx | 1 -
 1 file changed, 1 deletion(-)

(limited to 'packages/instant/src/components/asset_amount_input.tsx')

diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx
index a7df2da4d..c9d9c52b3 100644
--- a/packages/instant/src/components/asset_amount_input.tsx
+++ b/packages/instant/src/components/asset_amount_input.tsx
@@ -1,4 +1,3 @@
-import { AssetProxyId } from '@0xproject/types';
 import { BigNumber } from '@0xproject/utils';
 import * as _ from 'lodash';
 import * as React from 'react';
-- 
cgit v1.2.3


From 32fa1bcc387e2eecae53db4b082e93f6fb09ae10 Mon Sep 17 00:00:00 2001
From: Steve Klebanoff <steve.klebanoff@gmail.com>
Date: Wed, 17 Oct 2018 13:31:28 -0700
Subject: export assetDataUtil big obj

---
 packages/instant/src/components/asset_amount_input.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'packages/instant/src/components/asset_amount_input.tsx')

diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx
index c9d9c52b3..db3dbe7f3 100644
--- a/packages/instant/src/components/asset_amount_input.tsx
+++ b/packages/instant/src/components/asset_amount_input.tsx
@@ -2,7 +2,7 @@ import { BigNumber } from '@0xproject/utils';
 import * as _ from 'lodash';
 import * as React from 'react';
 
-import { bestNameForAsset } from '../util/asset_data';
+import { assetDataUtil } from '../util/asset_data';
 
 import { ColorOption } from '../style/theme';
 import { util } from '../util/util';
@@ -26,7 +26,7 @@ export class AssetAmountInput extends React.Component<AssetAmountInputProps> {
                 <AmountInput {...rest} onChange={this._handleChange} />
                 <Container display="inline-block" marginLeft="10px">
                     <Text fontSize={rest.fontSize} fontColor={ColorOption.white} textTransform="uppercase">
-                        {bestNameForAsset(this.props.assetData, '???')}
+                        {assetDataUtil.bestNameForAsset(this.props.assetData, '???')}
                     </Text>
                 </Container>
             </Container>
-- 
cgit v1.2.3


From 8c6de7f69dc1d2bc543456782c5e70e105026301 Mon Sep 17 00:00:00 2001
From: Fabio Berger <me@fabioberger.com>
Date: Thu, 18 Oct 2018 13:59:40 +0100
Subject: chore: replace @0xproject with @0x in .tsx files

---
 packages/instant/src/components/asset_amount_input.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/instant/src/components/asset_amount_input.tsx')

diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx
index db3dbe7f3..730e6396f 100644
--- a/packages/instant/src/components/asset_amount_input.tsx
+++ b/packages/instant/src/components/asset_amount_input.tsx
@@ -1,4 +1,4 @@
-import { BigNumber } from '@0xproject/utils';
+import { BigNumber } from '@0x/utils';
 import * as _ from 'lodash';
 import * as React from 'react';
 
-- 
cgit v1.2.3

