watches are calling callback with a single result object, not a full jsonrpc response
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user