1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-30 08:09:15 +01:00
metamask-extension/app/scripts/lib
Erik Marks fc1ffae406
Add subject types (#13026)
This PR introduces the concept of subject _types_ to be associated with each subject in the `SubjectMetadataController`, and used for control flow in our RPC stack (`setupProviderEngine` and so forth).

We already differentiate between "types" of subjects in various places on an ad hoc basis via boolean flags (e.g. `isInternal` in our RPC stack) or the presence/absence of certain values in the subject's metadata (specifically `metadata.extensionId`). The status quo is manageable if not ideal, but will start to become untenable with the introduction of Snaps in the near future.

Therefore, this PR establishes a `SUBJECT_TYPES` enum and adds the `subjectType` property to the metadata of each subject. A new migration is added to accomplish this. Finally, we specify and `INTERNAL` subject type to distinguish internal from external requests.
2021-12-08 15:37:29 -08:00
..
ens-ipfs Revert "Feat/collectibles display (#12873)" (#12934) 2021-12-01 17:46:26 -06:00
migrator Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
rpc-method-middleware Add subject types (#13026) 2021-12-08 15:37:29 -08:00
account-tracker.js Setting balance to 0x0 when the original value is undefined (#10634) 2021-03-12 10:20:33 -05:00
buy-eth-url.js Use v2 API for fiat onboarding URL creation, fix wrapping / unwrapping (#12729) 2021-11-17 18:04:50 +01:00
buy-eth-url.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06: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 Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
ComposableObservableStore.js Added getPersistentState support for V2 controllers persist metadata (#12007) 2021-09-05 19:33:37 -07:00
ComposableObservableStore.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
createLoggerMiddleware.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
createMetaRPCHandler.js Remove nodeify (#13003) 2021-12-08 18:06:53 -03:30
createMetaRPCHandler.test.js Remove nodeify (#13003) 2021-12-08 18:06:53 -03:30
createOnboardingMiddleware.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
createOriginMiddleware.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
createStreamSink.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
createTabIdMiddleware.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
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 @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
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 @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
local-store.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
message-manager.js Fix: eth_sign does not validate input (#12679) 2021-11-19 17:05:24 +01:00
message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
metaRPCClientFactory.js fix metaRPCClientFactory id handling (#11116) 2021-05-17 14:46:00 -07:00
metaRPCClientFactory.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
network-store.js Using values from shared/constants/time to represent timing values (#11241) 2021-06-10 12:27:03 -07:00
notification-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
personal-message-manager.js Fix: eth_sign does not validate input (#12679) 2021-11-19 17:05:24 +01:00
personal-message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
seed-phrase-verifier.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
seed-phrase-verifier.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
segment.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
setupSentry.js Add build type to Sentry environment (#12441) 2021-10-25 14:27:30 -02:30
stream-utils.js @metamask/eslint config@5.0.0 (#10358) 2021-02-04 10:15:23 -08:00
typed-message-manager.js Reject popup confirmations on close (#12643) 2021-11-15 17:13:51 +01:00
typed-message-manager.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00
util.js Improve browser detection code (#12456) 2021-11-05 17:28:44 -07:00
util.test.js Jestify app/scripts/lib/**/*.test.js (#12890) 2021-12-06 10:40:39 -06:00