Commit ad98394b authored by chriseth's avatar chriseth

Prefix data with 0x especially for estimateGas.

parent da1fee51
...@@ -409,6 +409,8 @@ UniversalDApp.prototype.runTx = function( data, args, cb) { ...@@ -409,6 +409,8 @@ UniversalDApp.prototype.runTx = function( data, args, cb) {
var to = args.address; var to = args.address;
var constant = args.abi.constant; var constant = args.abi.constant;
var isConstructor = args.bytecode !== undefined; var isConstructor = args.bytecode !== undefined;
if (data.slice(0, 2) != '0x')
data = '0x' + data;
var gas = self.options.getGas ? self.options.getGas : 1000000; 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;
......
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