docs: automation-contract.md omits the NWC wallet and pay identifiers

Open Beginner friendly
#957 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
73/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Tech stack
dart
Domain
documentation

Research direction

Start with docs/automation-contract.md and compare its tables with the identifiers in lib/core/automation/automation_ids.dart; check for an existing test that verifies the document against those identifiers. Document the listed IDs and their state labels, then add the Connected wallet (NWC) transitions and timing. Done means the contract covers the connect, payment, and buyer invoice outcomes described in the issue.

Written by the indexing model from the issue text.

Description

documentation priority: low

Context

docs/automation-contract.md is the contract black-box harnesses (Mortsom) build on. Changing what it lists requires coordinated review. Several identifiers the NWC flows use are defined in lib/core/automation/automation_ids.dart and used by the app, but are not in the document.

What happens

Not documented at main 0293bd44:

Identifier Where
settings.wallet settings entry that opens the wallet screen
wallet.nwc.uri connect form URI field
wallet.nwc.paste connect form paste action
wallet.nwc.connect connect button
wallet.settings.disconnect disconnect on the connected wallet screen
pay.nwc "pay with wallet" button on the pay screen in wallet mode
pay.cancel cancel-trade link on the manual pay screen

The behaviour around them is not documented either, and automation has to discover it:

  • The connect form carries wallet.connection labelled disconnected. It keeps that label while the app waits for the wallet's info event, up to about 10 s. On success the screen pops back to settings rather than relabelling. A harness that reads the label right after tapping connect always sees disconnected. Mortsom did exactly this until a live run showed it.
  • With a wallet connected, the seller's pay screen shows pay.nwc and pay.order_id, and no QR. After a successful payment the app moves to the trade detail. After a failed one it switches to the manual screen, without pay.nwc and with pay.invoice.text.
  • With a wallet connected, the buyer's invoice is requested and submitted the moment the order is taken. The trade then shows trade.payout = scheduled and offers no trade.addInvoice.

How to fix

Add the identifiers to the tables in docs/automation-contract.md, with their labels where they carry state. Add a short "Connected wallet (NWC)" section that describes the transitions above, including the timing of the connect form and where each outcome lands. If there is a test that checks the doc against automation_ids.dart, extend it to these ids.

Dominant language
Dart
Stars
11
Forks
9
Avg merge
2d 1h
Merged PRs (30d)
16

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MostroP2P/app

All issues in MostroP2P/app

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.