From 7cc4a8f5cebb41ee5b9a37a1732d7f2af5d16d4a Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Tue, 30 Jan 2018 16:26:42 -0800 Subject: Fix lint errors --- packages/0x.js/src/contract_wrappers/contract_wrapper.ts | 2 +- packages/0x.js/src/contract_wrappers/ether_token_wrapper.ts | 6 +++--- packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 6 +++--- .../0x.js/src/contract_wrappers/generated/base_contract.ts | 12 ++++++------ packages/0x.js/src/contract_wrappers/token_wrapper.ts | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'packages/0x.js/src') 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 { 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; - protected async applyDefaultsToTxDataAsync( + protected _web3ContractInstance: Web3.ContractInstance; + protected _defaults: Partial; + protected async _applyDefaultsToTxDataAsync( txData: T, estimateGasAsync?: (txData: T) => Promise, ): Promise { @@ -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) { - 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 { -- cgit v1.2.3