Repository navigation
chore: bump @metamask/wallet to ^20.0.0 (2/3) - #39131
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| */ | ||
| export function getGeolocationApiServiceInstanceOptions(): GeolocationApiServiceInstanceOptions { | ||
| const env = | ||
| getSdkEnvironment() === SdkEnvironment.Production ? Env.PRD : Env.DEV; |
There was a problem hiding this comment.
NIT: This is something that we could definetely stop doing and replace by using a environment variable that would be set at builds.yml
There was a problem hiding this comment.
Commented as a NIT since this is ramps team ownership
f3e937b to
594c38c
Compare
f6e777c
594c38c to
f6e777c
Compare
PR template — items to address before "Ready for review"Warnings — informational, address before merging:
See docs/readme/ready-for-review.md for the full Definition of Ready for Review. |
Smart E2E Test SelectionSelected E2E tags: ALL AI Confidence: 100 E2E reasoningExpand to readThis PR bumps @metamask/wallet from ^19.1.0 to ^20.0.0 (major version). It also changes Engine initialization: GeolocationApiService and GeolocationController are moved out of the legacy init map into wallet-init. The change touches core Engine wiring, which runs at app startup, and the wallet package underlies all controller instances. Geolocation feeds Ramps, Perps and Predictions region gating. Failures in Engine init would break every flow. This matches the hard-rule seed (global infrastructure change), so I'm keeping ALL tags with high risk. |
be7eb7f to
702350a
Compare
Wallet 20 constructs GeolocationController and GeolocationApiService. Remove the mobile inits and messengers, pass GeolocationApiService instance options (env follows the Ramp SDK environment), and keep the eager geolocation fetch at startup in wallet-init.
702350a to
ecef064
Compare
|



Description
Stack (merge in order): 1/3 #39130 (wallet 19) → 2/3 #39131 (wallet 20) → 3/3 #39132 (wallet 21)
Based on
chore/wallet-19; this diff shows only the wallet 20 step.Bumps
@metamask/walletfrom^19.1.0to^20.0.0.Why
Wallet 20.0.0 constructs
GeolocationControllerandGeolocationApiService. Mobile also constructed both, and registering them twice throwsalready registered.Changes
geolocationControllerInit,geolocationApiServiceInitand their messengers.Enginenow readsGeolocationControllerfrom the wallet.wallet-init/instance-options/geolocation-api-service.tspassesenv(PRDfor the production Ramp SDK environment, otherwiseDEV, as before) andfetch.wallet-init/listeners/geolocation-controller.ts. It is still skipped when the hydrated state already has a known location, for example from E2E fixtures.tests/integration/harnesses/predict-next.tswires the geolocation messengers the way the wallet does, since the mobile messenger factories are gone.No resolution or other dependency changes.
@metamask/geolocation-controllerstays^2.0.0.Changelog
CHANGELOG entry: null
Related issues
Refs: #39126 (same change as a single PR)
Manual testing steps
Screenshots/Recordings
N/A: Engine wiring only, no UI changes.
Before
N/A
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Medium Risk
Changes Engine/wallet initialization for region-gated features (Ramp, Perps, Rewards, Card, Predict); behavior is intended to be unchanged but startup wiring is easy to regress.
Overview
Bumps
@metamask/walletto ^20.0.0, which now ownsGeolocationControllerandGeolocationApiService. Mobile stops registering those in Engine (geolocationControllerInit,geolocationApiServiceInit, and their messengers/tests are removed), andEngineresolvesGeolocationControllerviawallet.getInstanceinstead of the messenger client map.Wallet startup now passes
geolocationApiServiceinstance options (Ramp SDKenv→PRD/DEVplusfetch) and runsfetchInitialGeolocationfromwallet-init/listeners/geolocation-controller, still skipping fetch when hydrated state already has a known location. CODEOWNERS and tests cover the new wallet-init paths; the PredictNext integration harness mirrors wallet messenger wiring after the mobile factories are gone.Reviewed by Cursor Bugbot for commit ecef064. Bugbot is set up for automated code reviews on this repo. Configure here.