NWC: a seller who made the order cannot cancel while the wallet pay screen is up
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start with pay_lightning_invoice_screen.dart around the wallet mode rendering and _cancelOrder, then inspect NwcPaymentWidget to see how payment-in-flight state is exposed. Add the cancel link beneath the wallet payment widget, disable it while cancellation or payment is in flight, and add a widget test covering confirmation and the cancel request.
Written by the indexing model from the issue text.
Description
Context
A seller who made a sell order and has an NWC wallet connected funds the trade from PayLightningInvoiceScreen in wallet mode (isWalletConnected && !_manualMode, pay_lightning_invoice_screen.dart:344). In manual mode the same screen offers "cancel trade" (InvoiceCancelLink, automation id pay.cancel, line 575), which calls _cancelOrder.
What happens
Wallet mode draws no cancel at all. It shows only the counterpart row and NwcPaymentWidget (the pay button). The only way out is the app bar's back button. For the maker who sells, the trade card routes a waitingPayment trade straight back to this screen (trade_card.dart:122, sellerFundingPath), so reopening the trade lands on the same screen. The trade detail, which has trade.cancel, is not reachable from the trades list in that state.
The seller can therefore only pay or wait for the hold invoice to expire. If they changed their mind, or the wallet has no funds, they have no cancel until the wallet fails once and the screen switches to manual mode. That happens only after a failed payment attempt.
A Mortsom live run (nwc_cancel_payment, Linux, main at 0293bd44) shows the screen exposing only pay.nwc, pay.order_id, appbar.back. Reopening the trade from the list returns to it.
A taker who sells is not affected: their card opens the trade detail, which offers trade.cancel.
How to fix
- Render the same
InvoiceCancelLink(...).withAutomationId(AutomationIds.payCancel)underNwcPaymentWidgetin wallet mode, wired to_cancelOrder. Disable it while_canceling. - Hide or disable it while a payment is in flight (
_payingin the widget,_waitingon the screen). Cancelling while the wallet may still pay would race the payment. - Add a widget test: with a wallet connected, the pay screen shows
pay.cancel, and tapping it asks for confirmation and sends the cancel.
- 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: 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 7 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
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/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