Reduce the userAddresses to the individual addresses actually used by tests, as well as only deploy the number of ERC20 tokens needed for each test suite

This commit is contained in:
Fabio Berger
2018-06-28 10:43:37 +02:00
parent b56baefaa6
commit 646927962a
7 changed files with 32 additions and 19 deletions

View File

@@ -55,7 +55,8 @@ export async function coreCombinatorialUtilsFactoryAsync(
web3Wrapper: Web3Wrapper,
txDefaults: Partial<TxData>,
): Promise<CoreCombinatorialUtils> {
const userAddresses = await web3Wrapper.getAvailableAddressesAsync();
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const userAddresses = _.slice(accounts, 0, 5);
const [ownerAddress, makerAddress, takerAddress] = userAddresses;
const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];