1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

using a random account (of a list) to run the integration test #107

This commit is contained in:
Pedro Gutiérrez 2019-01-16 11:02:48 +01:00
parent b706f4852b
commit ff7dc04d28

View File

@ -4,12 +4,15 @@ import * as config from "./config/config.json"
if (process.env.SEED_WORDS) { if (process.env.SEED_WORDS) {
const seedphrase = process.env.SEED_WORDS const seedphrase = process.env.SEED_WORDS
// There are 20 accounts availabe (19 + 1)
const accountIndex = Math.floor(Math.random() ** 19)
// @ts-ignore // @ts-ignore
config.web3Provider = new HDWalletProvider( config.web3Provider = new HDWalletProvider(
seedphrase, seedphrase,
config.nodeUri, config.nodeUri,
0, 10, accountIndex,
2,
) )
} }