From 518f351235d1a3380ca1b4c803a43f507e4e3b85 Mon Sep 17 00:00:00 2001 From: Lawrence Forman Date: Tue, 21 May 2019 22:10:33 -0400 Subject: [PATCH] `@0x/contracts-exchange`: Correct coding convention in `match_orders.ts` --- contracts/exchange/test/match_orders.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/exchange/test/match_orders.ts b/contracts/exchange/test/match_orders.ts index 35d79ae55f..a0d10a6fae 100644 --- a/contracts/exchange/test/match_orders.ts +++ b/contracts/exchange/test/match_orders.ts @@ -1374,11 +1374,11 @@ describe('matchOrders', () => { function getAssetData(tokenType: TokenType, ownerAddress: string): string { const encodeERC20AssetData = assetDataUtils.encodeERC20AssetData; const encodeERC721AssetData = assetDataUtils.encodeERC721AssetData; - if (tokenType in nameToERC20Tokens) { + if (nameToERC20Tokens[tokenType] !== undefined) { const tokenAddress = nameToERC20Tokens[tokenType]; return encodeERC20AssetData(tokenAddress); } - if (tokenType in nameToERC721Tokens) { + if (nameToERC721Tokens[tokenType] !== undefined) { const tokenAddress = nameToERC721Tokens[tokenType]; const tokenIdx = tokenType.charCodeAt(tokenType.length - 1) - 'A'.charCodeAt(0); const tokenId = erc721TokenIdsByOwner[ownerAddress][tokenAddress][tokenIdx];