commit ef3fedd89508f45e3f092710de6c4b849e2054c9 parent eeeb69164dd7eb0ebcbc6bd41a3a50da3615df98 Author: Florian Dold <dold@taler.net> Date: Thu, 3 Sep 2026 16:01:24 +0200 wallet-core: return an empty selection when no denomination fits Throwing made the coded insufficient-denominations path, and the experiment meant to exercise it, unreachable. Diffstat:
| M | packages/taler-wallet-core/src/denomSelection.ts | | | 8 | ++------ |
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/packages/taler-wallet-core/src/denomSelection.ts b/packages/taler-wallet-core/src/denomSelection.ts @@ -83,12 +83,8 @@ export function selectWithdrawalDenominations( denoms: WalletDenomination[], opts: { limitCoins?: number } = {}, ): DenomSelectionState { - if (denoms.length == 0) { - // This is a protocol violation. - // We won't proceed. - throw Error("no withdrawal denominations available"); - } - + // No candidate denominations yield an empty selection; the caller + // reports that as insufficient denominations. let remaining = Amounts.copy(amountAvailable); const selectedDenoms: {