aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/util/asset.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-10-23 04:50:08 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-10-23 04:50:08 +0800
commit15ed3b35df1103ac9b0b4104551ecff9559ddb9b (patch)
tree46f54eb03514544ccb179df037f3458b17ed8901 /packages/instant/src/util/asset.ts
parenta017f5e38561a152e8a757b340c1b0c6b3a3e21f (diff)
downloaddexon-0x-contracts-15ed3b35df1103ac9b0b4104551ecff9559ddb9b.tar.gz
dexon-0x-contracts-15ed3b35df1103ac9b0b4104551ecff9559ddb9b.tar.zst
dexon-0x-contracts-15ed3b35df1103ac9b0b4104551ecff9559ddb9b.zip
chore: change order of code to be clearer
Diffstat (limited to 'packages/instant/src/util/asset.ts')
-rw-r--r--packages/instant/src/util/asset.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts
index 4e3b2b946..bf6cd663d 100644
--- a/packages/instant/src/util/asset.ts
+++ b/packages/instant/src/util/asset.ts
@@ -16,10 +16,11 @@ export const assetUtils = {
};
},
getMetaDataOrThrow: (assetData: string, metaDataMap: ObjectMap<AssetMetaData>, network: Network): AssetMetaData => {
- let mainnetAssetData: string | undefined = assetData;
+ let mainnetAssetData: string | undefined;
if (network !== Network.Mainnet) {
mainnetAssetData = assetUtils.getAssociatedAssetDataIfExists(assetData, network);
}
+ mainnetAssetData = assetData;
if (_.isUndefined(mainnetAssetData)) {
throw new Error(ZeroExInstantError.AssetMetaDataNotAvailable);
}