aboutsummaryrefslogtreecommitdiffstats
path: root/src/contract_wrappers
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-05 02:12:56 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-05 02:12:56 +0800
commit4ebf046cea8ff510567b5d05d188cd9f84ad1988 (patch)
treedcf9d9d55a92c9d3a813db9789704990620c9629 /src/contract_wrappers
parent43bebf6d61be47ecab977ea328f580c4588b4804 (diff)
downloaddexon-0x-contracts-4ebf046cea8ff510567b5d05d188cd9f84ad1988.tar.gz
dexon-0x-contracts-4ebf046cea8ff510567b5d05d188cd9f84ad1988.tar.zst
dexon-0x-contracts-4ebf046cea8ff510567b5d05d188cd9f84ad1988.zip
Make invalidateContractInstancesAsync private on exchange and token
Diffstat (limited to 'src/contract_wrappers')
-rw-r--r--src/contract_wrappers/exchange_wrapper.ts8
-rw-r--r--src/contract_wrappers/token_wrapper.ts8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/contract_wrappers/exchange_wrapper.ts b/src/contract_wrappers/exchange_wrapper.ts
index 9d9428327..72f00ee91 100644
--- a/src/contract_wrappers/exchange_wrapper.ts
+++ b/src/contract_wrappers/exchange_wrapper.ts
@@ -92,10 +92,6 @@ export class ExchangeWrapper extends ContractWrapper {
this._exchangeLogEventEmitters = [];
this._exchangeContractByAddress = {};
}
- public async invalidateContractInstancesAsync(): Promise<void> {
- await this.stopWatchingAllEventsAsync();
- this._exchangeContractByAddress = {};
- }
/**
* Returns the unavailable takerAmount of an order. Unavailable amount is defined as the total
* amount that has been filled or cancelled. The remaining takerAmount can be calculated by
@@ -658,6 +654,10 @@ export class ExchangeWrapper extends ContractWrapper {
await Promise.all(stopWatchingPromises);
this._exchangeLogEventEmitters = [];
}
+ private async _invalidateContractInstancesAsync(): Promise<void> {
+ await this.stopWatchingAllEventsAsync();
+ this._exchangeContractByAddress = {};
+ }
private async _isExchangeContractAddressProxyAuthorizedAsync(exchangeContractAddress: string): Promise<boolean> {
const isAuthorized = await this._proxyWrapper.isAuthorizedAsync(exchangeContractAddress);
return isAuthorized;
diff --git a/src/contract_wrappers/token_wrapper.ts b/src/contract_wrappers/token_wrapper.ts
index 1ad1cd9d6..fdf711823 100644
--- a/src/contract_wrappers/token_wrapper.ts
+++ b/src/contract_wrappers/token_wrapper.ts
@@ -36,10 +36,6 @@ export class TokenWrapper extends ContractWrapper {
this._tokenContractsByAddress = {};
this._tokenLogEventEmitters = [];
}
- public async invalidateContractInstancesAsync(): Promise<void> {
- await this.stopWatchingAllEventsAsync();
- this._tokenContractsByAddress = {};
- }
/**
* Retrieves an owner's ERC20 token balance.
* @param tokenAddress The hex encoded contract Ethereum address where the ERC20 token is deployed.
@@ -236,6 +232,10 @@ export class TokenWrapper extends ContractWrapper {
await Promise.all(stopWatchingPromises);
this._tokenLogEventEmitters = [];
}
+ private async _invalidateContractInstancesAsync(): Promise<void> {
+ await this.stopWatchingAllEventsAsync();
+ this._tokenContractsByAddress = {};
+ }
private async _getTokenContractAsync(tokenAddress: string): Promise<TokenContract> {
let tokenContract = this._tokenContractsByAddress[tokenAddress];
if (!_.isUndefined(tokenContract)) {