diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-18 21:48:23 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-18 22:31:17 +0800 |
commit | a1acf19ff3c1948214dde05a91eb3fbeac728d2c (patch) | |
tree | 44789fff181ec24846728d885ba541c23f682321 /packages/fill-scenarios/src/fill_scenarios.ts | |
parent | 5044fe4fe4486f67408572cf6807482aecf7f6c9 (diff) | |
download | dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.tar dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.tar.gz dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.tar.bz2 dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.tar.lz dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.tar.xz dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.tar.zst dexon-sol-tools-a1acf19ff3c1948214dde05a91eb3fbeac728d2c.zip |
Fix a bad merge
Diffstat (limited to 'packages/fill-scenarios/src/fill_scenarios.ts')
-rw-r--r-- | packages/fill-scenarios/src/fill_scenarios.ts | 22 |
1 files changed, 12 insertions, 10 deletions
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<SignedOrder> { - 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, ); } |