aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-06-09 02:04:07 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-09 02:04:07 +0800
commitc39301b6da9f51ebccf11f06865c439ffed7f8f6 (patch)
treec1caaa3db6848c0497e00128c663316dba0290ba
parent05123ea6f48a71ac0a53dcadcbc5924cbd1d1486 (diff)
downloaddexon-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
-rw-r--r--packages/order-utils/src/asset_proxy_utils.ts4
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);
}