diff --git a/src/Eth.php b/src/Eth.php index 0a83902..25d12e7 100644 --- a/src/Eth.php +++ b/src/Eth.php @@ -275,7 +275,14 @@ class Eth ] ] ], - 'eth_newPendingTransactionFilter' => [] + 'eth_newPendingTransactionFilter' => [], + 'eth_uninstallFilter' => [ + 'params' => [ + [ + 'validators' => QuantityValidator::class + ] + ] + ], ]; /** diff --git a/test/unit/EthTest.php b/test/unit/EthTest.php index b2cd337..0a12ffa 100644 --- a/test/unit/EthTest.php +++ b/test/unit/EthTest.php @@ -917,6 +917,32 @@ class EthTest extends TestCase }); } + /** + * testUninstallFilter + * + * @return void + */ + public function testUninstallFilter() + { + $eth = $this->eth; + + $eth->uninstallFilter('0x01', function ($err, $filter) { + if ($err !== null) { + // infura banned us to uninstall filter + return $this->assertTrue($err->getCode() === 405); + } + if (isset($filter->result)) { + $this->assertTrue(is_string($filter->result)); + } else { + if (isset($filter->error)) { + $this->assertTrue(is_string($filter->error->message)); + } else { + $this->assertTrue(true); + } + } + }); + } + /** * testUnallowedMethod *