Trade timeline: keep "Order taken" in progress while the taker's deposit is unpaid
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 58/100
Direzione di ricerca
Start with TradeView in lib/features/trades/models/trade_view.dart and the _steps() timeline logic in trade_detail_screen.dart; then read the two named bond and TradeView tests. Trace how waitingBond distinguishes taker from maker so the taker’s first step stays current while the maker never sees “Orden tomada.” Done means both taker roles show step 1 with later steps pending, existing post-bond behavior is preserved, and the maker timeline is correct; add the requested waitingBond timeline widget test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
On a node with the anti-abuse bond enabled (apply_to = "take" or "both"), taking an order puts it in WaitingTakerBond. The taker must first pay a bond hold invoice (PayBondInvoice). Only once that bond locks does the trade flow start. For a seller who takes a buy order, a second hold invoice for the full amount follows. These are two separate, sequential HTLCs (mostrod docs/ANTI_ABUSE_BOND.md §6.3).
In the app, both OrderStatus.waitingTakerBond and OrderStatus.waitingMakerBond map to TradeStatus.waitingBond. TradeView (lib/features/trades/models/trade_view.dart) gives that status step: 1.
Problem
While the deposit is unpaid, the trade timeline marks step 2 as current. For a seller, that step is "Bloqueas los sats" / the seller's escrow step (tradeStepInvoiceSeller). For a buyer, it is the buyer's invoice step (tradeStepInvoiceBuyer). Meanwhile, step 1, "Orden tomada", already shows the done check, and the primary button says "Pagar depósito".
Observed on a buy order taken as seller (7,000 ARS):
- Header:
PASO 2 DE 5, title "Bloquea tu depósito para continuar". - Timeline: ✓ Orden tomada, ◉ Bloqueas los sats, ○ El comprador envía el pago, ...
- Button: "Pagar depósito".
This misleads the user in two ways:
- The seller may think the deposit locks the trade sats. It does not. The full-amount hold invoice still comes after it, so the second payment request is a surprise.
- "Orden tomada" looks done, but the take is not settled yet. Until the deposit locks, the order is still open to others, and another taker who pays their deposit first wins it.
Fix
Do not add a step. While the status is waitingBond for a taker, keep the take step current:
- Use
step: 0forTradeStatus.waitingBondinTradeView, so the header readsPASO 1 DE 5(1 de 6for a buyer). - Label step 0 as "Orden tomada" (
tradeStepOrderTaken) with the in-progress ring, not the done check, and not "Esperando tomador". Today_steps()intrade_detail_screen.dartpicks the label fromcurrent == 0alone (tradeStepWaitingTaker), so it needs the status (or a flag) to tell "waiting for a taker" apart from "taken, deposit pending". - Once the bond locks, the order moves to
waitingPayment/waitingInvoiceand the existing mapping applies: "Orden tomada" gets its check and step 2 becomes current.
Maker bond: waitingMakerBond maps to the same TradeStatus. A maker paying the bond has no taker, so "Orden tomada" would be wrong there. Either keep the maker on "Esperando tomador", or split the status by role.
Acceptance
- Taker seller and taker buyer with an unpaid deposit: the timeline shows ◉ Orden tomada as current, every later step pending, and the header reads step 1.
- After the deposit locks, the timeline is unchanged from today.
- Maker with an unpaid maker bond: no "Orden tomada".
- Tests: update
test/features/trades/models/trade_view_test.dartandtest/features/trades/trade_status_bond_test.dart, and add a widget test of the timeline inwaitingBond.
- Lingua principale
- Dart
- Stelle
- 11
- Fork
- 9
- Merge medio
- 2g 1h
- PR unite (30g)
- 16
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di MostroP2P/app
-
documentation priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui bug priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
area: ui bug priority: high
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Bug: Button "Share logs" does nothingForse già presa @Luquitasjeffrey l’ha presa 8 giorni fa. Aperta
Difficoltà 2/5 Mezza giornata Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
area: rust-core bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di MostroP2P/app
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
invoiceninja/app#229 ·
-
Python example: list a model's scenes and their camerasForse già presa @rudraparmar76 l’ha presa oggi. Apertadocumentation good first issue python
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
iamahsanmehmood/openskp#796 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
-
Plural rendering: first matching part wins, but gen-l10n lets the last one win (=1 shadows one)Apertabug help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
crowdin/flutter-sdk#97 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
MrSpideyNihal/lockfeed#16 ·