wallet: Make `fetch` injectable in `NetworkController` initialization
Maintainer thường phản hồi trong vòng 1 ngày
@grypez đang làm issue này rồi.
Từ ngày 26/5/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Problem
getRpcServiceOptions in packages/wallet/src/initialization/instances/network-controller.ts hardcodes fetch to globalThis.fetch. Platforms that provide their own fetch implementation — React Native being the primary example — cannot supply it, making the wallet non-portable across those environments.
Proposed direction
Add an optional fetch?: typeof globalThis.fetch field to WalletOptions. The NetworkController init should use options.fetch ?? globalThis.fetch.bind(globalThis) when building getRpcServiceOptions, so the default behaviour is unchanged and platform-specific implementations can be injected at construction time.
Acceptance
WalletOptionshas an optionalfetchfield.getRpcServiceOptionsuses the injected fetch when provided, falling back toglobalThis.fetch.- Existing tests pass; a test covers the injected-fetch path.
- Changelog entry added.
- Ngôn ngữ chính
- TypeScript
- Star
- 424
- Fork
- 311
- Merge trung bình
- 1 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 446
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MetaMask/core
-
EIP-1898 object selectors fail before downstream RPC in eth-json-rpc-middleware 26.0.0Có thể đã có người làm @debojyoti10CC đã nhận 5 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
CI: "Validate changelog diffs" job fails on every fork-sourced pull requestCó thể đã có người làm @Roxen-AS đã nhận 37 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
platform-api-docs: `scan` strategy misses ESM-only packages, which ship `.d.ts` rather than `.d.cts`Có thể đã có người làm @gaohan1994 đã nhận 38 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[utils] Replace the `uuid` dependency with `crypto.randomUUID()`Có thể đã có người làm @avantikonde đã nhận 51 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
MetaMask/core#10210 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[utils] `toWei` accepts fractional wei and returns wrong valuesCó thể đã có người làm @Roxen-AS đã nhận 37 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MetaMask/core
Issue tương tự
-
Flaky test: selecting a portion just after inserting it can also match its Change and Delete buttonsĐang mởready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
linagora/dcs-onlyoffice#172 ·
-
bug follow-up
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
nightly-tests
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
BlackBeltTechnology/pi-agent-dashboard#1226 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
danielmiessler/LifeOS#3028 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
execute_sql cannot create a SQLite trigger or a PostgreSQL BEGIN ATOMIC function: the statement is cut at the semicolons inside its bodyCó thể đã có người làm @goranai đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày