Merge pull request #605 from embark-framework/bug_fix/balance-fix

set default balance when no one is there with simulator
This commit is contained in:
Jonathan Rainville 2018-07-06 10:47:14 -04:00 committed by GitHub
commit ffccbeabca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -72,6 +72,9 @@ class Test {
if (this.simOptions.accounts) { if (this.simOptions.accounts) {
this.simOptions.accounts = this.simOptions.accounts.map((account) => { this.simOptions.accounts = this.simOptions.accounts.map((account) => {
if (!account.hexBalance) {
account.hexBalance = '0x8AC7230489E80000'; // 10 ether
}
return {balance: account.hexBalance, secretKey: account.privateKey}; return {balance: account.hexBalance, secretKey: account.privateKey};
}); });
} }