From 92706a4b431e0023cf21adec62635447594d8ab3 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 1 Nov 2018 17:59:51 -0700 Subject: feat: add name param to all ERC20AssetMetaData --- packages/instant/src/components/erc20_token_selector.tsx | 4 ++++ packages/instant/src/data/asset_meta_data_map.ts | 11 +++++++++++ packages/instant/src/types.ts | 1 + packages/instant/test/util/asset.test.ts | 1 + 4 files changed, 17 insertions(+) diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index a8bef3d61..2f637a1a6 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -54,6 +54,10 @@ class TokenSelectorRow extends React.Component { {displaySymbol} + + - + + {token.metaData.name} diff --git a/packages/instant/src/data/asset_meta_data_map.ts b/packages/instant/src/data/asset_meta_data_map.ts index d7cf2c0d8..76df80540 100644 --- a/packages/instant/src/data/asset_meta_data_map.ts +++ b/packages/instant/src/data/asset_meta_data_map.ts @@ -10,65 +10,76 @@ export const assetMetaDataMap: ObjectMap = { decimals: 18, primaryColor: 'rgb(54, 50, 60)', symbol: 'zrx', + name: '0x', }, '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#ec3e6c', symbol: 'spank', + name: 'Spank', }, '0xf47261b0000000000000000000000000d26114cd6EE289AccF82350c8d8487fedB8A0C07': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#2e61ea', symbol: 'omg', + name: 'OmiseGo', }, '0xf47261b00000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: 'white', symbol: 'mkr', + name: 'Maker', }, '0xf47261b00000000000000000000000000d8775f648430679a709e98d2b0cb6250d2887ef': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#9c326c', symbol: 'bat', + name: 'Basic Attention Token', }, '0xf47261b0000000000000000000000000744d70fdbe2ba4cf95131626614a1763df805b9e': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#5663b0', symbol: 'snt', + name: 'Status', }, '0xf47261b00000000000000000000000000f5d2fb29fb7d3cfee444a200298f468908cc942': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#f08839', symbol: 'mana', + name: 'Decentraland', }, '0xf47261b0000000000000000000000000a74476443119A942dE498590Fe1f2454d7D4aC0d': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#263469', symbol: 'gnt', + name: 'Golem', }, '0xf47261b000000000000000000000000012480e24eb5bec1a9d4369cab6a80cad3c0a377a': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#de5445', symbol: 'sub', + name: 'Substratum', }, '0xf47261b000000000000000000000000008d32b0da63e2C3bcF8019c9c5d849d7a9d791e6': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#000', symbol: 'dentacoin', + name: 'Dentacoin', }, '0xf47261b0000000000000000000000000e94327d07fc17907b4db788e5adf2ed424addff6': { assetProxyId: AssetProxyId.ERC20, decimals: 18, primaryColor: '#512D80', symbol: 'rep', + name: 'Augur', }, }; diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index 336465e43..963a5d656 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -39,6 +39,7 @@ export interface ERC20AssetMetaData { decimals: number; primaryColor?: string; symbol: string; + name: string; } export interface ERC721AssetMetaData { diff --git a/packages/instant/test/util/asset.test.ts b/packages/instant/test/util/asset.test.ts index c7db7eba7..4229b24ed 100644 --- a/packages/instant/test/util/asset.test.ts +++ b/packages/instant/test/util/asset.test.ts @@ -9,6 +9,7 @@ const ZRX_META_DATA: ERC20AssetMetaData = { assetProxyId: AssetProxyId.ERC20, symbol: 'zrx', decimals: 18, + name: '0x', }; const ZRX_ASSET: Asset = { assetData: ZRX_ASSET_DATA, -- cgit v1.2.3