diff --git a/cashu/wallet/transactions.py b/cashu/wallet/transactions.py index 51b0343e..f1a6499f 100644 --- a/cashu/wallet/transactions.py +++ b/cashu/wallet/transactions.py @@ -95,8 +95,8 @@ def coinselect( smaller_proofs[1:], remainder, include_fees=include_fees ) sum_selected_proofs = sum_proofs(selected_proofs) - - if sum_selected_proofs < amount_to_send and next_bigger: + fee_ppk_selected = self.get_fees_for_proofs_ppk(selected_proofs) + if sum_selected_proofs < amount_to_send + fee_ppk_selected and next_bigger: logger.trace("> adding next bigger proof") return [next_bigger]