Skip to content

Commit 897aa3f

Browse files
jrainville0x-r4bbit
authored andcommitted
fix(@embark-ganache): fix ganache having different node accounts
When using accounts, yes those account are always the same, but ganache still creates it's own accounts, with a random mnemonic. So Plugins that rely on the node accounts were crashing on second run, because the node accounts were no longer the same.
1 parent fde1eeb commit 897aa3f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/plugins/ganache/src/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ class Ganache {
5353
// => https://github.com/trufflesuite/ganache-cli/issues/558
5454
this.embark.fs.ensureDirSync(blockchainConfig.datadir);
5555

56-
const hasAccounts = blockchainConfig.accounts && blockchainConfig.accounts.length;
57-
5856
const isTest = this.embark.currentContext.includes('test');
5957

6058
this.currentProvider = ganache.provider({
@@ -65,7 +63,7 @@ class Ganache {
6563
network_id: blockchainConfig.networkId || 1337,
6664
db_path: isTest ? '' : blockchainConfig.datadir,
6765
default_balance_ether: '99999',
68-
mnemonic: hasAccounts || isTest ? '' : constants.blockchain.defaultMnemonic
66+
mnemonic: isTest ? '' : constants.blockchain.defaultMnemonic
6967
});
7068
return this.currentProvider;
7169
}

0 commit comments

Comments
 (0)