[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: fix account sort
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: fix account sort order to match spec |
Date: |
Thu, 28 Mar 2024 12:53:06 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 89ccb56db wallet-core: fix account sort order to match spec
89ccb56db is described below
commit 89ccb56dbb2a4f22588244dcbe81338b844cc3ea
Author: Florian Dold <florian@dold.me>
AuthorDate: Thu Mar 28 12:53:00 2024 +0100
wallet-core: fix account sort order to match spec
---
packages/taler-wallet-core/src/withdraw.ts | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/packages/taler-wallet-core/src/withdraw.ts
b/packages/taler-wallet-core/src/withdraw.ts
index 424f370ff..8767c1eca 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -3016,10 +3016,10 @@ async function fetchWithdrawalAccountInfo(
withdrawalAccounts.push(acctInfo);
}
withdrawalAccounts.sort((x1, x2) => {
- // Accounts without priority come last.
- const n1 = x1.priority ?? Number.MAX_SAFE_INTEGER;
- const n2 = x2.priority ?? Number.MAX_SAFE_INTEGER;
- return Math.sign(n1 - n2);
+ // Accounts without explicit priority have prio 0.
+ const n1 = x1.priority ?? 0;
+ const n2 = x2.priority ?? 0;
+ return Math.sign(n2 - n1);
});
return withdrawalAccounts;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: wallet-core: fix account sort order to match spec,
gnunet <=