sort is done after candidate selection

This commit is contained in:
Florian Dold 2021-03-15 13:45:24 +01:00
parent 44b1896b9e
commit 42a4d666f4
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -335,16 +335,6 @@ export async function getCandidatePayCoins(
}
}
// Sort by available amount (descending), deposit fee (ascending) and
// denomPub (ascending) if deposit fee is the same
// (to guarantee deterministic results)
candidateCoins.sort(
(o1, o2) =>
-Amounts.cmp(o1.availableAmount, o2.availableAmount) ||
Amounts.cmp(o1.feeDeposit, o2.feeDeposit) ||
strcmp(o1.denomPub, o2.denomPub),
);
return {
candidateCoins,
wireFeesPerExchange,