mirror of https://github.com/embarklabs/embark.git
enable comma separated keys in file
This commit is contained in:
parent
24c4c51232
commit
e470a63905
|
@ -60,7 +60,10 @@ class Provider {
|
|||
}
|
||||
if (accountConfig.privateKeyFile) {
|
||||
let fileContent = fs.readFileSync(fs.dappPath(accountConfig.privateKeyFile)).toString();
|
||||
return this.web3.eth.accounts.privateKeyToAccount(fileContent.trim());
|
||||
fileContent = fileContent.trim().split(/[,;]/);
|
||||
return fileContent.map(key => {
|
||||
return this.web3.eth.accounts.privateKeyToAccount(key);
|
||||
});
|
||||
}
|
||||
if (accountConfig.mnemonic) {
|
||||
const hdwallet = hdkey.fromMasterSeed(bip39.mnemonicToSeed(accountConfig.mnemonic.trim()));
|
||||
|
|
Loading…
Reference in New Issue