aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src/contract_wrappers
diff options
context:
space:
mode:
Diffstat (limited to 'packages/0x.js/src/contract_wrappers')
-rw-r--r--packages/0x.js/src/contract_wrappers/contract_wrapper.ts2
-rw-r--r--packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts6
-rw-r--r--packages/0x.js/src/contract_wrappers/exchange_wrapper.ts6
-rw-r--r--packages/0x.js/src/contract_wrappers/generated/base_contract.ts12
-rw-r--r--packages/0x.js/src/contract_wrappers/token_wrapper.ts6
5 files changed, 16 insertions, 16 deletions
diff --git a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts
index 5f11d810a..873489dc9 100644
--- a/packages/0x.js/src/contract_wrappers/contract_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/contract_wrapper.ts
@@ -52,7 +52,7 @@ export class ContractWrapper {
this._onLogAddedSubscriptionToken = undefined;
this._onLogRemovedSubscriptionToken = undefined;
}
- protected unsubscribeAll(): void {
+ protected _unsubscribeAll(): void {
const filterTokens = _.keys(this._filterCallbacks);
_.each(filterTokens, filterToken => {
this._unsubscribe(filterToken);
diff --git a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
index 8fa7aa78b..cbafcfe94 100644
--- a/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts
@@ -159,11 +159,11 @@ export class EtherTokenWrapper extends ContractWrapper {
/**
* Cancels all existing subscriptions
*/
- public unsubscribeAll(): void {
- super.unsubscribeAll();
+ public _unsubscribeAll(): void {
+ super._unsubscribeAll();
}
private _invalidateContractInstance(): void {
- this.unsubscribeAll();
+ this._unsubscribeAll();
this._etherTokenContractsByAddress = {};
}
private async _getEtherTokenContractAsync(etherTokenAddress: string): Promise<EtherTokenContract> {
diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
index fceab851a..63c0d073a 100644
--- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts
@@ -678,8 +678,8 @@ export class ExchangeWrapper extends ContractWrapper {
/**
* Cancels all existing subscriptions
*/
- public unsubscribeAll(): void {
- super.unsubscribeAll();
+ public _unsubscribeAll(): void {
+ super._unsubscribeAll();
}
/**
* Gets historical logs without creating a subscription
@@ -861,7 +861,7 @@ export class ExchangeWrapper extends ContractWrapper {
return contractAddress;
}
private _invalidateContractInstances(): void {
- this.unsubscribeAll();
+ this._unsubscribeAll();
delete this._exchangeContractIfExists;
}
private async _isValidSignatureUsingContractCallAsync(
diff --git a/packages/0x.js/src/contract_wrappers/generated/base_contract.ts b/packages/0x.js/src/contract_wrappers/generated/base_contract.ts
index 28a7e2f52..d8fac7eea 100644
--- a/packages/0x.js/src/contract_wrappers/generated/base_contract.ts
+++ b/packages/0x.js/src/contract_wrappers/generated/base_contract.ts
@@ -3,9 +3,9 @@ import * as _ from 'lodash';
import * as Web3 from 'web3';
export class BaseContract {
- protected web3ContractInstance: Web3.ContractInstance;
- protected defaults: Partial<TxData>;
- protected async applyDefaultsToTxDataAsync<T extends TxData|TxDataPayable>(
+ protected _web3ContractInstance: Web3.ContractInstance;
+ protected _defaults: Partial<TxData>;
+ protected async _applyDefaultsToTxDataAsync<T extends TxData|TxDataPayable>(
txData: T,
estimateGasAsync?: (txData: T) => Promise<number>,
): Promise<TxData> {
@@ -15,7 +15,7 @@ export class BaseContract {
// 3. Gas estimate calculation + safety margin
const removeUndefinedProperties = _.pickBy;
const txDataWithDefaults = {
- ...removeUndefinedProperties(this.defaults),
+ ...removeUndefinedProperties(this._defaults),
...removeUndefinedProperties(txData as any),
// HACK: TS can't prove that T is spreadable.
// Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged
@@ -27,7 +27,7 @@ export class BaseContract {
return txDataWithDefaults;
}
constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<TxData>) {
- this.web3ContractInstance = web3ContractInstance;
- this.defaults = defaults;
+ this._web3ContractInstance = web3ContractInstance;
+ this._defaults = defaults;
}
}
diff --git a/packages/0x.js/src/contract_wrappers/token_wrapper.ts b/packages/0x.js/src/contract_wrappers/token_wrapper.ts
index 4216ff462..98c24d059 100644
--- a/packages/0x.js/src/contract_wrappers/token_wrapper.ts
+++ b/packages/0x.js/src/contract_wrappers/token_wrapper.ts
@@ -342,8 +342,8 @@ export class TokenWrapper extends ContractWrapper {
/**
* Cancels all existing subscriptions
*/
- public unsubscribeAll(): void {
- super.unsubscribeAll();
+ public _unsubscribeAll(): void {
+ super._unsubscribeAll();
}
/**
* Gets historical logs without creating a subscription
@@ -374,7 +374,7 @@ export class TokenWrapper extends ContractWrapper {
return logs;
}
private _invalidateContractInstances(): void {
- this.unsubscribeAll();
+ this._unsubscribeAll();
this._tokenContractsByAddress = {};
}
private async _getTokenContractAsync(tokenAddress: string): Promise<TokenContract> {