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
WalletOptions has an optional fetch field.
getRpcServiceOptions uses the injected fetch when provided, falling back to globalThis.fetch.
- Existing tests pass; a test covers the injected-fetch path.
- Changelog entry added.
Problem
getRpcServiceOptionsinpackages/wallet/src/initialization/instances/network-controller.tshardcodesfetchtoglobalThis.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.fetchfield toWalletOptions. TheNetworkControllerinit should useoptions.fetch ?? globalThis.fetch.bind(globalThis)when buildinggetRpcServiceOptions, 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.