aboutsummaryrefslogtreecommitdiffstats
path: root/packages/metacoin/test/utils/web3_wrapper.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/metacoin/test/utils/web3_wrapper.ts')
-rw-r--r--packages/metacoin/test/utils/web3_wrapper.ts12
1 files changed, 7 insertions, 5 deletions
diff --git a/packages/metacoin/test/utils/web3_wrapper.ts b/packages/metacoin/test/utils/web3_wrapper.ts
index b4bb61f09..724ed4e1f 100644
--- a/packages/metacoin/test/utils/web3_wrapper.ts
+++ b/packages/metacoin/test/utils/web3_wrapper.ts
@@ -1,5 +1,5 @@
import { env, EnvVars } from '@0xproject/dev-utils';
-import { GanacheSubprovider } from '@0xproject/subproviders';
+import { GanacheSubprovider, prependSubprovider } from '@0xproject/subproviders';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as fs from 'fs';
import * as _ from 'lodash';
@@ -9,10 +9,6 @@ import { config } from './config';
import { coverage } from './coverage';
export const provider = new ProviderEngine();
-const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage);
-if (isCoverageEnabled) {
- provider.addProvider(coverage.getCoverageSubproviderSingleton());
-}
provider.addProvider(
new GanacheSubprovider({
logger: {
@@ -27,4 +23,10 @@ provider.addProvider(
);
provider.start();
+const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage);
+if (isCoverageEnabled) {
+ const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
+ prependSubprovider(provider, coverageSubprovider);
+}
+
export const web3Wrapper = new Web3Wrapper(provider);