mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-24 20:37:17 +00:00
watches are calling callback with a single result object, not a full jsonrpc response
This commit is contained in:
parent
81bbe8c93b
commit
d0b6f3663b
12
dist/ethereum.js
vendored
12
dist/ethereum.js
vendored
@ -573,8 +573,10 @@ Filter.prototype.changed = function(callback) {
|
||||
|
||||
/// trigger calling new message from people
|
||||
Filter.prototype.trigger = function(messages) {
|
||||
for(var i = 0; i < this.callbacks.length; i++) {
|
||||
this.callbacks[i].call(this, messages);
|
||||
for (var i = 0; i < this.callbacks.length; i++) {
|
||||
for (var j = 0; j < messages; j++) {
|
||||
this.callbacks[i].call(this, messages[j]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@ -716,12 +718,12 @@ var ProviderManager = function() {
|
||||
|
||||
result = JSON.parse(result);
|
||||
|
||||
// dont call the callback if result is an error, empty array or false
|
||||
if (result.error || (result.result instanceof Array ? result.result.length === 0 : !result.result)) {
|
||||
// dont call the callback if result is not an array, or empty one
|
||||
if (result.error || !(result.result instanceof Array) || result.result.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
data.callback(result);
|
||||
data.callback(result.result);
|
||||
});
|
||||
}
|
||||
setTimeout(poll, 12000);
|
||||
|
6
dist/ethereum.js.map
vendored
6
dist/ethereum.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/ethereum.min.js
vendored
2
dist/ethereum.min.js
vendored
File diff suppressed because one or more lines are too long
@ -47,8 +47,10 @@ Filter.prototype.changed = function(callback) {
|
||||
|
||||
/// trigger calling new message from people
|
||||
Filter.prototype.trigger = function(messages) {
|
||||
for(var i = 0; i < this.callbacks.length; i++) {
|
||||
this.callbacks[i].call(this, messages);
|
||||
for (var i = 0; i < this.callbacks.length; i++) {
|
||||
for (var j = 0; j < messages; j++) {
|
||||
this.callbacks[i].call(this, messages[j]);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -49,12 +49,12 @@ var ProviderManager = function() {
|
||||
|
||||
result = JSON.parse(result);
|
||||
|
||||
// dont call the callback if result is an error, empty array or false
|
||||
if (result.error || (result.result instanceof Array ? result.result.length === 0 : !result.result)) {
|
||||
// dont call the callback if result is not an array, or empty one
|
||||
if (result.error || !(result.result instanceof Array) || result.result.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
data.callback(result);
|
||||
data.callback(result.result);
|
||||
});
|
||||
}
|
||||
setTimeout(poll, 12000);
|
||||
|
Loading…
Reference in New Issue
Block a user