From 2e5ff53d7271509accc226e83d76d1785350b1d2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 13 Jul 2018 12:42:01 +0200 Subject: -fetch'; --- packages/subproviders/test/integration/ledger_subprovider_test.ts | 7 ++----- packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) (limited to 'packages/subproviders/test') diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts index 196cecf32..e5233fdbc 100644 --- a/packages/subproviders/test/integration/ledger_subprovider_test.ts +++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts @@ -8,9 +8,8 @@ import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as ethUtils from 'ethereumjs-util'; import Web3ProviderEngine = require('web3-provider-engine'); -import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); -import { LedgerSubprovider } from '../../src'; +import { LedgerSubprovider, RPCSubprovider } from '../../src'; import { LedgerEthereumClient } from '../../src/types'; import { chaiSetup } from '../chai_setup'; import { fixtureData } from '../utils/fixture_data'; @@ -86,9 +85,7 @@ describe('LedgerSubprovider', () => { before(() => { ledgerProvider = new Web3ProviderEngine(); ledgerProvider.addProvider(ledgerSubprovider); - const httpProvider = new RpcSubprovider({ - rpcUrl: 'http://localhost:8545', - }); + const httpProvider = new RPCSubprovider('http://localhost:8545'); ledgerProvider.addProvider(httpProvider); ledgerProvider.start(); diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts index 810fb8f45..e3f204b15 100644 --- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts +++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts @@ -3,9 +3,8 @@ import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as Sinon from 'sinon'; import Web3ProviderEngine = require('web3-provider-engine'); -import RpcSubprovider = require('web3-provider-engine/subproviders/rpc'); -import { RedundantSubprovider } from '../../src'; +import { RedundantSubprovider, RPCSubprovider } from '../../src'; import { Subprovider } from '../../src/subproviders/subprovider'; import { chaiSetup } from '../chai_setup'; import { ganacheSubprovider } from '../utils/ganache_subprovider'; @@ -39,9 +38,7 @@ describe('RedundantSubprovider', () => { }); it('succeeds when supplied at least one healthy endpoint', (done: DoneCallback) => { provider = new Web3ProviderEngine(); - const nonExistentSubprovider = new RpcSubprovider({ - rpcUrl: 'http://does-not-exist:3000', - }); + const nonExistentSubprovider = new RPCSubprovider('http://does-not-exist:3000'); const handleRequestStub = Sinon.stub(nonExistentSubprovider, 'handleRequest').throws( new Error('REQUEST_FAILED'), ); -- cgit v1.2.3