mirror of https://github.com/status-im/web3.js.git
add uninstall filter back
Conflicts: dist/ethereum.js.map dist/ethereum.min.js
This commit is contained in:
parent
89b1ca6f43
commit
6b07920aa5
|
@ -2192,13 +2192,18 @@ var filter = function(options, implementation, formatter) {
|
|||
});
|
||||
};
|
||||
|
||||
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
|
||||
|
||||
var watch = function(callback) {
|
||||
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
|
||||
callbacks.push(callback);
|
||||
};
|
||||
|
||||
var stopWatching = function() {
|
||||
implementation.stopPolling(filterId);
|
||||
callbacks = [];
|
||||
};
|
||||
|
||||
var uninstall = function() {
|
||||
implementation.stopPolling(filterId);
|
||||
implementation.uninstallFilter(filterId);
|
||||
callbacks = [];
|
||||
|
@ -2216,6 +2221,7 @@ var filter = function(options, implementation, formatter) {
|
|||
watch: watch,
|
||||
stopWatching: stopWatching,
|
||||
get: get,
|
||||
uninstall: uninstall,
|
||||
|
||||
// DEPRECATED methods
|
||||
changed: function(){
|
||||
|
@ -2230,10 +2236,6 @@ var filter = function(options, implementation, formatter) {
|
|||
console.warn('watch().happened() is deprecated please use filter().watch() instead.');
|
||||
return watch.apply(this, arguments);
|
||||
},
|
||||
uninstall: function(){
|
||||
console.warn('watch().uninstall() is deprecated please use filter().stopWatching() instead.');
|
||||
return stopWatching.apply(this, arguments);
|
||||
},
|
||||
messages: function(){
|
||||
console.warn('watch().messages() is deprecated please use filter().get() instead.');
|
||||
return get.apply(this, arguments);
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -119,13 +119,18 @@ var filter = function(options, implementation, formatter) {
|
|||
});
|
||||
};
|
||||
|
||||
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
|
||||
|
||||
var watch = function(callback) {
|
||||
implementation.startPolling(filterId, onMessages, implementation.uninstallFilter);
|
||||
callbacks.push(callback);
|
||||
};
|
||||
|
||||
var stopWatching = function() {
|
||||
implementation.stopPolling(filterId);
|
||||
callbacks = [];
|
||||
};
|
||||
|
||||
var uninstall = function() {
|
||||
implementation.stopPolling(filterId);
|
||||
implementation.uninstallFilter(filterId);
|
||||
callbacks = [];
|
||||
|
@ -143,6 +148,7 @@ var filter = function(options, implementation, formatter) {
|
|||
watch: watch,
|
||||
stopWatching: stopWatching,
|
||||
get: get,
|
||||
uninstall: uninstall,
|
||||
|
||||
// DEPRECATED methods
|
||||
changed: function(){
|
||||
|
@ -157,10 +163,6 @@ var filter = function(options, implementation, formatter) {
|
|||
console.warn('watch().happened() is deprecated please use filter().watch() instead.');
|
||||
return watch.apply(this, arguments);
|
||||
},
|
||||
uninstall: function(){
|
||||
console.warn('watch().uninstall() is deprecated please use filter().stopWatching() instead.');
|
||||
return stopWatching.apply(this, arguments);
|
||||
},
|
||||
messages: function(){
|
||||
console.warn('watch().messages() is deprecated please use filter().get() instead.');
|
||||
return get.apply(this, arguments);
|
||||
|
|
Loading…
Reference in New Issue