wallet: Make and record an init-messenger pattern decision
维护者通常 1 天内回复
@grypez 已经在做这个了。
开始于 2026年5月26日。
评估
这个 Issue 还没有评估数据。
描述
Problem
The extension and mobile clients both create two restricted messengers per controller: a controller messenger (runtime, narrow privileges) and an init messenger (boot-only, broader privileges for one-shot setup steps). The wallet currently uses a single messenger per controller. Whether to adopt the two-messenger pattern is unresolved and undocumented. Without a written decision, every new controller wired into the wallet inherits this ambiguity silently.
Proposed direction
Evaluate the trade-offs and write a short decision document (init-messenger-decision.md) in the wallet package recording the chosen approach and the concrete conditions under which it should be revisited. Link from the package README.
To inform the decision, gather empirical data on which messenger actions are invoked during init() vs. at runtime across the controllers already wired (see sub-issue for tooling). If the init-time and runtime allowlists are effectively the same, the two-messenger pattern adds boilerplate without narrowing any privileges — which favors deferring adoption.
Acceptance
- A decision is made and written down in
packages/wallet/init-messenger-decision.md. - The document covers: which pattern is chosen, why, and what conditions would trigger revisiting.
packages/wallet/README.mdlinks to the decision document.
Context
- Extension reference:
app/scripts/messenger-client-init/—getInitMessenger/getMessengerfactory pattern. - Mobile reference:
app/core/Engine/messengers/— same dual-factory convention.
Subissues
- #8791
- 主要语言
- TypeScript
- 星标
- 422
- 派生
- 313
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 414
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
MetaMask/core 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
CI: "Validate changelog diffs" job fails on every fork-sourced pull request可能已有人在做 @Roxen-AS 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`可能已有人在做 @gaohan1994 于 21 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
[utils] Replace the `uuid` dependency with `crypto.randomUUID()`可能已有人在做 @avantikonde 于 34 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
MetaMask/core#10210 · 1 个 reaction ·
维护者通常 1 天内回复
-
[utils] `toWei` accepts fractional wei and returns wrong values可能已有人在做 @Roxen-AS 于 20 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
相似的 Issue
-
enhancement module: library-ui
难度 2/5 1-3 小时 新手友好度 65/100
chthollyphile/folia-major#1206 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
typescript-eslint/typescript-eslint#13189 ·
维护者通常 2 天内回复
-
severity:medium triage:confirmed triage:in-progress triage:reproduced
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
wrong type
难度 2/5 1-3 小时 新手友好度 70/100
elastic/elasticsearch-specification#6919 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复