fix(transaction-pay-controller): clear stale rampsQuote on fiat quote failure#9073
Merged
Conversation
… failure When a fiat quote fetch fails, the previous successful rampsQuote was left on fiatPayment state. This prevented useNoPayTokenQuotesAlert from firing on mobile because its fiat branch gates on `!fiatPayment.rampsQuote`. Clear rampsQuote via updateFiatPayment in the catch block so any subsequent failure after a prior success surfaces the "No quotes" alert correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2 tasks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OGPoyraz
previously approved these changes
Jun 10, 2026
…ection The Fixed entry for #9073 ended up under [23.5.1] after main was merged into the branch (two release commits bumped the former Unreleased section). Move it back to [Unreleased]. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
OGPoyraz
approved these changes
Jun 11, 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
When
getFiatQuotessucceeds, it setsfiatPayment.rampsQuoteon transaction state. On failure, the catch block previously only logged the error and returned an empty array — it never clearedrampsQuote. If a user had a prior successful quote and a later fetch failed (network blip, provider outage, etc.), the stalerampsQuoteremained on state.On mobile,
useNoPayTokenQuotesAlertgates the fiat branch on!fiatPayment?.rampsQuote, so with a stale quote present the "No quotes" alert would never fire and the error was effectively swallowed.This PR clears
fiatPayment.rampsQuotein thegetFiatQuotescatch block viaTransactionPayController:updateFiatPayment, mirroring the symmetric success-path behavior that setsquoteError = undefined. A unit test verifiesrampsQuoteisundefinedafterRampsController:getQuotesthrows.References
useNoPayTokenQuotesAlertChecklist
Note
Low Risk
Small, targeted state cleanup on an existing error path in fiat quoting; behavior change is limited to failure cases and is covered by a new unit test.
Overview
When
getFiatQuotesfails after logging and returning[], it now clearsfiatPayment.rampsQuoteviaTransactionPayController:updateFiatPayment, so a prior successful ramps quote cannot linger and block fiat “no quotes” UI (e.g. mobile checks!fiatPayment?.rampsQuote).A unit test asserts
rampsQuoteisundefinedwhenRampsController:getQuotesthrows; the package changelog records the fix.Reviewed by Cursor Bugbot for commit 3ebd95c. Bugbot is set up for automated code reviews on this repo. Configure here.