fixed callback for allEvents

This commit is contained in:
Fabian Vogelsteller 2015-07-22 11:49:01 +02:00
parent 3fe001c235
commit 92263e001b
6 changed files with 32 additions and 10 deletions

9
dist/web3-light.js vendored
View File

@ -357,7 +357,7 @@ var formatInputDynamicBytes = function (value) {
var result = utils.toHex(value).substr(2); var result = utils.toHex(value).substr(2);
var length = result.length / 2; var length = result.length / 2;
var l = Math.floor((result.length + 63) / 64); var l = Math.floor((result.length + 63) / 64);
var result = utils.padRight(result, l * 64); result = utils.padRight(result, l * 64);
return new SolidityParam(formatInputInt(length).value + result, 32); return new SolidityParam(formatInputInt(length).value + result, 32);
}; };
@ -1650,6 +1650,13 @@ AllSolidityEvents.prototype.decode = function (data) {
}; };
AllSolidityEvents.prototype.execute = function (options, callback) { AllSolidityEvents.prototype.execute = function (options, callback) {
if (utils.isFunction(arguments[arguments.length - 1])) {
callback = arguments[arguments.length - 1];
if(arguments.length === 1)
options = null;
}
var o = this.encode(options); var o = this.encode(options);
var formatter = this.decode.bind(this); var formatter = this.decode.bind(this);
return new Filter(o, watches.eth(), formatter, callback); return new Filter(o, watches.eth(), formatter, callback);

File diff suppressed because one or more lines are too long

9
dist/web3.js vendored
View File

@ -357,7 +357,7 @@ var formatInputDynamicBytes = function (value) {
var result = utils.toHex(value).substr(2); var result = utils.toHex(value).substr(2);
var length = result.length / 2; var length = result.length / 2;
var l = Math.floor((result.length + 63) / 64); var l = Math.floor((result.length + 63) / 64);
var result = utils.padRight(result, l * 64); result = utils.padRight(result, l * 64);
return new SolidityParam(formatInputInt(length).value + result, 32); return new SolidityParam(formatInputInt(length).value + result, 32);
}; };
@ -1650,6 +1650,13 @@ AllSolidityEvents.prototype.decode = function (data) {
}; };
AllSolidityEvents.prototype.execute = function (options, callback) { AllSolidityEvents.prototype.execute = function (options, callback) {
if (utils.isFunction(arguments[arguments.length - 1])) {
callback = arguments[arguments.length - 1];
if(arguments.length === 1)
options = null;
}
var o = this.encode(options); var o = this.encode(options);
var formatter = this.decode.bind(this); var formatter = this.decode.bind(this);
return new Filter(o, watches.eth(), formatter, callback); return new Filter(o, watches.eth(), formatter, callback);

6
dist/web3.js.map vendored

File diff suppressed because one or more lines are too long

7
dist/web3.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -66,6 +66,13 @@ AllSolidityEvents.prototype.decode = function (data) {
}; };
AllSolidityEvents.prototype.execute = function (options, callback) { AllSolidityEvents.prototype.execute = function (options, callback) {
if (utils.isFunction(arguments[arguments.length - 1])) {
callback = arguments[arguments.length - 1];
if(arguments.length === 1)
options = null;
}
var o = this.encode(options); var o = this.encode(options);
var formatter = this.decode.bind(this); var formatter = this.decode.bind(this);
return new Filter(o, watches.eth(), formatter, callback); return new Filter(o, watches.eth(), formatter, callback);