Respect mint amount limits and preserve payment failure health #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/mint-limits-and-health"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The auditor was requesting amounts below the 100-sat minimum advertised by ucash and Sovran, then displaying CDK's misleading zero-valued limit error. Hourly info probes also reset mints to healthy even when invoice creation continued to fail.
Normal swap selection now intersects the receiver's NUT-04 limits and sender's NUT-05 limits with configured amounts, donation headroom, and the sender's balance buffer. A 100-sat minimum produces a 100-sat audit under the default configuration when the pair can afford it; incompatible pairs are skipped. Selection respects both mints' cooldowns and admits failed mints again once cooldown expires.
Amount rejections report the requested amount and last advertised bounds. CDK 0.18 has already discarded the remote details for code 11006, so missing details are explicitly labeled instead of inventing zero bounds or presenting cached metadata as the original response. Mint backend exceptions retain their raw detail, gain an operator-facing explanation, and are classified separately from amount/configuration failures.
Info probes continue to populate availability history, but cannot clear the latest attributed payment failure. A settled swap restores payment health. This also corrects previously cleared statuses using existing swap history, without a schema migration. Counterparty failures and local wallet faults do not mark an otherwise working mint as failed. The uptime explanation and README document the distinction.
Validation:
cargo +nightly fmt --checkcargo +nightly test --locked --offline --no-default-features --features=ssrcargo +nightly clippy --locked --offline --no-default-features --features=ssr --all-targets -- -D warningscargo +nightly clippy --locked --offline --lib --no-default-features --features=hydrate --target wasm32-unknown-unknown -- -D warningsRoutstr's server-side Python exception still requires investigation by its operator. This change makes that failure visible and actionable; it does not repair the remote mint. No live payments were made while implementing or testing these changes.
Pull request closed