Seedelf-Wallet

Chunk 39 · Whose a proposal’s deposit goes back to

Branch web-wallet/proposal-deposit, from main.

Status: ✅ built 2026-10-31 on web-wallet/proposal-deposit, from main after #356. A patch, for 1.7.2 (the owner, 2026-10-31). One PR: the build, the translations and the docs together, so this file went straight to the archive, as chunks 36 and 37’s did. What still holds is in architecture.md (the transaction view’s marks, and the dApp prompt’s X05 paragraph) and flows.md (Transaction details, and the sign window). The privacy policy is unchanged: nothing new is asked of anyone or kept. As built, below, says where the build went past the plan or away from it.

Why. A bounty report against 1.7.1 (2026-10-31). A site’s sign window shows a governance proposal only as a count: “It makes 1 governance proposal.” When the action ends, the deposit (100,000 ₳ on mainnet) goes back to the reward address the proposal names, and the site can name anyone’s. The report was out of the bounty’s scope, since the sign window’s Transaction details already lists each proposal’s action, deposit and “Deposit back to” address. The owner thought the patch worth making anyway.

What changes, in one line: the wallet already shows the address, and this makes it say whose it is. Today the user has to compare a stake1… string with their own by eye. The wallet knows which stake keys are its own and does that comparison for every other place money goes in a site’s transaction:

A proposal’s deposit is the one place money goes without that. Transaction details has the same gap: it tags an output that pays the user (markYours, YoursTag) but no reward address.

1 · WebAssembly: each proposal, not a count

wasm/src/cip30.rs inspect_dapp_tx: proposals: usize becomes a Vec<Proposal>:

A reward account on the other network is refused with a withdrawal’s words, because the ledger refuses the proposal too (ProposalProcedureNetworkIdMismatch). Nothing else is refused: a deposit that goes back to someone else is legal and the user’s to sign. The wallet refuses only what the ledger would (the owner, 2026-10-19).

2 · The sign window says where each deposit goes

DappApprovals.tsx SignTx: the count note (dappUi.note.proposals_*) goes. Each proposal gets a line in the callout the certificates and withdrawals share, from a proposalLine beside certificateLine in ui/dapp.ts:

The callout is a warning whenever a line isn’t the account’s own, as it is for a stranger’s certificate. The deposit is already in the total that leaves (netLovelace), and the line says it’s a deposit and where it comes back.

The worker resolves yours for a proposal’s credential the way it does for a certificate’s. The keys are .warn., so the critical-set guard tests cover them, in en, es and ja, back-translated.

3 · Transaction details marks the user’s reward addresses

background/tx-view.ts markYours marks outputs by their payment key. It now also marks a withdrawal’s address and a proposal’s “Deposit back to” by their stake key: the active account’s, a session’s, then each other account the wallet knows. TxDetail.tsx shows YoursTag beside each, as it does beside an output. That needs a yours on both in rpc.ts, and the proposal’s reward account rendered on its own rather than through Fields. It applies to every transaction view, not only a site’s. A certificate’s stake key stays as it is, since the summary already says whose it is.

Tests

Not in it

As built