1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
metamask-extension/app
Erik Marks 05fae3fa1e
Add RPC method handler hook selection (#12664)
Adds a property, `hookNames`, to each RPC method handler export in `app/scripts/lib/rpc-method-middleware` and a function, `selectHooks`, to select from them.

`createMethodMiddleware` receives a giant `opts` object that includes a bunch of different methods from `MetaMaskController` and its subcontrollers. Each method implementation only requires a subset of these methods to do its work. Because they need some kind of name, we call these methods "hooks". With this change, whenever an RPC method is called, `selectHooks` will be called to ensure that each method only receives the hooks that it needs in order to do its job.

This implementation is based on [work in `snaps-skunkworks`](https://github.com/MetaMask/snaps-skunkworks/blob/a3e1248/packages/rpc-methods/src/utils.ts#L17-L34) that will be merged in the near future.
2021-11-15 15:11:51 -08:00
..
_locales addresses an issue found in 10.6.0 QA (#12710) 2021-11-15 18:34:09 -03:30
build-types Add platform-specific build type manifest modifications (#12638) 2021-11-10 19:33:59 -03:30
fonts Add euclid fontface (#9018) 2020-07-27 17:15:44 -05:00
images Support for GridPlus Lattice1 hardware wallet (#12053) 2021-11-08 11:18:41 -03:30
manifest Add platform-specific build type manifest modifications (#12638) 2021-11-10 19:33:59 -03:30
scripts Add RPC method handler hook selection (#12664) 2021-11-15 15:11:51 -08:00
vendor/trezor Update postMessage structure for TrezorConnect 8 (#10192) 2021-01-21 11:12:54 -06:00
background.html Lavamoat build system integration for WebApp (#12242) 2021-10-05 12:06:31 -10:00
home.html Lavamoat build system integration for WebApp (#12242) 2021-10-05 12:06:31 -10:00
loading.html refactor & change html pages 2019-05-04 18:57:19 +02:00
notification.html Lavamoat build system integration for WebApp (#12242) 2021-10-05 12:06:31 -10:00
phishing.html lockdown - breakout making globalThis properties non-writable (#12258) 2021-10-01 08:53:12 -10:00
popup.html Lavamoat build system integration for WebApp (#12242) 2021-10-05 12:06:31 -10:00
trezor-usb-permissions.html trezor v5 working on firefox 2018-08-05 02:43:02 -04:00