Skip to content

fix(ramps-controller): refresh countries catalog on app startup#9261

Merged
wenfix merged 11 commits into
mainfrom
fix/tram-3682-countries-catalog-refresh-on-start
Jul 3, 2026
Merged

fix(ramps-controller): refresh countries catalog on app startup#9261
wenfix merged 11 commits into
mainfrom
fix/tram-3682-countries-catalog-refresh-on-start

Conversation

@amitabh94

@amitabh94 amitabh94 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Explanation

Stale persisted countries catalog data caused preset amounts (e.g. $100 / $250 / $500) to stay wrong after app restarts until the user changed region, even when the API had updated values.

This change is controller-only in @metamask/ramps-controller — no MetaMask Mobile or portfolio changes.

  • Mark the countries catalog as non-persisted (persist: false) so restarts do not reuse stale catalog data.
  • On init(), always refetch countries via getCountries() (including when userRegion is already set).
  • After each successful getCountries(), re-sync userRegion preset amounts from the fresh catalog via #syncUserRegionFromCountriesCatalog.
  • Tests cover init refetch, userRegion re-sync, and persistence metadata.

Consumers need a new @metamask/ramps-controller release; mobile can pick it up via the usual Core dependency bump.

References

Recording (mobile client)

country-default-amounts-after.mov

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Made with Cursor

@amitabh94 amitabh94 requested review from a team as code owners June 25, 2026 04:30
amitabh94 and others added 5 commits June 25, 2026 12:42
Stop persisting the countries catalog and force-refetch via init() so
preset amounts stay in sync after app restarts.

TRAM-3682

Co-authored-by: Cursor <cursoragent@cursor.com>
TRAM-3682

Co-authored-by: Cursor <cursoragent@cursor.com>
@wenfix wenfix force-pushed the fix/tram-3682-countries-catalog-refresh-on-start branch from dae992f to 82c35e8 Compare June 25, 2026 11:56
Comment thread packages/ramps-controller/src/RampsController.ts

@saustrie-consensys saustrie-consensys left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left an important question before I can approve

if (forceRefresh || !hasCountries) {
await this.getCountries(options);
}
await this.getCountries({ ...options, forceRefresh: true });

@saustrie-consensys saustrie-consensys Jun 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amitabh94 @wenfix Why not simply use forceRefresh? We created that option for a reason

@amitabh94 amitabh94 Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this PR uses forceRefresh only.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@saustrie-consensys just to make sure I follow: do you mean keep reading options.forceRefresh instead of hardcoding it (the old forceRefresh || !hasCountries shape), or that the caller should drive the refresh via init({ forceRefresh }) and #runInit shouldn't force it at all? Happy to go either way, with persist: false the cold start already refetches regardless, so the hardcoded forceRefresh: true was redundant either way.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a small endpoint and not doing any major work so I am even okay to always refresh it on controller init i.e. everytime the app starts or user closes and reopens the app.

},
countries: {
persist: true,
persist: false,

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be true as we want to honor the users selection of region from settings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we can keep this change to remove the persistence on the countries endpoint as before because it is just to get the country catalog.My bad as I got confused between countries data and user region which are separate.

@amitabh94

amitabh94 commented Jun 30, 2026

Copy link
Copy Markdown
Contributor Author

@metamaskbot publish-preview

@wenfix wenfix force-pushed the fix/tram-3682-countries-catalog-refresh-on-start branch from a1f454c to 1132ac3 Compare June 30, 2026 15:42
@wenfix

wenfix commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@metamaskbot publish-preview

@wenfix

wenfix commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@metamaskbot publish-preview

@github-actions

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.5.3-preview-56b2c8bdd
@metamask-previews/accounts-controller@39.0.3-preview-56b2c8bdd
@metamask-previews/address-book-controller@7.1.2-preview-56b2c8bdd
@metamask-previews/ai-controllers@0.7.0-preview-56b2c8bdd
@metamask-previews/analytics-controller@1.2.1-preview-56b2c8bdd
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-56b2c8bdd
@metamask-previews/announcement-controller@8.1.0-preview-56b2c8bdd
@metamask-previews/app-metadata-controller@2.0.1-preview-56b2c8bdd
@metamask-previews/approval-controller@9.0.2-preview-56b2c8bdd
@metamask-previews/assets-controller@10.0.0-preview-56b2c8bdd
@metamask-previews/assets-controllers@109.2.2-preview-56b2c8bdd
@metamask-previews/authenticated-user-storage@2.1.0-preview-56b2c8bdd
@metamask-previews/base-controller@9.1.0-preview-56b2c8bdd
@metamask-previews/base-data-service@0.1.3-preview-56b2c8bdd
@metamask-previews/bitcoin-regtest-up@0.0.0-preview-56b2c8bdd
@metamask-previews/bridge-controller@77.1.0-preview-56b2c8bdd
@metamask-previews/bridge-status-controller@74.0.0-preview-56b2c8bdd
@metamask-previews/build-utils@3.0.4-preview-56b2c8bdd
@metamask-previews/chain-agnostic-permission@1.6.2-preview-56b2c8bdd
@metamask-previews/chomp-api-service@3.1.0-preview-56b2c8bdd
@metamask-previews/claims-controller@0.5.3-preview-56b2c8bdd
@metamask-previews/client-controller@1.0.1-preview-56b2c8bdd
@metamask-previews/compliance-controller@2.1.0-preview-56b2c8bdd
@metamask-previews/composable-controller@12.0.1-preview-56b2c8bdd
@metamask-previews/config-registry-controller@0.4.1-preview-56b2c8bdd
@metamask-previews/connectivity-controller@0.2.0-preview-56b2c8bdd
@metamask-previews/controller-utils@12.3.0-preview-56b2c8bdd
@metamask-previews/core-backend@6.4.0-preview-56b2c8bdd
@metamask-previews/delegation-controller@3.0.2-preview-56b2c8bdd
@metamask-previews/earn-controller@12.2.1-preview-56b2c8bdd
@metamask-previews/eip-5792-middleware@3.0.4-preview-56b2c8bdd
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-56b2c8bdd
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-56b2c8bdd
@metamask-previews/ens-controller@19.1.4-preview-56b2c8bdd
@metamask-previews/eth-block-tracker@15.0.1-preview-56b2c8bdd
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-56b2c8bdd
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-56b2c8bdd
@metamask-previews/foundryup@1.0.1-preview-56b2c8bdd
@metamask-previews/gas-fee-controller@26.2.3-preview-56b2c8bdd
@metamask-previews/gator-permissions-controller@4.2.1-preview-56b2c8bdd
@metamask-previews/geolocation-controller@0.1.3-preview-56b2c8bdd
@metamask-previews/java-tron-up@0.0.0-preview-56b2c8bdd
@metamask-previews/json-rpc-engine@10.5.0-preview-56b2c8bdd
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-56b2c8bdd
@metamask-previews/keyring-controller@27.1.0-preview-56b2c8bdd
@metamask-previews/local-node-utils@0.0.0-preview-56b2c8bdd
@metamask-previews/logging-controller@8.0.2-preview-56b2c8bdd
@metamask-previews/message-manager@14.1.2-preview-56b2c8bdd
@metamask-previews/messenger@1.2.0-preview-56b2c8bdd
@metamask-previews/messenger-cli@0.2.0-preview-56b2c8bdd
@metamask-previews/money-account-balance-service@2.1.1-preview-56b2c8bdd
@metamask-previews/money-account-controller@0.3.3-preview-56b2c8bdd
@metamask-previews/money-account-upgrade-controller@2.1.0-preview-56b2c8bdd
@metamask-previews/multichain-account-service@11.1.0-preview-56b2c8bdd
@metamask-previews/multichain-api-middleware@3.1.5-preview-56b2c8bdd
@metamask-previews/multichain-network-controller@3.2.0-preview-56b2c8bdd
@metamask-previews/multichain-transactions-controller@7.1.1-preview-56b2c8bdd
@metamask-previews/name-controller@9.1.2-preview-56b2c8bdd
@metamask-previews/network-controller@33.0.0-preview-56b2c8bdd
@metamask-previews/network-enablement-controller@5.4.0-preview-56b2c8bdd
@metamask-previews/notification-services-controller@24.2.0-preview-56b2c8bdd
@metamask-previews/passkey-controller@2.0.1-preview-56b2c8bdd
@metamask-previews/permission-controller@13.1.1-preview-56b2c8bdd
@metamask-previews/permission-log-controller@5.1.0-preview-56b2c8bdd
@metamask-previews/perps-controller@9.0.0-preview-56b2c8bdd
@metamask-previews/phishing-controller@17.2.0-preview-56b2c8bdd
@metamask-previews/polling-controller@16.0.7-preview-56b2c8bdd
@metamask-previews/preferences-controller@23.1.0-preview-56b2c8bdd
@metamask-previews/profile-metrics-controller@4.0.1-preview-56b2c8bdd
@metamask-previews/profile-sync-controller@28.2.0-preview-56b2c8bdd
@metamask-previews/ramps-controller@15.0.0-preview-56b2c8bdd
@metamask-previews/rate-limit-controller@7.0.1-preview-56b2c8bdd
@metamask-previews/react-data-query@0.2.1-preview-56b2c8bdd
@metamask-previews/remote-feature-flag-controller@4.2.2-preview-56b2c8bdd
@metamask-previews/sample-controllers@5.0.2-preview-56b2c8bdd
@metamask-previews/seedless-onboarding-controller@10.0.3-preview-56b2c8bdd
@metamask-previews/selected-network-controller@26.1.4-preview-56b2c8bdd
@metamask-previews/shield-controller@5.1.2-preview-56b2c8bdd
@metamask-previews/signature-controller@39.2.6-preview-56b2c8bdd
@metamask-previews/smart-transactions-controller@24.2.3-preview-56b2c8bdd
@metamask-previews/snap-account-service@1.0.0-preview-56b2c8bdd
@metamask-previews/social-controllers@2.3.1-preview-56b2c8bdd
@metamask-previews/solana-test-validator-up@0.0.0-preview-56b2c8bdd
@metamask-previews/stellar-quickstart-up@0.0.0-preview-56b2c8bdd
@metamask-previews/storage-service@1.0.2-preview-56b2c8bdd
@metamask-previews/subscription-controller@6.2.0-preview-56b2c8bdd
@metamask-previews/transaction-controller@68.2.0-preview-56b2c8bdd
@metamask-previews/transaction-pay-controller@23.17.2-preview-56b2c8bdd
@metamask-previews/user-operation-controller@41.2.5-preview-56b2c8bdd
@metamask-previews/wallet@5.0.0-preview-56b2c8bdd
@metamask-previews/wallet-cli@0.0.0-preview-56b2c8bdd

@wenfix

wenfix commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@metamaskbot publish-preview

@wenfix

wenfix commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@metamaskbot publish-preview

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.5.3-preview-1bd5239bf
@metamask-previews/accounts-controller@39.0.3-preview-1bd5239bf
@metamask-previews/address-book-controller@7.1.2-preview-1bd5239bf
@metamask-previews/ai-controllers@0.7.0-preview-1bd5239bf
@metamask-previews/analytics-controller@1.2.1-preview-1bd5239bf
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-1bd5239bf
@metamask-previews/announcement-controller@8.1.0-preview-1bd5239bf
@metamask-previews/app-metadata-controller@2.0.1-preview-1bd5239bf
@metamask-previews/approval-controller@9.0.2-preview-1bd5239bf
@metamask-previews/assets-controller@10.0.0-preview-1bd5239bf
@metamask-previews/assets-controllers@109.2.2-preview-1bd5239bf
@metamask-previews/authenticated-user-storage@2.1.0-preview-1bd5239bf
@metamask-previews/base-controller@9.1.0-preview-1bd5239bf
@metamask-previews/base-data-service@0.1.3-preview-1bd5239bf
@metamask-previews/bitcoin-regtest-up@1.0.0-preview-1bd5239bf
@metamask-previews/bridge-controller@77.3.0-preview-1bd5239bf
@metamask-previews/bridge-status-controller@74.0.0-preview-1bd5239bf
@metamask-previews/build-utils@3.0.4-preview-1bd5239bf
@metamask-previews/chain-agnostic-permission@1.6.2-preview-1bd5239bf
@metamask-previews/chomp-api-service@3.1.0-preview-1bd5239bf
@metamask-previews/claims-controller@0.5.3-preview-1bd5239bf
@metamask-previews/client-controller@1.0.1-preview-1bd5239bf
@metamask-previews/compliance-controller@2.1.0-preview-1bd5239bf
@metamask-previews/composable-controller@12.0.1-preview-1bd5239bf
@metamask-previews/config-registry-controller@0.4.1-preview-1bd5239bf
@metamask-previews/connectivity-controller@0.2.0-preview-1bd5239bf
@metamask-previews/controller-utils@12.3.0-preview-1bd5239bf
@metamask-previews/core-backend@6.4.0-preview-1bd5239bf
@metamask-previews/delegation-controller@3.0.2-preview-1bd5239bf
@metamask-previews/earn-controller@12.2.1-preview-1bd5239bf
@metamask-previews/eip-5792-middleware@3.0.4-preview-1bd5239bf
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-1bd5239bf
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-1bd5239bf
@metamask-previews/ens-controller@19.1.4-preview-1bd5239bf
@metamask-previews/eth-block-tracker@15.0.1-preview-1bd5239bf
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-1bd5239bf
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-1bd5239bf
@metamask-previews/foundryup@1.0.1-preview-1bd5239bf
@metamask-previews/gas-fee-controller@26.2.3-preview-1bd5239bf
@metamask-previews/gator-permissions-controller@4.2.1-preview-1bd5239bf
@metamask-previews/geolocation-controller@0.1.3-preview-1bd5239bf
@metamask-previews/java-tron-up@1.0.0-preview-1bd5239bf
@metamask-previews/json-rpc-engine@10.5.0-preview-1bd5239bf
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-1bd5239bf
@metamask-previews/keyring-controller@27.1.0-preview-1bd5239bf
@metamask-previews/local-node-utils@1.0.0-preview-1bd5239bf
@metamask-previews/logging-controller@8.0.2-preview-1bd5239bf
@metamask-previews/message-manager@14.1.2-preview-1bd5239bf
@metamask-previews/messenger@1.2.0-preview-1bd5239bf
@metamask-previews/messenger-cli@0.2.0-preview-1bd5239bf
@metamask-previews/money-account-balance-service@2.1.1-preview-1bd5239bf
@metamask-previews/money-account-controller@0.3.3-preview-1bd5239bf
@metamask-previews/money-account-upgrade-controller@2.1.0-preview-1bd5239bf
@metamask-previews/multichain-account-service@11.1.0-preview-1bd5239bf
@metamask-previews/multichain-api-middleware@3.1.5-preview-1bd5239bf
@metamask-previews/multichain-network-controller@3.2.0-preview-1bd5239bf
@metamask-previews/multichain-transactions-controller@7.1.1-preview-1bd5239bf
@metamask-previews/name-controller@9.1.2-preview-1bd5239bf
@metamask-previews/network-controller@33.0.0-preview-1bd5239bf
@metamask-previews/network-enablement-controller@5.4.0-preview-1bd5239bf
@metamask-previews/notification-services-controller@24.2.0-preview-1bd5239bf
@metamask-previews/passkey-controller@2.0.1-preview-1bd5239bf
@metamask-previews/permission-controller@13.1.1-preview-1bd5239bf
@metamask-previews/permission-log-controller@5.1.0-preview-1bd5239bf
@metamask-previews/perps-controller@9.0.0-preview-1bd5239bf
@metamask-previews/phishing-controller@17.2.0-preview-1bd5239bf
@metamask-previews/platform-api-docs@0.0.0-preview-1bd5239bf
@metamask-previews/polling-controller@16.0.7-preview-1bd5239bf
@metamask-previews/preferences-controller@23.1.0-preview-1bd5239bf
@metamask-previews/profile-metrics-controller@4.0.1-preview-1bd5239bf
@metamask-previews/profile-sync-controller@28.2.0-preview-1bd5239bf
@metamask-previews/ramps-controller@15.0.0-preview-1bd5239bf
@metamask-previews/rate-limit-controller@7.0.1-preview-1bd5239bf
@metamask-previews/react-data-query@0.2.1-preview-1bd5239bf
@metamask-previews/remote-feature-flag-controller@4.2.2-preview-1bd5239bf
@metamask-previews/sample-controllers@5.0.2-preview-1bd5239bf
@metamask-previews/seedless-onboarding-controller@10.0.3-preview-1bd5239bf
@metamask-previews/selected-network-controller@26.1.4-preview-1bd5239bf
@metamask-previews/shield-controller@5.1.2-preview-1bd5239bf
@metamask-previews/signature-controller@39.2.6-preview-1bd5239bf
@metamask-previews/smart-transactions-controller@24.2.3-preview-1bd5239bf
@metamask-previews/snap-account-service@1.0.0-preview-1bd5239bf
@metamask-previews/social-controllers@2.3.1-preview-1bd5239bf
@metamask-previews/solana-test-validator-up@1.0.0-preview-1bd5239bf
@metamask-previews/stellar-quickstart-up@0.0.0-preview-1bd5239bf
@metamask-previews/storage-service@1.0.2-preview-1bd5239bf
@metamask-previews/subscription-controller@6.2.0-preview-1bd5239bf
@metamask-previews/transaction-controller@68.2.0-preview-1bd5239bf
@metamask-previews/transaction-pay-controller@23.17.2-preview-1bd5239bf
@metamask-previews/user-operation-controller@41.2.5-preview-1bd5239bf
@metamask-previews/wallet@5.0.0-preview-1bd5239bf
@metamask-previews/wallet-cli@0.0.0-preview-1bd5239bf

@meltingice1337 meltingice1337 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@wenfix wenfix added this pull request to the merge queue Jul 3, 2026
Merged via the queue into main with commit 8d16e0a Jul 3, 2026
408 checks passed
@wenfix wenfix deleted the fix/tram-3682-countries-catalog-refresh-on-start branch July 3, 2026 15:00
This was referenced Jul 6, 2026
pull Bot pushed a commit to dmrazzy/core that referenced this pull request Jul 6, 2026
## Explanation

This release branch publishes `@metamask/ramps-controller` `15.1.0`.

The release includes the scope-aware in-app provider widening work from
MetaMask#9353, plus the existing unreleased `init()` / countries catalog refresh
entries from MetaMask#9261. The release tool also bumped the root monorepo
version to `1095.0.0` and updated
`@metamask/transaction-pay-controller`'s workspace dependency on
`@metamask/ramps-controller` to `^15.1.0`.

This branch was generated by `yarn create-release-branch`.

## References

- Related to MetaMask#9353
- Related to MetaMask#9261
- Related to MetaMask/metamask-mobile#32682

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/processes/updating-changelogs.md)
- [ ] I've introduced [breaking
changes](https://github.com/MetaMask/core/tree/main/docs/processes/breaking-changes.md)
in this PR and have prepared draft pull requests for clients and
consumer packages to resolve them

Validation: `yarn changelog:validate`

Made with [Cursor](https://cursor.com)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
pull Bot pushed a commit to Reality2byte/metamask-mobile that referenced this pull request Jul 6, 2026
…n app start (MetaMask#32776)

## **Description**

Bumps `@metamask/ramps-controller` so `init()` no longer skips
`getCountries()` when cached data is already present. Previously the
countries catalog was persisted and reused across cold starts, so users
kept seeing stale preset amounts (e.g. `100` for CRC) even after the API
started returning the correct value (`25000`). The controller now stops
persisting the catalog and re-fetches + re-syncs `userRegion` on every
app start.

Currently pinned to a preview build of the package
(`@metamask-previews/ramps-controller@15.0.0-preview-1bd5239bf`) while
the official release is pending in `MetaMask/core`; this will be swapped
to the released `npm` version once it ships.


## **Changelog**

CHANGELOG entry: Fixed an issue where some regions showed an incorrect
default buy amount after a cold app start.

## **Related issues**

Fixes: TRAM-3682
Core PR: MetaMask/core#9261

## **Manual testing steps**

```gherkin
Feature: Ramps region default amounts

  Scenario: user opens the app after a cold start
    Given the on-ramp API returns a CRC default amount of 25000 for Costa Rica

    When user cold-starts the app and opens the Buy flow with a Costa Rica region
    Then the preset default amount shown is 25000, not the stale cached 100
```

## **Screenshots/Recordings**


### **After**


https://github.com/user-attachments/assets/6175bfd7-7071-469e-8f04-9003cac4cff8



## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I've included tests if applicable
- [x] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

#### Performance checks (if applicable)

- [ ] I've tested on Android
  - Ideally on a mid-range device; emulator is acceptable
- [ ] I've tested with a power user scenario
- Use these [power-user
SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93)
to import wallets with many accounts and tokens
- [ ] I've instrumented key operations with Sentry traces for production
performance metrics
- See [`trace()`](/app/util/trace.ts) for usage and
[`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274)
for an example

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches on-ramp region defaults and adds a countries fetch on every
cold start; behavior is confined to the ramps controller dependency with
no local code edits.
> 
> **Overview**
> Upgrades **`@metamask/ramps-controller`** from `15.0.0` to
**`15.1.0`** (lockfile only; no app source changes). That release
changes startup behavior so the **countries catalog is fetched on every
cold start** instead of reusing a persisted cache, which fixes **stale
regional default buy amounts** in the Buy flow (e.g. Costa Rica showing
`100` instead of API `25000`).
> 
> The resolved package also moves **`@metamask/messenger`** to `^2.0.0`
as a transitive dependency of the controller.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ce54dd9. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants