Trade timeline: keep "Order taken" in progress while the taker's deposit is unpaid
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Dart
- Stars
- 11
- Forks
- 9
- Avg merge
- 2d 1h
- Merged PRs (30d)
- 16
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MostroP2P/app
-
documentation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day
-
area: ui bug priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
area: ui bug priority: high
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Bug: Button "Share logs" does nothingPossibly taken @Luquitasjeffrey claimed this 8 days ago. Open
Difficulty 2/5 Half a day Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
area: rust-core bug priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
Similar issues
-
Python example: list a model's scenes and their camerasPossibly taken @rudraparmar76 claimed this today. Opendocumentation good first issue python
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
iamahsanmehmood/openskp#796 · 1 comment ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Plural rendering: first matching part wins, but gen-l10n lets the last one win (=1 shadows one)Openbug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
crowdin/flutter-sdk#97 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
MrSpideyNihal/lockfeed#16 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
InlitX/GymMane#529 · 1 comment ·
Maintainers usually reply within 1 day