Remove legacy global/selected-chain path from GasFeeController
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 55/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 冷清
- 技术栈
- typescript
调研方向
从 GasFeeController 和大型测试套件 GasFeeController.test.ts 开始,将 multichain 路径与 issue 中列出的 legacy global/selected-chain 用例分开。检查 transaction-controller 现有的 networkClientId 调用,然后移除 legacy surface 并更新测试,以确保每个 networkClientId 所需的流程仍然得到覆盖。
由索引模型根据 Issue 内容生成。
描述
Summary
GasFeeController supports two modes: the multichain path (fetchGasFeeEstimates({ networkClientId }) → gasFeeEstimatesByChainId[chainId]) and a legacy global/selected-chain path that predates multichain support. Remove the global path so the per-networkClientId route is the only one.
Surface to remove
- Constructor options:
getProvider,getChainId,getCurrentNetworkEIP1559Compatibility,getCurrentNetworkLegacyGasAPICompatibility,getCurrentAccountEIP1559Compatibility,onNetworkDidChange - Flat top-level state:
gasFeeEstimates,gasEstimateType,estimatedGasFeeTimeBounds - No-arg polling
getGasFeeEstimatesAndStartPolling()and theNetworkController:networkDidChangesubscription/reset - Make
networkClientIdrequired infetchGasFeeEstimates; givegetTimeEstimatea chain/networkClientIdarg
Impact — BREAKING
- Core: low risk. No consumer reads the flat state or uses no-arg polling; transaction-controller already passes
networkClientId. Mostly mechanical + largeGasFeeController.test.tsrewrite (~60-70% is global-path).
Notes
Follow-up to #9569, which made the global path init-order-agnostic — this removal deletes that code path entirely.
- 主要语言
- 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 天内回复