Rename useInProcessGanache to shouldUseInProcessGanache
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { web3Factory } from '@0xproject/dev-utils';
|
import { web3Factory } from '@0xproject/dev-utils';
|
||||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||||
|
|
||||||
const web3ProviderConfig = { useInProcessGanache: true };
|
const web3ProviderConfig = { shouldUseInProcessGanache: true };
|
||||||
export const web3 = web3Factory.create(web3ProviderConfig);
|
export const web3 = web3Factory.create(web3ProviderConfig);
|
||||||
export const web3Wrapper = new Web3Wrapper(web3.currentProvider);
|
export const web3Wrapper = new Web3Wrapper(web3.currentProvider);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ import * as Web3 from 'web3';
|
|||||||
|
|
||||||
export interface Web3Config {
|
export interface Web3Config {
|
||||||
hasAddresses?: boolean; // default: true
|
hasAddresses?: boolean; // default: true
|
||||||
useInProcessGanache?: boolean; // default: false
|
shouldUseInProcessGanache?: boolean; // default: false
|
||||||
}
|
}
|
||||||
|
|
||||||
export const web3Factory = {
|
export const web3Factory = {
|
||||||
@@ -48,8 +48,8 @@ export const web3Factory = {
|
|||||||
fs.appendFileSync('ganache.log', `${arg}\n`);
|
fs.appendFileSync('ganache.log', `${arg}\n`);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const useInProcessGanache = config.useInProcessGanache;
|
const shouldUseInProcessGanache = config.shouldUseInProcessGanache;
|
||||||
if (useInProcessGanache) {
|
if (shouldUseInProcessGanache) {
|
||||||
provider.addProvider(
|
provider.addProvider(
|
||||||
new GanacheSubprovider({
|
new GanacheSubprovider({
|
||||||
logger,
|
logger,
|
||||||
|
|||||||
Reference in New Issue
Block a user