From 1043def46c137c9d308b3201eddc0d08afa34b10 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 6 Oct 2017 12:58:17 +0300 Subject: Install js-sha3 and use it for keccak256 --- src/contract_wrappers/contract_wrapper.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/contract_wrappers') diff --git a/src/contract_wrappers/contract_wrapper.ts b/src/contract_wrappers/contract_wrapper.ts index f3ebae871..0bd7cc8b1 100644 --- a/src/contract_wrappers/contract_wrapper.ts +++ b/src/contract_wrappers/contract_wrapper.ts @@ -38,9 +38,7 @@ export class ContractWrapper { protected _subscribe(address: string, eventName: ContractEvents, indexFilterValues: IndexedFilterValues, abi: Web3.ContractAbi, callback: EventCallback): string { - const filter = filterUtils.getFilter( - this._web3Wrapper.keccak256.bind(this._web3Wrapper), address, eventName, indexFilterValues, abi, - ); + const filter = filterUtils.getFilter(address, eventName, indexFilterValues, abi); if (_.isEmpty(this._filters)) { this._startBlockAndLogStream(); } @@ -62,10 +60,7 @@ export class ContractWrapper { protected async _getLogsAsync(address: string, eventName: ContractEvents, subscriptionOpts: SubscriptionOpts, indexFilterValues: IndexedFilterValues, abi: Web3.ContractAbi): Promise { - const filter = filterUtils.getFilter( - this._web3Wrapper.keccak256.bind(this._web3Wrapper), address, eventName, indexFilterValues, abi, - subscriptionOpts, - ); + const filter = filterUtils.getFilter(address, eventName, indexFilterValues, abi, subscriptionOpts); const logs = await this._web3Wrapper.getLogsAsync(filter); const logsWithDecodedArguments = _.map(logs, this._tryToDecodeLogOrNoop.bind(this)); return logsWithDecodedArguments; -- cgit v1.2.3