aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/asset-buyer/src/asset_buyer.ts2
-rw-r--r--packages/instant/src/index.umd.ts7
2 files changed, 4 insertions, 5 deletions
diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts
index 4344f070c..ad4b3bb60 100644
--- a/packages/asset-buyer/src/asset_buyer.ts
+++ b/packages/asset-buyer/src/asset_buyer.ts
@@ -193,7 +193,7 @@ export class AssetBuyer {
): Promise<LiquidityForAssetData> {
const shouldForceOrderRefresh =
options.shouldForceOrderRefresh !== undefined ? options.shouldForceOrderRefresh : false;
- assert.isString('assetData', assetData);
+ assetDataUtils.decodeAssetDataOrThrow(assetData);
assert.isBoolean('options.shouldForceOrderRefresh', shouldForceOrderRefresh);
const assetPairs = await this.orderProvider.getAvailableMakerAssetDatasAsync(assetData);
diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts
index 5ef2e1695..0acf3f2ad 100644
--- a/packages/instant/src/index.umd.ts
+++ b/packages/instant/src/index.umd.ts
@@ -156,10 +156,9 @@ export const hasLiquidityForAssetDataAsync = async (
const assetBuyerOptions = { networkId };
- const assetBuyer =
- typeof orderSource === 'string'
- ? AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl(bestProvider, orderSource, assetBuyerOptions)
- : AssetBuyer.getAssetBuyerForProvidedOrders(bestProvider, orderSource, assetBuyerOptions);
+ const assetBuyer = _.isString(orderSource)
+ ? AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl(bestProvider, orderSource, assetBuyerOptions)
+ : AssetBuyer.getAssetBuyerForProvidedOrders(bestProvider, orderSource, assetBuyerOptions);
const liquidity = await assetBuyer.getLiquidityForAssetDataAsync(assetData);
return liquidity.ethValueAvailableInWei.gt(new BigNumber(0));