fix(orders): a take that times out tells the user to try again, while its late reply may still open the trade

Aperta
#794 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
56/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart, rust

Direzione di ricerca

Read rust/src/mostro/pending.rs, lib/core/daemon_errors.dart, and the translations referenced in CLAUDE.md § Translations; compare the existing invoice timeout handling from #615. Trace how take_order returns its timeout marker and how the take screen handles it. Done means a pending take has distinct copy in all six locales and offers no retry while it may still land, while final timeouts retain NoDaemonResponse.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Since #570, a take whose daemon reply arrives after the 10 s wait is no longer lost: the late reply lands the trade while the app runs (#566). But take_order still returns NoDaemonResponse at 10 s, and lib/core/daemon_errors.dart maps it to sessionTimeoutMessage: "No response received, check your connection and try again later".

What happens

From a manual test of #570 on regtest, with the take's wait shortened so every reply is late:

  1. The take screen shows "No response received… try again later".
  2. A second later the trade is there: the late reply landed it (rebuilt trade row from take record … (#566)), and TradeActionListener opens its next screen out of what looked like a failure.
  3. Following the message, the user canceled the trade they did not know they had and took the order again. Had the first take not landed yet, retrying would have hit CantDo(PendingOrderExists) (#566).

So the copy contradicts the contract (specs/004-mostro-p2p-client/contracts/orders.md: "A timeout is not final, though").

Expected

The same treatment #615 gave invoices: a distinct marker for a take the node has not answered yet (e.g. TakeAwaitingDaemon next to InvoiceAwaitingDaemon in rust/src/mostro/pending.rs), and its own copy in all six locales, along the lines of: "The node has not answered yet. If it accepts your take, the trade will open." No "try again".

NoDaemonResponse keeps its meaning for requests whose timeout is final.

Notes

  • Rust returns the marker; Dart maps it (CLAUDE.md § Translations).
  • The take screen should not offer a retry while the take may still land.
  • Raised in the review of #570 (point 3).
Lingua principale
Dart
Stelle
11
Fork
9
Merge medio
2g 1h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MostroP2P/app

Tutte le issue di MostroP2P/app

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.