aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-17 09:12:08 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-17 09:12:08 +0800
commit92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c (patch)
tree3e5f303cc1a528520c7c3b027e741e4dae2ed899 /packages/instant/src
parentff8250cd3567a276490342a820bf9428257a0c7c (diff)
downloaddexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.tar
dexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.tar.gz
dexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.tar.bz2
dexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.tar.lz
dexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.tar.xz
dexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.tar.zst
dexon-sol-tools-92f5ad4f1518b2aaa3f1754b44a3059ac1610e0c.zip
Use more specific helper method decodeAssetDataOrThrow
Diffstat (limited to 'packages/instant/src')
-rw-r--r--packages/instant/src/index.umd.ts7
1 files changed, 3 insertions, 4 deletions
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));