aboutsummaryrefslogtreecommitdiffstats
path: root/packages/asset-buyer/src
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-24 04:51:26 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2019-01-24 04:51:26 +0800
commit2166f57750fba6e0e6d44f862cb57f5823c2d782 (patch)
tree15fe8ad82a814903305747da2c9821e5a5c51f97 /packages/asset-buyer/src
parent726a52f3ee70d86cd12761f1a21432d1ef37f6e0 (diff)
downloaddexon-0x-contracts-2166f57750fba6e0e6d44f862cb57f5823c2d782.tar.gz
dexon-0x-contracts-2166f57750fba6e0e6d44f862cb57f5823c2d782.tar.zst
dexon-0x-contracts-2166f57750fba6e0e6d44f862cb57f5823c2d782.zip
Assert that assetData is a string before we try to decode it
Diffstat (limited to 'packages/asset-buyer/src')
-rw-r--r--packages/asset-buyer/src/asset_buyer.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts
index ad4b3bb60..b22b1a122 100644
--- a/packages/asset-buyer/src/asset_buyer.ts
+++ b/packages/asset-buyer/src/asset_buyer.ts
@@ -193,6 +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);