Seedelf-Wallet

Chunk 32 · 5 ₳ for a found session’s cancel

The owner asked on 2026-10-12, from post-release-roadmap.md’s Kept in mind: a top-up for a session the restore scan found, so it can cancel an open order when its account holds no ADA, and to check that this case is handled properly.

Status: ✅ built 2026-10-12 on web-wallet/found-session-top-up, from main after #303. One PR: the build and the docs together, so this file went straight to the archive. What still holds is in architecture.md (The cancel is the wallet’s own), flows.md (If a session stalls), keys-and-accounts.md (The restore scan) and privacy.md. The privacy policy has no new entry: nothing new is sent or kept.

The gap

A session the restore scan finds (chunk 27) is brought back by hand: Cancel the order while one is open, then Bring it back. The cancel is the wallet’s own (chunk 24), and its collateral is one of the account’s UTxOs of ADA alone (cancelOf: its own 5 ₳, else the largest). A return from before chunk 24 checked only Minswap’s list of orders, so it could take everything at the account while an order missing from that list was still open. Found after a restore, such a session’s account holds nothing, or only tokens. Cancel the order was refused (“The wallet couldn’t cancel the order: this session’s account holds no UTxO of ADA alone to put up as collateral for cancelling the order.”), and the wallet offered nothing to fix it. The order waited for its batcher. One priced past its slippage would wait for good, with its money in it. Paying the account from the public account by hand would link that account to the session on chain.

What else touches it, checked before building:

What changed

The threshold is 5 ₳, not any ADA alone. The cancel puts up its own 5 ₳ first, else the largest UTxO of ADA alone, which must cover 1.5 times the fee and still come back as an output. A smaller one may not. So an account holding only a smaller UTxO of ADA alone (a stranger’s, say) is offered the 5 ₳ too, rather than a cancel that may be refused.

5 ₳ for a return through Lovejoin too (1.5.0’s release review, C53). A session brought back by hand, a found one say, whose return would go through Lovejoin but whose account holds no UTxO of exactly 5 ₳ of ADA alone for the mixes (a return took its 5 ₳ before money reached the account again), came back directly, with no way to put one in. While no order of it waits, its page now offers Put in 5 ₳ for Lovejoin, a secondary button beside Bring it back, built by backCollateralBuild (session-back-collateral-build) as the cancel’s 5 ₳ is and sent by topUpSubmit, with the same review and privacy note; the view says backCollateral, missing or coming. It’s offered by the return’s own test (lovejoinWantsCollateral), which reads no pool. Bring it back beside it still comes back directly, and says why. (1.5.0’s cross-area review, X20: while the 5 ₳ is on its way, Bring it back is the secondary button, and a return built then says the 5 ₳ wasn’t at the account yet, sess.skip.warn.collateralComing, not that it’s gone; past tense, since the reason is kept with the session and its page shows it after the 5 ₳ has landed: 1.5.0’s last review, L9.)

Not built:

Tests