Skip to content

01a0aab0 - Treat only already-confirmed 409 as buy confirm success - #1504

Merged
davidleomay merged 1 commit into
developfrom
01a0aab0-buy-confirm-409-already-confirmed
Sep 17, 2026
Merged

davidleomay merged 1 commit into
developfrom
01a0aab0-buy-confirm-409-already-confirmed

Conversation

@davidleomay

@davidleomay davidleomay commented Sep 16, 2026

Copy link
Copy Markdown
Member

EN:
Treat a buy-confirm HTTP 409 as success only when the API says the request is already confirmed. A deactivated quote uses the same status and must still show an error.

DE:
Ein HTTP 409 beim Buy-Confirm gilt nur als Erfolg, wenn die API den Request als bereits bestätigt meldet. Ein deaktiviertes Quote nutzt denselben Status und muss weiter als Fehler erscheinen.

Details

The confirm catch in src/screens/buy.screen.tsx previously treated every HTTP 409 as success and showed the completion screen. The API uses 409 both for Transaction request is already confirmed (COMPLETED / WAITING_FOR_PAYMENT — a missed first response) and for Transaction request is deactivated (the confirm UPDATE matched 0 rows). The second case is not a successful confirm.

The catch now requires the exact already-confirmed message. Other 409s, including deactivated, fall through to the existing error path. A unit test covers the deactivated case. Coverage of src/screens/buy.screen.tsx on Node 20: statements 100, branch 100, functions 100, lines 100. The existing already-confirmed unit test and full-stack E2E stay as they are.

The API also returns 409 when a quote is deactivated. Showing the
completion screen for that status was a false success.
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown

dfx pr guard

EN: Thanks for your contribution! This repository follows A38. A38 pass: author local-CI report accepted for this head.

DE: Danke für deinen Beitrag! In diesem Repository gilt A38. A38 pass: Autor-Local-CI-Report für diesen Head akzeptiert.

Details

@davidleomay

Copy link
Copy Markdown
Member Author

EN:
The A38 report below records the checks, results and durations.

DE:
Der A38-Bericht unten dokumentiert die Prüfungen, Ergebnisse und Laufzeiten.

Details
Check / Prüfung Duration / Laufzeit Result / Ergebnis Exit code
lint: Lint and Markdown format 91 s pass 0

Durations rounded up to whole seconds / Laufzeiten auf ganze Sekunden aufgerundet.

Original report / Originalbericht
{
  "head": "f7475b11d3eaa44dbd1d917810212bfa77df2b13",
  "private": false,
  "recorded_at": "2026-09-17T06:41:39Z",
  "repo": "DFXswiss/app",
  "required": [
    "lint"
  ],
  "runs": [
    {
      "command": "agent a38 job commands --config '{\"env\":{\"CI\":\"true\"},\"npm\":{\"canaries\":[\"react-app-rewired/package.json\",\"react-scripts/package.json\",\"typescript/lib/typescript.js\",\"prettier/package.json\"],\"node_major\":20},\"steps\":[[\"npm\",\"run\",\"lint\"],[\"npm\",\"run\",\"format:md:check\"]]}'",
      "duration_s": 90.3318477908615,
      "exit_code": 0,
      "id": "lint",
      "name": "Lint and Markdown format",
      "result": "pass",
      "timeout_s": 600.0
    }
  ],
  "schema": "dfx-local-ci/v1"
}

@davidleomay

Copy link
Copy Markdown
Member Author

EN:
Ready after 1 review pass.
Treat a buy-confirm 409 as success only when the request is already confirmed.

DE:
Bereit nach 1 Review-Durchlauf.
Ein Buy-Confirm-409 gilt nur als Erfolg, wenn der Request bereits bestätigt ist.

Details

Four PR lanes (Grok quality+logic, Codex quality+logic) finished with STATUS complete and 0 production findings at head f7475b11. Local A38 (lint + format:md:check) passed on Node 20 and is posted as the author report. GitHub PR CI is green. Mergeable is MERGEABLE. No open review threads. A38-adopter: leave-draft is the guard.

@davidleomay
davidleomay marked this pull request as ready for review September 17, 2026 07:40
@davidleomay
davidleomay merged commit 1cd9650 into develop Sep 17, 2026
13 checks passed
@davidleomay
davidleomay deleted the 01a0aab0-buy-confirm-409-already-confirmed branch September 17, 2026 07:41
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