Skip to content

Commit

Permalink
sort split in split_wallet_state (#653)
Browse files Browse the repository at this point in the history
  • Loading branch information
elnosh authored Nov 1, 2024
1 parent fc9ed7c commit 21418a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cashu/wallet/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ def split_wallet_state(self, amount: int) -> List[int]:
remaining_amount = amount - sum(amounts)
if remaining_amount > 0:
amounts += amount_split(remaining_amount)
amounts.sort()

logger.debug(f"Amounts we want: {amounts}")
if sum(amounts) != amount:
Expand Down

0 comments on commit 21418a1

Please sign in to comment.