Merge pull request #583 from 0xProject/bug/contracts/erc721-encoded-pad
ERC721Proxy Pad to 32 if asset ids are small
This commit is contained in:
@@ -18,7 +18,8 @@ export const assetProxyUtils = {
|
||||
encodeUint256(value: BigNumber): Buffer {
|
||||
const formattedValue = new BN(value.toString(10));
|
||||
const encodedValue = ethUtil.toBuffer(formattedValue);
|
||||
return encodedValue;
|
||||
const paddedValue = ethUtil.setLengthLeft(encodedValue, 32);
|
||||
return paddedValue;
|
||||
},
|
||||
encodeERC20ProxyData(tokenAddress: string): string {
|
||||
const encodedAssetProxyId = assetProxyUtils.encodeAssetProxyId(AssetProxyId.ERC20);
|
||||
|
Reference in New Issue
Block a user