diff options
-rw-r--r-- | packages/contract-wrappers/src/contract_wrappers.ts | 26 | ||||
-rw-r--r-- | packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | 6 |
2 files changed, 1 insertions, 31 deletions
diff --git a/packages/contract-wrappers/src/contract_wrappers.ts b/packages/contract-wrappers/src/contract_wrappers.ts index 89a36ecbe..2ef050f27 100644 --- a/packages/contract-wrappers/src/contract_wrappers.ts +++ b/packages/contract-wrappers/src/contract_wrappers.ts @@ -1,15 +1,5 @@ -import { schemas, SchemaValidator } from '@0xproject/json-schemas'; -import { - generatePseudoRandomSalt, - getOrderHashHex, - isValidOrderHash, - isValidSignature, - signOrderHashAsync, -} from '@0xproject/order-utils'; -import { ECSignature, Order, Provider, SignedOrder, TransactionReceiptWithDecodedLogs } from '@0xproject/types'; -import { AbiDecoder, BigNumber, intervalUtils } from '@0xproject/utils'; +import { Provider } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; import { artifacts } from './artifacts'; @@ -23,10 +13,6 @@ import { contractWrappersPrivateNetworkConfigSchema } from './schemas/contract_w import { contractWrappersPublicNetworkConfigSchema } from './schemas/contract_wrappers_public_network_config_schema'; import { ContractWrappersConfig } from './types'; import { assert } from './utils/assert'; -import { constants } from './utils/constants'; -import { decorators } from './utils/decorators'; -import { utils } from './utils/utils'; - /** * The ContractWrappers class contains smart contract wrappers helpful when building on 0x protocol. */ @@ -123,14 +109,4 @@ export class ContractWrappers { public getProvider(): Provider { return this._web3Wrapper.getProvider(); } - /* - * HACK: `TokenWrapper` needs a token transfer proxy address. `TokenTransferProxy` address is fetched from - * an `ExchangeWrapper`. `ExchangeWrapper` needs `TokenWrapper` to validate orders, creating a dependency cycle. - * In order to break this - we create this function here and pass it as a parameter to the `TokenWrapper` - * and `ProxyWrapper`. - */ - private async _getTokenTransferProxyAddressAsync(): Promise<string> { - const tokenTransferProxyAddress = await (this.exchange as any)._getTokenTransferProxyAddressAsync(); - return tokenTransferProxyAddress; - } } diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index f2b64fc37..fc177dd42 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -936,10 +936,4 @@ export class ExchangeWrapper extends ContractWrapper { this._exchangeContractIfExists = contractInstance; return this._exchangeContractIfExists; } - private async _getTokenTransferProxyAddressAsync(): Promise<string> { - const exchangeInstance = await this._getExchangeContractAsync(); - const tokenTransferProxyAddress = await exchangeInstance.TOKEN_TRANSFER_PROXY_CONTRACT.callAsync(); - const tokenTransferProxyAddressLowerCase = tokenTransferProxyAddress.toLowerCase(); - return tokenTransferProxyAddressLowerCase; - } } // tslint:disable:max-file-line-count |