Repository navigation
Wallet: support a custom unilateral exit address and fee rate - #1656
Conversation
90e8b26 to
b764c6d
Compare
Persist the destination and initial rate atomically with admission. Upgrade either schema 33 history without dropping terms or fee splits.
Use the persisted payout for the sweep and the reviewed initial rate for new packages. Keep dust and uneconomical exits out of funding.
Expose custom payout and fee terms through the wallet RPC and SDK. Price shared recovery transactions in the read-only selection preview. Require explicit acknowledgement to start with custom terms.
60acb76 to
33fcd4c
Compare
|
/gateway review |
|
Cannot run |
|
/gateway review Please review 33fcd4c. Focus on preserving the two schema 33 histories, atomic persistence and restart of custom payout terms, read-only preview pricing and dust checks, fee inputs, and the explicit acknowledgement for custom options. Flag concrete regressions in this diff, with the reachable caller, consequence and existing guard. |
|
❌ gateway review failed: code-review skill failed across all auth modes: You've hit your org's monthly spend limit · ask your admin to raise it at https://claude.ai/admin-settings/usage · your weekly limit resets Nov 29, 6am (UTC) See workflow logs for details. |
|
Claude: Verdict: approve I found no blockers. I traced each item in scope through the diff and its callers. I ran the targeted tests in VerifiedTwo schema 33 histories
Atomic admission and restart
Stale terms are cleared
Reviewed payout and rate reach the sweep and txconfirm
Ledger
Preview costs and funding addresses
Backwards compatibility
Non-blocking follow-ups1. New terms on an exit already in progress are silently ignored.
2. A preview against an older daemon ignores custom terms.
3. Test gap.
Pre-existing or documented limits (no action needed)
|
What this enables
A wallet can choose a Bitcoin payout address and an initial fee rate before starting a unilateral exit. The read-only selection preview prices those settings, counts shared recovery transactions once, and estimates the extra fee funding separately from the network fees.
How it works
Migration 34 supports both schema 33 histories. It ensures both tables exist and preserves saved exit settings and pending signed fee splits. The selection preview estimates confirmed change reuse. The current admission RPC still checks and admits each VTXO separately.
Verification
Generated protobuf and SQL artifacts with the repository tooling. Changed-code lint and focused daemon, SDK, unroll, and database tests passed. Migration tests cover preserved manual exit settings and a preserved pending fee split. Built the iOS simulator framework with the mobile bridge patch applied.