diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-06-09 02:04:07 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-06-09 02:04:07 +0800 |
commit | c39301b6da9f51ebccf11f06865c439ffed7f8f6 (patch) | |
tree | c1caaa3db6848c0497e00128c663316dba0290ba /packages/order-utils | |
parent | 05123ea6f48a71ac0a53dcadcbc5924cbd1d1486 (diff) | |
download | dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.tar dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.tar.gz dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.tar.bz2 dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.tar.lz dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.tar.xz dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.tar.zst dexon-sol-tools-c39301b6da9f51ebccf11f06865c439ffed7f8f6.zip |
Fixed assetProxyUtils for linter
Diffstat (limited to 'packages/order-utils')
-rw-r--r-- | packages/order-utils/src/asset_proxy_utils.ts | 4 |
1 files 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); } |