Error message improvement: The error message ("Unit mismatch") when a swap results in zero outputs, which can happen due to fees, isn't very helpful #1356
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk#1356
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
If you call
receive_proofson aWalletwith just a single-sat proof and the fees are non-zero, then the swap is basically impossible because it will try to do a swap with zero outputsThe wallet currently does attempt that swap, and the error message from the mint says there is a Unit mismatch. This is because
verify_outputsinmint/verification.rs:180returnsVerification { amount: Amount::ZERO, unit: None, }.Maybe the wallet should refuse to send a zero-output swap, and give a useful error message instead?
One possibility is to include something like this in
wallet/swap.rs:Yeah I noticed this as well (https://github.com/cashubtc/cdk/issues/1319). Im going to look into this this week