aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-05-11 21:22:57 +0800
committerFabio Berger <me@fabioberger.com>2018-05-11 21:22:57 +0800
commita7daea172865b099e4e457f91602eeec767b231f (patch)
tree0a8fe09c4f9c8594133272e72aa01a491fcd29a8
parentc4416f9696f2ef3341a77773f1c1b2a49a24edf5 (diff)
downloaddexon-0x-contracts-a7daea172865b099e4e457f91602eeec767b231f.tar.gz
dexon-0x-contracts-a7daea172865b099e4e457f91602eeec767b231f.tar.zst
dexon-0x-contracts-a7daea172865b099e4e457f91602eeec767b231f.zip
Remove unused methods and imports
-rw-r--r--packages/contract-wrappers/src/contract_wrappers.ts26
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts6
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