mirror of
https://github.com/aljazceru/cdk.git
synced 2026-01-17 11:55:29 +01:00
fix: send proofs change
This commit is contained in:
@@ -162,13 +162,13 @@ impl CashuWallet {
|
||||
let mut send_proofs = SendProofs::default();
|
||||
|
||||
for proof in proofs {
|
||||
let proof_value = proof.amount;
|
||||
if amount_available > amount {
|
||||
send_proofs.change_proofs.push(proof);
|
||||
break;
|
||||
} else {
|
||||
amount_available += proof.amount;
|
||||
send_proofs.send_proofs.push(proof);
|
||||
}
|
||||
amount_available += proof_value;
|
||||
}
|
||||
|
||||
if amount_available.lt(&amount) {
|
||||
|
||||
Reference in New Issue
Block a user