Skip to content

feat(buy/sell): Hinweis wenn Kursdienst (Aktionariat) nicht erreichbar#702

Open
joshuakrueger-dfx wants to merge 1 commit into
developfrom
feature/price-source-unavailable-hint
Open

feat(buy/sell): Hinweis wenn Kursdienst (Aktionariat) nicht erreichbar#702
joshuakrueger-dfx wants to merge 1 commit into
developfrom
feature/price-source-unavailable-hint

Conversation

@joshuakrueger-dfx
Copy link
Copy Markdown
Collaborator

Kontext

Heute (2026-06-05) liefern die DFX-Brokerbot-Preisendpunkte (/v1/realunit/brokerbot/buyPrice|buyShares|...) durchgehend HTTP 500 (Cannot destructure property 'priceInCHF' — Aktionariat-Preisquelle down), auf prod und dev. Die App verschluckt diese Fehler bisher komplett: Die Converter-Cubits loggen nur und emitten loading: false — der User sieht ein eingefrorenes Eingabefeld ohne jede Erklärung.

Änderung

Kleiner, nicht-blockierender Hinweis auf der Kauf- und Verkauf-Seite, direkt unter dem Umrechner, wenn der Kurs nicht geladen werden kann:

Kurs derzeit nicht verfügbar
Die Verbindung zum Kursdienst (Aktionariat) ist vorübergehend gestört. Der aktuelle Kurs kann nicht geladen werden — bitte versuchen Sie es später erneut.

Verschwindet automatisch beim nächsten erfolgreichen Kurs-Abruf.

  • State: priceUnavailable-Flag in BuyConverterState/SellConverterState
  • Cubits: alle 6 Preis-Fetch-Handler setzen das Flag im catch, löschen es bei Erfolg (Seq-Guards/Debounce unangetastet). Eingaben werden vor dem Service-Call validiert ⇒ jede Exception dort ist ein Backend-/Verbindungsproblem, kein statusCode-Branching nötig
  • UI: bestehendes PaymentActionRequired-Widget wiederverwendet (gleicher Stil wie BitBox-/KYC-Hinweise)
  • i18n: priceSourceUnavailableTitle/Description DE + EN, Codegen gelaufen (ARB-Umsortierungen im Diff stammen vom Alphabetize-Tool des Generators)
  • Tests: je Cubit ein Regression-Test — Service wirft ⇒ Flag true; nächster Erfolg ⇒ Flag false

Verifikation

  • flutter analyze: No issues found
  • Volle Suite: 2409 passed, 0 failed
  • Live-Beweis: Backend ist aktuell real down ⇒ Hinweis sofort auf der Buy-Seite sichtbar, sobald ein Betrag eingegeben wird

🤖 Generated with Claude Code

When the DFX brokerbot price endpoints fail (e.g. today's outage:
HTTP 500 "Cannot destructure property 'priceInCHF'"), the buy/sell
converters previously swallowed the error and left a frozen input with
no explanation. Now the converter state carries a `priceUnavailable`
flag, set on any price-fetch error and cleared on the next success, and
the buy/sell pages render a small non-blocking PaymentActionRequired
hint under the converter.

- buy/sell converter state: add `priceUnavailable` flag
- buy/sell converter cubits: set flag on error, clear on success
- buy_page/sell_page: render reused PaymentActionRequired notice
- i18n: add priceSourceUnavailableTitle/Description (DE + EN)
- tests: flag set-on-error / clear-on-success for both cubits

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants