aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/instant/src/types.ts1
-rw-r--r--packages/instant/src/util/asset.ts3
2 files changed, 3 insertions, 1 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts
index 7323123c3..c340623ad 100644
--- a/packages/instant/src/types.ts
+++ b/packages/instant/src/types.ts
@@ -41,6 +41,7 @@ export interface ERC721Asset {
assetData: string;
metaData: ERC721AssetMetaData;
}
+
export interface Asset {
assetData: string;
metaData: AssetMetaData;
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);
}