MetaMask / rpc-cap

A module for adding an object-capabilities system to any JSON-RPC API as middleware for json-rpc-engine
ISC License
32 stars 32 forks source link

Ensure filterParams is requiring params to include its children #53

Closed danfinlay closed 4 years ago

danfinlay commented 5 years ago

Add more tests of this variety: https://github.com/MetaMask/json-rpc-capabilities-middleware/blob/master/test/caveats.js#L62

It may help to define the caveat with isSuperset(b, a) instead of isSubset(a, b). Need to determine whether this is a readability improvement or a functional change.

rekmarks commented 4 years ago

This was solved by renaming filterParams to requireParams and adding some tests.