Skip to content

fix(ramps): select BuildQuote quote with normalized provider id#27779

Closed
amitabh94 wants to merge 1 commit into
mainfrom
fix/ramps-v2-build-quote-provider-match
Closed

fix(ramps): select BuildQuote quote with normalized provider id#27779
amitabh94 wants to merge 1 commit into
mainfrom
fix/ramps-v2-build-quote-provider-match

Conversation

@amitabh94

Copy link
Copy Markdown
Contributor

Description

Unified Buy v2 BuildQuote (amount input) derives selectedQuote from the quotes API success array. The previous logic used only the first quote and required quote.provider === selectedProvider.id.

Quotes can still be scoped to the selected provider via request params while returning provider strings that do not exactly match controller state (for example /providers/transak vs transak). In that case selectedQuote was null even though a valid quote existed, which surfaced as “We’ve encountered an error” / no-quotes UI (hasNoQuotes) and looked intermittent when amounts refetched.

This change selects the quote with normalizeProviderCode on both sides and uses .find over success so the correct row is matched regardless of path vs short id formatting.

Changelog

CHANGELOG entry: Fixed Buy amount screen sometimes showing a generic error when quotes returned for the selected provider but provider id strings differed in format.

Related issues

Fixes:

Manual testing steps

Feature: Unified Buy v2 BuildQuote quote selection

  Scenario: Amount entry with Transak after provider selection
    Given Unified Buy v2 is enabled and Transak is the selected provider
    And a token and payment method are selected

    When the user opens the amount (BuildQuote) screen and enters or changes a fiat amount
    Then the Continue control enables when a quote is available
    And the generic “We’ve encountered an error” / no-quotes message does not appear solely because of provider id formatting

Screenshots/Recordings

Before

N/A

After

N/A

Pre-merge author checklist

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.

@amitabh94 amitabh94 self-assigned this Mar 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@amitabh94 amitabh94 added no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed QA Passed QA testing has been completed and passed and removed no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Mar 22, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@sonarqubecloud

Copy link
Copy Markdown

@amitabh94 amitabh94 closed this Apr 3, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

QA Passed QA testing has been completed and passed size-S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant