diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-10-23 05:20:20 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-10-23 05:20:20 +0800 |
commit | 48e4452a0442acb992c204ca1fbec36df1a75d6d (patch) | |
tree | c4c47ba4585686a27d27f9665fa17dc424d3d824 /packages/instant/src | |
parent | 37c5165319d5962aedc683c105df446ce62cd72f (diff) | |
download | dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.tar dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.tar.gz dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.tar.bz2 dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.tar.lz dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.tar.xz dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.tar.zst dexon-sol-tools-48e4452a0442acb992c204ca1fbec36df1a75d6d.zip |
feat: add tests for assetUtils
Diffstat (limited to 'packages/instant/src')
-rw-r--r-- | packages/instant/src/util/asset.ts | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts index bf6cd663d..4e3b2b946 100644 --- a/packages/instant/src/util/asset.ts +++ b/packages/instant/src/util/asset.ts @@ -16,11 +16,10 @@ export const assetUtils = { }; }, getMetaDataOrThrow: (assetData: string, metaDataMap: ObjectMap<AssetMetaData>, network: Network): AssetMetaData => { - let mainnetAssetData: string | undefined; + let mainnetAssetData: string | undefined = assetData; if (network !== Network.Mainnet) { mainnetAssetData = assetUtils.getAssociatedAssetDataIfExists(assetData, network); } - mainnetAssetData = assetData; if (_.isUndefined(mainnetAssetData)) { throw new Error(ZeroExInstantError.AssetMetaDataNotAvailable); } |