diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-06-08 02:11:40 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-06-08 06:39:40 +0800 |
commit | f457a56d4a0a4e5a5b5b11289f65df64cf2c7f1f (patch) | |
tree | cb7b5a072cf546e132ed8e1ad4a7726474b339a0 /packages/order-utils | |
parent | db086de84ae7a238b91b5ce79fcc1a8e4c830ac5 (diff) | |
download | dexon-0x-contracts-f457a56d4a0a4e5a5b5b11289f65df64cf2c7f1f.tar.gz dexon-0x-contracts-f457a56d4a0a4e5a5b5b11289f65df64cf2c7f1f.tar.zst dexon-0x-contracts-f457a56d4a0a4e5a5b5b11289f65df64cf2c7f1f.zip |
Style updates to contracts
Diffstat (limited to 'packages/order-utils')
-rw-r--r-- | packages/order-utils/src/asset_proxy_utils.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/order-utils/src/asset_proxy_utils.ts b/packages/order-utils/src/asset_proxy_utils.ts index 1d34172c7..ed8832b18 100644 --- a/packages/order-utils/src/asset_proxy_utils.ts +++ b/packages/order-utils/src/asset_proxy_utils.ts @@ -4,6 +4,8 @@ import BN = require('bn.js'); import ethUtil = require('ethereumjs-util'); import * as _ from 'lodash'; +import { constants } from '../../src/utils/constants'; + const ERC20_ASSET_DATA_BYTE_LENGTH = 21; const ERC721_ASSET_DATA_BYTE_LENGTH = 53; @@ -117,8 +119,7 @@ export const assetProxyUtils = { const tokenAddress = assetProxyUtils.decodeAddress(encodedTokenAddress); const encodedTokenId = encodedAssetData.slice(tokenIdOffset, receiverDataLengthOffset); const tokenId = assetProxyUtils.decodeUint256(encodedTokenId); - const nullData = '0x'; - let receiverData = nullData; + let receiverData = constants.NULL_BYTE; const lengthUpToReceiverDataLength = receiverDataLengthOffset + 1; if (encodedAssetData.byteLength > lengthUpToReceiverDataLength) { const encodedReceiverDataLength = encodedAssetData.slice(receiverDataLengthOffset, receiverDataOffset); |