aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/data
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-19 06:48:35 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-19 06:48:35 +0800
commitb4fb6b5ff3106c9223508469a2bee583bcea8da0 (patch)
treec34de19c59aa3c167dbb3daf0941b57079ac9311 /packages/instant/src/data
parentc87e68f833a2d8a87846d70a9d4a727b46323eea (diff)
downloaddexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.tar
dexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.tar.gz
dexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.tar.bz2
dexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.tar.lz
dexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.tar.xz
dexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.tar.zst
dexon-sol-tools-b4fb6b5ff3106c9223508469a2bee583bcea8da0.zip
fix: add error message and move more logic to assetUtils
Diffstat (limited to 'packages/instant/src/data')
-rw-r--r--packages/instant/src/data/asset_data_network_mapping.ts12
1 files changed, 1 insertions, 11 deletions
diff --git a/packages/instant/src/data/asset_data_network_mapping.ts b/packages/instant/src/data/asset_data_network_mapping.ts
index 9e14462f8..e8ccbf011 100644
--- a/packages/instant/src/data/asset_data_network_mapping.ts
+++ b/packages/instant/src/data/asset_data_network_mapping.ts
@@ -7,19 +7,9 @@ interface AssetDataByNetwork {
[Network.Mainnet]?: string;
}
-const sameAssetDatas: AssetDataByNetwork[] = [
+export const assetDataNetworkMapping: AssetDataByNetwork[] = [
{
[Network.Mainnet]: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
[Network.Kovan]: '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
},
];
-
-export const assetDataNetworkMapping = {
- getAssociatedAssetDataIfExists: (assetData: string, network: Network): string | undefined => {
- const assetDataGroupIfExists = _.find(sameAssetDatas, value => value[network] === assetData);
- if (_.isUndefined(assetDataGroupIfExists)) {
- return;
- }
- return assetDataGroupIfExists[Network.Mainnet];
- },
-};