From a1acf19ff3c1948214dde05a91eb3fbeac728d2c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Wed, 18 Jul 2018 15:48:23 +0200 Subject: Fix a bad merge --- packages/fill-scenarios/src/fill_scenarios.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'packages/fill-scenarios/src') diff --git a/packages/fill-scenarios/src/fill_scenarios.ts b/packages/fill-scenarios/src/fill_scenarios.ts index 8294657e7..8f2766e24 100644 --- a/packages/fill-scenarios/src/fill_scenarios.ts +++ b/packages/fill-scenarios/src/fill_scenarios.ts @@ -1,4 +1,4 @@ -import { assetProxyUtils, orderFactory } from '@0xproject/order-utils'; +import { assetDataUtils, orderFactory } from '@0xproject/order-utils'; import { AssetProxyId, ERC721AssetData, OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; @@ -12,13 +12,13 @@ import { DummyERC721TokenContract } from './generated_contract_wrappers/dummy_er import { ExchangeContract } from './generated_contract_wrappers/exchange'; export class FillScenarios { - private _web3Wrapper: Web3Wrapper; - private _userAddresses: string[]; - private _coinbase: string; - private _zrxTokenAddress: string; - private _exchangeAddress: string; - private _erc20ProxyAddress: string; - private _erc721ProxyAddress: string; + private readonly _web3Wrapper: Web3Wrapper; + private readonly _userAddresses: string[]; + private readonly _coinbase: string; + private readonly _zrxTokenAddress: string; + private readonly _exchangeAddress: string; + private readonly _erc20ProxyAddress: string; + private readonly _erc721ProxyAddress: string; constructor( provider: Provider, userAddresses: string[], @@ -151,7 +151,7 @@ export class FillScenarios { feeRecepientAddress: string, expirationTimeSeconds?: BigNumber, ): Promise { - const decodedMakerAssetData = assetProxyUtils.decodeAssetDataOrThrow(makerAssetData); + const decodedMakerAssetData = assetDataUtils.decodeAssetDataOrThrow(makerAssetData); if (decodedMakerAssetData.assetProxyId === AssetProxyId.ERC20) { await this._increaseERC20BalanceAndAllowanceAsync( decodedMakerAssetData.tokenAddress, @@ -165,10 +165,11 @@ export class FillScenarios { await this._increaseERC721BalanceAndAllowanceAsync( decodedMakerAssetData.tokenAddress, makerAddress, + // tslint:disable-next-line:no-unnecessary-type-assertion (decodedMakerAssetData as ERC721AssetData).tokenId, ); } - const decodedTakerAssetData = assetProxyUtils.decodeAssetDataOrThrow(takerAssetData); + const decodedTakerAssetData = assetDataUtils.decodeAssetDataOrThrow(takerAssetData); if (decodedTakerAssetData.assetProxyId === AssetProxyId.ERC20) { const takerTokenAddress = decodedTakerAssetData.tokenAddress; await this._increaseERC20BalanceAndAllowanceAsync(takerTokenAddress, takerAddress, takerFillableAmount); @@ -179,6 +180,7 @@ export class FillScenarios { await this._increaseERC721BalanceAndAllowanceAsync( decodedTakerAssetData.tokenAddress, takerAddress, + // tslint:disable-next-line:no-unnecessary-type-assertion (decodedMakerAssetData as ERC721AssetData).tokenId, ); } -- cgit