From d3adb48c2eefb5754acb654994cab3f1b94a2e38 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 10 May 2018 14:59:37 +0200 Subject: Fix no-any-propagation --- packages/0x.js/src/0x.ts | 4 ++-- packages/0x.js/test/0x.js_test.ts | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index e670bd0c5..7850a782d 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -163,7 +163,7 @@ export class ZeroEx { */ public async getAvailableAddressesAsync(): Promise { // Hack: Get Web3Wrapper from ZeroExContract - const web3Wrapper = (this._contractWrappers as any)._web3Wrapper; + const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper; const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); return availableAddresses; } @@ -204,7 +204,7 @@ export class ZeroEx { timeoutMs?: number, ): Promise { // Hack: Get Web3Wrapper from ZeroExContract - const web3Wrapper = (this._contractWrappers as any)._web3Wrapper; + const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper; const transactionReceiptWithDecodedLogs = await web3Wrapper.awaitTransactionMinedAsync( txHash, pollingIntervalMs, diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts index fe5948e00..0a708e94d 100644 --- a/packages/0x.js/test/0x.js_test.ts +++ b/packages/0x.js/test/0x.js_test.ts @@ -1,3 +1,4 @@ +import { ContractWrappers } from '@0xproject/contract-wrappers'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; @@ -42,7 +43,7 @@ describe('ZeroEx library', () => { expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.be.undefined(); // Check that all nested zeroExContract/web3Wrapper instances return the updated provider - const nestedWeb3WrapperProvider = (zeroEx as any)._contractWrappers.getProvider(); + const nestedWeb3WrapperProvider = ((zeroEx as any)._contractWrappers as ContractWrappers).getProvider(); expect(nestedWeb3WrapperProvider.zeroExTestId).to.be.a('number'); const exchangeWeb3WrapperProvider = (zeroEx.exchange as any)._web3Wrapper.getProvider(); expect(exchangeWeb3WrapperProvider.zeroExTestId).to.be.a('number'); -- cgit v1.2.3