feat(ramps): removes quote polling functionality#7999
Merged
georgeweiler merged 6 commits intomainfrom Feb 20, 2026
Merged
Conversation
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
7 tasks
AxelGes
approved these changes
Feb 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Replaces the automatic 15-second quote polling mechanism (
startQuotePolling/stopQuotePolling) inRampsControllerwith a single one-shotfetchQuotesForSelection()method. Quote freshness is now the caller's responsibility — the controller fetches quotes once per invocation rather than on an interval.This simplifies the controller by removing:
setInterval-based polling loop and its stored interval ID#quotePollingOptionsprivate field used to restart polling#restartPollingIfActive()helper that was called fromsetSelectedProvider,setSelectedToken, andsetSelectedPaymentMethodstopQuotePolling()calls in#cleanupState,setUserRegion,setSelectedProvider,setSelectedToken, anddestroyThe auto-selection and selection-preservation behavior is unchanged: a single-quote response is auto-selected, and multi-quote responses preserve the existing selection if it's still present in the new results.
References
mobile PR using preview build MetaMask/metamask-mobile#26301
Checklist
Note
Medium Risk
Behavior change is user-visible (quotes no longer auto-refresh) and is a breaking API removal, so consumers must update call sites and manage refresh timing themselves.
Overview
BREAKING: Removes the 15-second quote polling API (
startQuotePolling/stopQuotePolling) and replaces it withfetchQuotesForSelection(), which fetches quotes once per call and keeps the existing auto-select / selection-preservation behavior.Cleans up related controller logic by deleting interval/state used for polling and removing automatic “restart polling on dependency change” behavior from
setSelectedProvider,setSelectedToken, andsetSelectedPaymentMethod; tests and changelog are updated accordingly (includingdestroy()no longer stopping polling and a new assertion thatdestroy()clearsstateChangesubscriptions).Written by Cursor Bugbot for commit f7428f4. This will update automatically on new commits. Configure here.