From c39301b6da9f51ebccf11f06865c439ffed7f8f6 Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Fri, 8 Jun 2018 11:04:07 -0700 Subject: Fixed assetProxyUtils for linter --- packages/order-utils/src/asset_proxy_utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/order-utils/src/asset_proxy_utils.ts b/packages/order-utils/src/asset_proxy_utils.ts index ee5fff1d2..915ee5032 100644 --- a/packages/order-utils/src/asset_proxy_utils.ts +++ b/packages/order-utils/src/asset_proxy_utils.ts @@ -109,7 +109,7 @@ export const assetProxyUtils = { ERC721_ASSET_DATA_TOKEN_ID_OFFSET, ); const proxyIdOffset = encodedAssetData.byteLength - 1; - const encodedAssetProxyId = encodedAssetData.slice(-1); + const encodedAssetProxyId = encodedAssetData.slice(proxyIdOffset); const assetProxyId = assetProxyUtils.decodeAssetProxyId(encodedAssetProxyId); if (assetProxyId !== AssetProxyId.ERC721) { throw new Error( @@ -141,7 +141,7 @@ export const assetProxyUtils = { } const encodedReceiverData = encodedAssetData.slice( ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET, - ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET + receiverDataLength.toNumber(), + receiverDataLength.add(ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET).toNumber(), ); receiverData = ethUtil.bufferToHex(encodedReceiverData); } -- cgit v1.2.3