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

Aperta Adatta ai principianti
#957 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
73/100
Tipo di issue
Documentazione
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
dart
Ambito
documentation

Direzione di ricerca

Inizia da docs/automation-contract.md e confronta le sue tabelle con gli identificatori in lib/core/automation/automation_ids.dart; verifica se esiste già un test che controlla il documento rispetto a questi identificatori. Documenta gli ID elencati e le relative etichette di stato, quindi aggiungi le transizioni e le tempistiche di Connected wallet (NWC). Il lavoro è concluso quando il contratto copre gli esiti di connessione, pagamento e fattura dell’acquirente descritti nell’issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
Dart
Stelle
11
Fork
9
Merge medio
2g 1h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di MostroP2P/app

Tutte le issue di MostroP2P/app

Issue simili

Altre issue su Dart

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.