diff options
author | Fabio Berger <me@fabioberger.com> | 2018-06-26 02:17:00 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-06-26 02:17:00 +0800 |
commit | 1134ff107542d9014b195b6dc6ce6040752c92e3 (patch) | |
tree | 6a3b06b5a10f69817665b67fa63ce75be3790dc5 /packages/contracts | |
parent | 178676ef8c5a32cdb557d04a0658d0967b4b8a75 (diff) | |
download | dexon-sol-tools-1134ff107542d9014b195b6dc6ce6040752c92e3.tar.gz dexon-sol-tools-1134ff107542d9014b195b6dc6ce6040752c92e3.tar.zst dexon-sol-tools-1134ff107542d9014b195b6dc6ce6040752c92e3.zip |
Fix tslint issues
Diffstat (limited to 'packages/contracts')
7 files changed, 4 insertions, 22 deletions
diff --git a/packages/contracts/src/abstract/abstract_asset_wrapper.ts b/packages/contracts/src/abstract/abstract_asset_wrapper.ts index 521335f18..0a0b42eea 100644 --- a/packages/contracts/src/abstract/abstract_asset_wrapper.ts +++ b/packages/contracts/src/abstract/abstract_asset_wrapper.ts @@ -1,5 +1,3 @@ -import { BigNumber } from '@0xproject/utils'; - export abstract class AbstractAssetWrapper { public abstract getProxyId(): number; } diff --git a/packages/contracts/src/utils/asset_wrapper.ts b/packages/contracts/src/utils/asset_wrapper.ts index 9c683054d..d5ce8cf1e 100644 --- a/packages/contracts/src/utils/asset_wrapper.ts +++ b/packages/contracts/src/utils/asset_wrapper.ts @@ -113,7 +113,6 @@ export class AssetWrapper { const isProxyApprovedForAll = await assetWrapper.isProxyApprovedForAllAsync( userAddress, erc721ProxyData.tokenAddress, - erc721ProxyData.tokenId, ); if (isProxyApprovedForAll) { return constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS; @@ -169,7 +168,6 @@ export class AssetWrapper { const isProxyApprovedForAll = await erc721Wrapper.isProxyApprovedForAllAsync( userAddress, assetProxyData.tokenAddress, - assetProxyData.tokenId, ); if (!isProxyApprovedForAll && desiredAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)) { const isApproved = true; diff --git a/packages/contracts/src/utils/core_combinatorial_utils.ts b/packages/contracts/src/utils/core_combinatorial_utils.ts index aea9a65e7..a2d2a500b 100644 --- a/packages/contracts/src/utils/core_combinatorial_utils.ts +++ b/packages/contracts/src/utils/core_combinatorial_utils.ts @@ -6,11 +6,11 @@ import { OrderStateUtils, OrderValidationUtils, } from '@0xproject/order-utils'; -import { AssetProxyId, Order, SignatureType, SignedOrder } from '@0xproject/types'; +import { AssetProxyId, SignatureType, SignedOrder } from '@0xproject/types'; import { BigNumber, errorUtils, logUtils } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as chai from 'chai'; -import { BlockParamLiteral, LogWithDecodedArgs, Provider, TxData } from 'ethereum-types'; +import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types'; import * as _ from 'lodash'; import 'make-promises-safe'; @@ -36,7 +36,6 @@ import { FeeRecipientAddressScenario, FillScenario, OrderAssetAmountScenario, - OrderScenario, TakerAssetFillAmountScenario, TakerScenario, TraderStateScenario, @@ -290,7 +289,6 @@ export class CoreCombinatorialUtils { fillScenario.takerStateScenario, signedOrder, takerAssetFillAmount, - balanceAndProxyAllowanceFetcher, ); // 5. If I fill it by X, what are the resulting balances/allowances/filled amounts expected? @@ -325,7 +323,6 @@ export class CoreCombinatorialUtils { takerAssetFillAmount, lazyStore, fillRevertReasonIfExists, - provider, ); } private async _fillOrderAndAssertOutcomeAsync( @@ -333,7 +330,6 @@ export class CoreCombinatorialUtils { takerAssetFillAmount: BigNumber, lazyStore: BalanceAndProxyAllowanceLazyStore, fillRevertReasonIfExists: string | undefined, - provider: Provider, ): Promise<void> { if (!_.isUndefined(fillRevertReasonIfExists)) { return expectRevertReasonOrAlwaysFailingTransactionAsync( @@ -375,11 +371,6 @@ export class CoreCombinatorialUtils { signedOrder.makerAssetAmount, ); - const beforeMakerAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync( - makerAddress, - makerAssetData, - ); - // - Let's fill the order! const txReceipt = await this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, { takerAssetFillAmount, @@ -544,7 +535,6 @@ export class CoreCombinatorialUtils { takerStateScenario: TraderStateScenario, signedOrder: SignedOrder, takerAssetFillAmount: BigNumber, - balanceAndProxyAllowanceFetcher: SimpleAssetBalanceAndProxyAllowanceFetcher, ): Promise<void> { const makerAssetFillAmount = orderUtils.getPartialAmount( takerAssetFillAmount, diff --git a/packages/contracts/src/utils/erc721_wrapper.ts b/packages/contracts/src/utils/erc721_wrapper.ts index 6df9fa12e..e83e845a0 100644 --- a/packages/contracts/src/utils/erc721_wrapper.ts +++ b/packages/contracts/src/utils/erc721_wrapper.ts @@ -1,4 +1,4 @@ -import { assetProxyUtils, generatePseudoRandomSalt } from '@0xproject/order-utils'; +import { generatePseudoRandomSalt } from '@0xproject/order-utils'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Provider } from 'ethereum-types'; @@ -155,7 +155,6 @@ export class ERC721Wrapper { public async isProxyApprovedForAllAsync( userAddress: string, tokenAddress: string, - tokenId: BigNumber, ): Promise<boolean> { this._validateProxyContractExistsOrThrow(); const tokenContract = this._getTokenContractFromAssetData(tokenAddress); diff --git a/packages/contracts/test/exchange/combinatorial_tests.ts b/packages/contracts/test/exchange/combinatorial_tests.ts index 754af9b08..f5f795bbe 100644 --- a/packages/contracts/test/exchange/combinatorial_tests.ts +++ b/packages/contracts/test/exchange/combinatorial_tests.ts @@ -5,7 +5,7 @@ import { chaiSetup } from '../../src/utils/chai_setup'; import { CoreCombinatorialUtils, coreCombinatorialUtilsFactoryAsync } from '../../src/utils/core_combinatorial_utils'; import { provider, txDefaults, web3Wrapper } from '../../src/utils/web3_wrapper'; -import { FillScenario, OrderScenario, TakerAssetFillAmountScenario } from '../../src/utils/types'; +import { FillScenario } from '../../src/utils/types'; chaiSetup.configure(); const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index 449bc5601..b9ef0a652 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -14,7 +14,6 @@ import { ERC721ProxyContract } from '../../src/generated_contract_wrappers/e_r_c import { CancelContractEventArgs, ExchangeContract, - FillContractEventArgs, } from '../../src/generated_contract_wrappers/exchange'; import { artifacts } from '../../src/utils/artifacts'; import { diff --git a/packages/contracts/test/exchange/fill_order.ts b/packages/contracts/test/exchange/fill_order.ts index 56d7510f4..6f57ad9f4 100644 --- a/packages/contracts/test/exchange/fill_order.ts +++ b/packages/contracts/test/exchange/fill_order.ts @@ -1,5 +1,4 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import * as _ from 'lodash'; import { chaiSetup } from '../../src/utils/chai_setup'; import { CoreCombinatorialUtils, coreCombinatorialUtilsFactoryAsync } from '../../src/utils/core_combinatorial_utils'; @@ -12,7 +11,6 @@ import { ExpirationTimeSecondsScenario, FeeRecipientAddressScenario, OrderAssetAmountScenario, - OrderScenario, TakerAssetFillAmountScenario, TakerScenario, } from '../../src/utils/types'; |