From 21418a114a24a57eeb3eb8fee22f34300bb4471c Mon Sep 17 00:00:00 2001 From: elnosh Date: Fri, 1 Nov 2024 04:22:12 -0500 Subject: [PATCH] sort split in split_wallet_state (#653) --- cashu/wallet/wallet.py | 1 + 1 file changed, 1 insertion(+) diff --git a/cashu/wallet/wallet.py b/cashu/wallet/wallet.py index 6533aac2..c6458a71 100644 --- a/cashu/wallet/wallet.py +++ b/cashu/wallet/wallet.py @@ -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: