From 92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 16 Jan 2019 17:12:08 -0800 Subject: Use more specific helper method decodeAssetDataOrThrow --- packages/instant/src/index.umd.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packages/instant/src') 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)); -- cgit