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

Abierto
#794 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
56/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
dart, rust

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).
Lenguaje dominante
Dart
Estrellas
11
Forks
9
Merge medio
2 d 1 h
PR fusionados (30 d)
16

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de MostroP2P/app

Todos los issues de MostroP2P/app

Issues similares

Más issues de Dart

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.