Skip to content

Commit

Permalink
coinselect: consider fees for edge case in selection
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Oct 22, 2024
1 parent 09d007e commit cfcbbc5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cashu/wallet/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit cfcbbc5

Please sign in to comment.