|
|
|
@ -56,11 +56,12 @@ export class TxRunnerVM { |
|
|
|
|
|
|
|
|
|
runInVm (from, to, data, value, gasLimit, useCall, timestamp, callback) { |
|
|
|
|
const self = this |
|
|
|
|
let account = self.vmaccounts[from]
|
|
|
|
|
if (!account && useCall && Object.keys(self.vmaccounts).length) { |
|
|
|
|
let account |
|
|
|
|
if (!from && useCall && Object.keys(self.vmaccounts).length) { |
|
|
|
|
from = Object.keys(self.vmaccounts)[0] |
|
|
|
|
account = self.vmaccounts[from] |
|
|
|
|
} |
|
|
|
|
} else account = self.vmaccounts[from]
|
|
|
|
|
|
|
|
|
|
if (!account) { |
|
|
|
|
return callback('Invalid account selected') |
|
|
|
|
} |
|
|
|
|