Fixed assetProxyUtils for linter

This commit is contained in:
Greg Hysen
2018-06-08 11:04:07 -07:00
parent 05123ea6f4
commit c39301b6da

View File

@@ -109,7 +109,7 @@ export const assetProxyUtils = {
ERC721_ASSET_DATA_TOKEN_ID_OFFSET, ERC721_ASSET_DATA_TOKEN_ID_OFFSET,
); );
const proxyIdOffset = encodedAssetData.byteLength - 1; const proxyIdOffset = encodedAssetData.byteLength - 1;
const encodedAssetProxyId = encodedAssetData.slice(-1); const encodedAssetProxyId = encodedAssetData.slice(proxyIdOffset);
const assetProxyId = assetProxyUtils.decodeAssetProxyId(encodedAssetProxyId); const assetProxyId = assetProxyUtils.decodeAssetProxyId(encodedAssetProxyId);
if (assetProxyId !== AssetProxyId.ERC721) { if (assetProxyId !== AssetProxyId.ERC721) {
throw new Error( throw new Error(
@@ -141,7 +141,7 @@ export const assetProxyUtils = {
} }
const encodedReceiverData = encodedAssetData.slice( const encodedReceiverData = encodedAssetData.slice(
ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET, 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); receiverData = ethUtil.bufferToHex(encodedReceiverData);
} }