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 account = self.accounts[address];
tx = new EthJSTX({
nonce: new Buffer([account.nonce++]), // @todo count beyond 255
gasPrice: 1,
gasLimit: gasLimit,
nonce: new BN(account.nonce++),
gasPrice: new BN(1),
gasLimit: new BN(gasLimit, 10),
to: to,
value: new BN(value, 10),
data: new Buffer(data.slice(2), 'hex')

Loading…
Cancel
Save