From 2166f57750fba6e0e6d44f862cb57f5823c2d782 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 23 Jan 2019 12:51:26 -0800 Subject: Assert that assetData is a string before we try to decode it --- packages/asset-buyer/src/asset_buyer.ts | 1 + 1 file changed, 1 insertion(+) 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 { const shouldForceOrderRefresh = options.shouldForceOrderRefresh !== undefined ? options.shouldForceOrderRefresh : false; + assert.isString('assetData', assetData); assetDataUtils.decodeAssetDataOrThrow(assetData); assert.isBoolean('options.shouldForceOrderRefresh', shouldForceOrderRefresh); -- cgit