aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/asset.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/util/asset.ts')
-rw-r--r--packages/instant/src/util/asset.ts17
1 files changed, 8 insertions, 9 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts
index a105a7c2b..4e3b2b946 100644
--- a/packages/instant/src/util/asset.ts
+++ b/packages/instant/src/util/asset.ts
@@ -1,4 +1,3 @@
-import { assetDataUtils } from '@0x/order-utils';
import { AssetProxyId, ObjectMap } from '@0x/types';
import * as _ from 'lodash';
@@ -6,17 +5,17 @@ import { assetDataNetworkMapping } from '../data/asset_data_network_mapping';
import { Asset, AssetMetaData, Network, ZeroExInstantError } from '../types';
export const assetUtils = {
- createAssetFromAssetData: (assetData: string, assetMetaDataMap: ObjectMap<AssetMetaData>): Asset => {
+ createAssetFromAssetData: (
+ assetData: string,
+ assetMetaDataMap: ObjectMap<AssetMetaData>,
+ network: Network,
+ ): Asset => {
return {
assetData,
- metaData: assetUtils.getMetaDataOrThrow(assetData, assetMetaDataMap),
+ metaData: assetUtils.getMetaDataOrThrow(assetData, assetMetaDataMap, network),
};
},
- getMetaDataOrThrow: (
- assetData: string,
- metaDataMap: ObjectMap<AssetMetaData>,
- network: Network = Network.Mainnet,
- ): AssetMetaData => {
+ getMetaDataOrThrow: (assetData: string, metaDataMap: ObjectMap<AssetMetaData>, network: Network): AssetMetaData => {
let mainnetAssetData: string | undefined = assetData;
if (network !== Network.Mainnet) {
mainnetAssetData = assetUtils.getAssociatedAssetDataIfExists(assetData, network);
@@ -39,7 +38,7 @@ export const assetUtils = {
case AssetProxyId.ERC20:
return metaData.symbol.toUpperCase();
case AssetProxyId.ERC721:
- return metaData.name.toUpperCase();
+ return metaData.name;
default:
return defaultName;
}