diff --git a/src/transaction.rs b/src/transaction.rs index cdf56f4..029d86c 100644 --- a/src/transaction.rs +++ b/src/transaction.rs @@ -482,7 +482,7 @@ fn choose_utxos( } } if total < *amount + fee { - if total >= *amount { + if total >= *amount && *amount > fee { *amount -= fee; } else { Err("Not enough balance")?; @@ -537,7 +537,7 @@ fn choose_notes( } if total < *amount + fee { - if total >= *amount { + if total >= *amount && *amount > fee { *amount -= fee } else { Err("Not enough balance")?;