Commit 477430e6 authored by Alex Beregszaszi's avatar Alex Beregszaszi

Move BN define to the proper place in udapp

parent 3e0cd141
......@@ -4,6 +4,7 @@ var ethJSUtil = require('ethereumjs-util');
var EthJSTX = require('ethereumjs-tx');
var ethJSABI = require('ethereumjs-abi');
var EthJSBlock = require('ethereumjs-block');
var BN = ethJSUtil.BN;
function UniversalDApp (contracts, options) {
this.options = options || {};
......@@ -22,7 +23,6 @@ function UniversalDApp (contracts, options) {
this.accounts = {};
this.BN = ethJSUtil.BN;
this.vm = new EthJSVM(null, null, { activatePrecompiles: true });
this.addAccount('3cd7232cd6f3fc66a57a6bedc1a8ed6c228fff0a327e169c2bcc5e869ed49511');
......@@ -76,7 +76,7 @@ UniversalDApp.prototype.getBalance = function (address, cb) {
if (err) {
cb('Account not found');
} else {
cb(null, new ethJSUtil.BN(res).toString(10));
cb(null, new BN(res).toString(10));
}
});
}
......@@ -637,7 +637,7 @@ UniversalDApp.prototype.runTx = function (data, args, cb) {
gasPrice: 1,
gasLimit: 3000000000, // plenty
to: to,
value: new this.BN(value, 10),
value: new BN(value, 10),
data: new Buffer(data.slice(2), 'hex')
});
tx.sign(account.privateKey);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment