diff --git a/src/bitcoin/mod.rs b/src/bitcoin/mod.rs index 36db57e5..3941afcd 100644 --- a/src/bitcoin/mod.rs +++ b/src/bitcoin/mod.rs @@ -787,7 +787,7 @@ impl Bitcoin { ); } - let value = Into::::into(amount) / self.config.units_per_sat; + let value = (Into::::into(amount) - fee_amount) / self.config.units_per_sat; if value < self.config.min_withdrawal_amount { return Err(OrgaError::App( "Withdrawal is smaller than than the minimum amount".to_string(),