From bcc588efe726751c100f020a219b79d8f2a31f03 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 29 Jun 2018 15:30:10 +0300 Subject: [PATCH] Add HACK comments --- .../src/contract_wrappers/erc20_proxy_wrapper.ts | 2 ++ .../src/contract_wrappers/erc20_token_wrapper.ts | 2 ++ .../src/contract_wrappers/erc721_proxy_wrapper.ts | 2 ++ .../src/contract_wrappers/erc721_token_wrapper.ts | 2 ++ 4 files changed, 8 insertions(+) diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index d1ec5b08a9..839248754d 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -49,6 +49,8 @@ export class ERC20ProxyWrapper extends ContractWrapper { const contractAddress = this._getContractAddress(artifacts.ERC20Proxy, this._contractAddressIfExists); return contractAddress; } + // HACK: We don't want this method to be visible to the other units within that package but not to the end user. + // TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused. // tslint:disable-next-line:no-unused-variable private _invalidateContractInstance(): void { delete this._erc20ProxyContractIfExists; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts index 014e96fa3d..49adba1f95 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts @@ -406,6 +406,8 @@ export class ERC20TokenWrapper extends ContractWrapper { ); return logs; } + // HACK: We don't want this method to be visible to the other units within that package but not to the end user. + // TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused. // tslint:disable-next-line:no-unused-variable private _invalidateContractInstances(): void { this.unsubscribeAll(); diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts index fbe32a7c50..fba995395b 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts @@ -49,6 +49,8 @@ export class ERC721ProxyWrapper extends ContractWrapper { const contractAddress = this._getContractAddress(artifacts.ERC721Proxy, this._contractAddressIfExists); return contractAddress; } + // HACK: We don't want this method to be visible to the other units within that package but not to the end user. + // TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused. // tslint:disable-next-line:no-unused-variable private _invalidateContractInstance(): void { delete this._erc721ProxyContractIfExists; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts index f32827191f..86c3e2d995 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts @@ -442,6 +442,8 @@ export class ERC721TokenWrapper extends ContractWrapper { ); return logs; } + // HACK: We don't want this method to be visible to the other units within that package but not to the end user. + // TS doesn't give that possibility and therefore we make it private and access it over an any cast. Because of that tslint sees it as unused. // tslint:disable-next-line:no-unused-variable private _invalidateContractInstances(): void { this.unsubscribeAll();