Use proper values for nonce/gasPrice/gasLimit for transactions in VM mode

pull/1/head
Alex Beregszaszi 8 years ago
parent 36682d2111
commit d5b9ea91c5
  1. 6
      src/universal-dapp.js

@ -672,9 +672,9 @@ UniversalDApp.prototype.runTx = function (data, args, cb) {
var address = self.options.getAddress ? self.options.getAddress() : self.getAccounts()[0]; var address = self.options.getAddress ? self.options.getAddress() : self.getAccounts()[0];
var account = self.accounts[address]; var account = self.accounts[address];
tx = new EthJSTX({ tx = new EthJSTX({
nonce: new Buffer([account.nonce++]), // @todo count beyond 255 nonce: new BN(account.nonce++),
gasPrice: 1, gasPrice: new BN(1),
gasLimit: gasLimit, gasLimit: new BN(gasLimit, 10),
to: to, to: to,
value: new BN(value, 10), value: new BN(value, 10),
data: new Buffer(data.slice(2), 'hex') data: new Buffer(data.slice(2), 'hex')

Loading…
Cancel
Save