01a0aab0 - Treat only already-confirmed 409 as buy confirm success - #1504
Conversation
The API also returns 409 when a quote is deactivated. Showing the completion screen for that status was a false success.
|
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
|
|
EN: DE: Details
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"
} |
|
EN: DE: DetailsFour PR lanes (Grok quality+logic, Codex quality+logic) finished with STATUS complete and 0 production findings at head |
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.tsxpreviously treated every HTTP 409 as success and showed the completion screen. The API uses 409 both forTransaction request is already confirmed(COMPLETED / WAITING_FOR_PAYMENT — a missed first response) and forTransaction 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.tsxon Node 20: statements 100, branch 100, functions 100, lines 100. The existing already-confirmed unit test and full-stack E2E stay as they are.