"eth_uninstallFilter" synchronous request error [#4873]
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
b34744133b
commit
4c3b9e1555
|
@ -37,6 +37,8 @@ function getSyncResponse (payload) {
|
||||||
return web3Response(payload, currentAccountAddress)
|
return web3Response(payload, currentAccountAddress)
|
||||||
} else if (payload.method == "net_version"){
|
} else if (payload.method == "net_version"){
|
||||||
return web3Response(payload, networkId)
|
return web3Response(payload, networkId)
|
||||||
|
} else if (payload.method == "eth_uninstallFilter"){
|
||||||
|
return web3Response(payload, true);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +46,9 @@ function getSyncResponse (payload) {
|
||||||
|
|
||||||
StatusHttpProvider.prototype.send = function (payload) {
|
StatusHttpProvider.prototype.send = function (payload) {
|
||||||
//TODO to be compatible with MM https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#dizzy-all-async---think-of-metamask-as-a-light-client
|
//TODO to be compatible with MM https://github.com/MetaMask/faq/blob/master/DEVELOPERS.md#dizzy-all-async---think-of-metamask-as-a-light-client
|
||||||
|
if (payload.method == "eth_uninstallFilter"){
|
||||||
|
this.sendAsync(payload, function (res, err) {})
|
||||||
|
}
|
||||||
var syncResponse = getSyncResponse(payload);
|
var syncResponse = getSyncResponse(payload);
|
||||||
if (syncResponse){
|
if (syncResponse){
|
||||||
return syncResponse;
|
return syncResponse;
|
||||||
|
@ -55,7 +60,7 @@ StatusHttpProvider.prototype.send = function (payload) {
|
||||||
|
|
||||||
StatusHttpProvider.prototype.sendAsync = function (payload, callback) {
|
StatusHttpProvider.prototype.sendAsync = function (payload, callback) {
|
||||||
var syncResponse = getSyncResponse(payload);
|
var syncResponse = getSyncResponse(payload);
|
||||||
if (syncResponse){
|
if (syncResponse && callback){
|
||||||
callback(null, syncResponse);
|
callback(null, syncResponse);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue