diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2019-01-24 04:51:26 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2019-01-24 04:51:26 +0800 |
commit | 2166f57750fba6e0e6d44f862cb57f5823c2d782 (patch) | |
tree | 15fe8ad82a814903305747da2c9821e5a5c51f97 /packages/asset-buyer/src | |
parent | 726a52f3ee70d86cd12761f1a21432d1ef37f6e0 (diff) | |
download | dexon-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.ts | 1 |
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); |