1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts/lib
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
..
ens-ipfs Add Skylink support to ENS resolver (#11401) 2021-07-16 10:22:04 -05:00
migrator Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
rpc-method-middleware Add RPC method handler hook selection (#12664) 2021-11-15 15:11:51 -08:00
account-tracker.js
buy-eth-url.js Call Wyre’s API via our backend to generate Wyre’s Checkout URL (#11387) 2021-06-25 09:52:29 -05:00
buy-eth-url.test.js Call Wyre’s API via our backend to generate Wyre’s Checkout URL (#11387) 2021-06-25 09:52:29 -05:00
cleanErrorStack.js Fix 12145 - Ledger errors being set as Error: [object, object] (#12176) 2021-09-22 10:41:23 -07:00
cleanErrorStack.test.js Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
ComposableObservableStore.js Added getPersistentState support for V2 controllers persist metadata (#12007) 2021-09-05 19:33:37 -07:00
ComposableObservableStore.test.js Migrate to new CurrencyRateController (#11005) 2021-05-20 00:27:51 -02:30
createLoggerMiddleware.js
createMetaRPCHandler.js return early from metaRPCHandler if stream has ended (#11065) 2021-05-12 15:12:46 -07:00
createMetaRPCHandler.test.js return early from metaRPCHandler if stream has ended (#11065) 2021-05-12 15:12:46 -07:00
createOnboardingMiddleware.js
createOriginMiddleware.js
createStreamSink.js
createTabIdMiddleware.js
decrypt-message-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
encryption-public-key-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
extractEthjsErrorMessage.js
get-first-preferred-lang-code.js fix issue where regional locales are not matched against our locales list (#12403) 2021-10-19 14:32:13 -05:00
getObjStructure.js
local-store.js
message-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
message-manager.test.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
metaRPCClientFactory.js fix metaRPCClientFactory id handling (#11116) 2021-05-17 14:46:00 -07:00
metaRPCClientFactory.test.js fix metaRPCClientFactory id handling (#11116) 2021-05-17 14:46:00 -07:00
network-store.js Using values from shared/constants/time to represent timing values (#11241) 2021-06-10 12:27:03 -07:00
nodeify.js
nodeify.test.js Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
notification-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
personal-message-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
personal-message-manager.test.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
seed-phrase-verifier.js
seed-phrase-verifier.test.js Use strict assertion mode everywhere (#11012) 2021-05-07 17:08:24 -02:30
segment.js Using values from shared/constants/time to represent timing values (#11241) 2021-06-10 12:27:03 -07:00
setupSentry.js Add build type to Sentry environment (#12441) 2021-10-25 14:27:30 -02:30
stream-utils.js
typed-message-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
typed-message-manager.test.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
util.js Improve browser detection code (#12456) 2021-11-05 17:28:44 -07:00
util.test.js Improve browser detection code (#12456) 2021-11-05 17:28:44 -07:00