b5495be1 - Collapse the two IBAN switch buttons into one cycle - #1391
Merged
Conversation
The payment-details IBAN row showed a collection-account SWAP toggle and a provider BANK toggle side by side whenever both alternatives existed. Customers only need one control: a single SWAP button now walks personal → collection (when offered) → the other personal-IBAN provider (when offered). Collection stays a local display change; a provider step still requests a fresh quote.
The provider callback now lives on the discriminated switch target, so the unreachable exported fail-closed throw is gone. Tests cover the cycle only through PaymentInformationContent.
The full-stack /buy and /buy/info flows already reach Payment Information. They now also assert that at most one IBAN switch button is rendered, so the two-control regression cannot land again even when this stack does not seed a personal-IBAN provider.
Contributor
Author
|
EN: Ready after 4 review passes. DetailsReview passes:
Comments: none open besides this note (no review threads). |
TaprootFreak
marked this pull request as ready for review
August 13, 2026 15:56
TaprootFreak
marked this pull request as draft
August 13, 2026 18:54
The Frick and Yapeal payment-details screenshots now show one SWAP button instead of the previous SWAP plus bank icons. Collection-only baselines are unchanged.
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.
Summary
The buy payment-details IBAN row rendered two adjacent switch controls whenever a verified Bank Frick personal IBAN also had a Yapeal alternative: the collection-account SWAP toggle and the provider BANK toggle. That is one job. This change keeps a single SWAP button that cycles through every IBAN actually available on the current quote:
getOfferableCollectionIbanoffers onepersonalIbanProviderSwitchis passedCollection remains a local display change (QR and invoice rewrite unchanged). A provider step still calls
onSwitchso the screens request a fresh quote pinned to that provider. Collection-only and provider-only rows keep their previous behaviour, except the provider-only control now uses the same SWAP icon.Public
PaymentInformationContentprops are unchanged. Existing translation keys are reused. The provider callback lives on the discriminated switch target; the cycle helper stays file-private.Tests
Per-file coverage for every instrumented file this pull request touches, measured with:
src/components/payment/payment-info-buy.tsx33 unit tests in the
payment-info-buysuites passed. Combined-cycle cases pin exactly one switch button, a local first click, and a provideronSwitchon the second click.The
/buyand/buy/infoPlaywright scenarios step through collection first on a verified Frick CHF quote, then switch to Yapeal. Their four provider-toggle baselines (buy-chf-provider-toggle-*,buy-info-provider-toggle-*) are regenerated and show one SWAP control. The matching full-stack tests ine2e-stack/specs/buy.spec.tsassert that Payment Information never renders more than one IBAN switch button.