diff --git a/assets/js/app.js b/assets/js/app.js index a301a5e8bc..7fde21b504 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -672,6 +672,7 @@ vm: executionContext === 'vm', removable: false, getAddress: function(){ return $('#txorigin').val(); }, + getValue: function(){ return $('#value').val(); }, removable_instances: true, renderOutputModifier: function(contractName, $contractOutput) { var contract = data.contracts[contractName]; diff --git a/assets/js/universal-dapp.js b/assets/js/universal-dapp.js index 13d6263717..63af85b9a7 100644 --- a/assets/js/universal-dapp.js +++ b/assets/js/universal-dapp.js @@ -431,7 +431,7 @@ UniversalDApp.prototype.runTx = function( data, args, cb) { data = '0x' + data; var gas = self.options.getGas ? self.options.getGas : 1000000; - var value = self.options.getValue ? self.options.getValue : 0; + var value = self.options.getValue ? self.options.getValue() : 0; if (!this.vm) { var tx = { @@ -459,7 +459,7 @@ UniversalDApp.prototype.runTx = function( data, args, cb) { gasPrice: 1, gasLimit: 3000000000, //plenty to: to, - value: value, + value: new this.BN(value, 10), data: new Buffer(data.slice(2), 'hex') }); tx.sign(account.privateKey); diff --git a/index.html b/index.html index 41fbc94f78..72d4a4ccfe 100644 --- a/index.html +++ b/index.html @@ -80,8 +80,8 @@
-