Exit UX Improvements
- check or remove this line after you've added a CHANGELOG entry or if your PR doesn't need one (they should go into
CHANGELOG/unreleased/)
Some assorted improvements for the exit system:
- Add a new
VtxoStateto explicitly call out when a VTXO has been exited - No longer lock or mark a VTXO as spent when starting an exit
- The exit movement status remains in pending unless its claimed or the VTXO has been spent offchain
- Automatically mark a VTXO as exited when the exit has been fully broadcast so the user can't try spending it unsuccessfully
Summary by CodeRabbit
-
New Features
- Introduced an explicit Exited VTXO state and a terminal "VTXO already spent" exit state; exits are now created pending and finalized later. Added movement tracking and a wallet API to mark VTXOs as Exited.
-
Bug Fixes
- VTXOs remain spendable while exit transactions broadcast; exits detect already-consumed VTXOs and cancel without blocking funds.
-
Documentation
- Clarified pending-exit balance and API docs to reflect new exit/VTXO lifecycle.
-
Chores
- Database migrations and tests to backfill and migrate exit/movement data.
Edited by coderabbit