mirror of https://github.com/status-im/web3.js.git
fixed callback for allEvents
This commit is contained in:
parent
3fe001c235
commit
92263e001b
|
@ -357,7 +357,7 @@ var formatInputDynamicBytes = function (value) {
|
|||
var result = utils.toHex(value).substr(2);
|
||||
var length = result.length / 2;
|
||||
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);
|
||||
};
|
||||
|
||||
|
@ -1650,6 +1650,13 @@ AllSolidityEvents.prototype.decode = function (data) {
|
|||
};
|
||||
|
||||
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 formatter = this.decode.bind(this);
|
||||
return new Filter(o, watches.eth(), formatter, callback);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -357,7 +357,7 @@ var formatInputDynamicBytes = function (value) {
|
|||
var result = utils.toHex(value).substr(2);
|
||||
var length = result.length / 2;
|
||||
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);
|
||||
};
|
||||
|
||||
|
@ -1650,6 +1650,13 @@ AllSolidityEvents.prototype.decode = function (data) {
|
|||
};
|
||||
|
||||
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 formatter = this.decode.bind(this);
|
||||
return new Filter(o, watches.eth(), formatter, callback);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -66,6 +66,13 @@ AllSolidityEvents.prototype.decode = function (data) {
|
|||
};
|
||||
|
||||
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 formatter = this.decode.bind(this);
|
||||
return new Filter(o, watches.eth(), formatter, callback);
|
||||
|
|
Loading…
Reference in New Issue