taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 19cabc181a232203c00054e0be34bb805b989722
parent 5ad1a7a8da36a2f2a98a0836752e330b304c8af2
Author: Sebastian <sebasjm@taler-systems.com>
Date:   Wed, 22 Jul 2026 15:22:58 -0300

prevent off by one

Diffstat:
Mpackages/taler-merchant-webui/src/paths/instance/orders/details/DetailPage.tsx | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/taler-merchant-webui/src/paths/instance/orders/details/DetailPage.tsx b/packages/taler-merchant-webui/src/paths/instance/orders/details/DetailPage.tsx @@ -1180,7 +1180,7 @@ export function getOrderAmountAndMaxDepositFee( } if (order.contract_terms.version === MerchantContractVersion.V1) { if (order.choice_index === undefined) return "v1-without-index" as const; - if (order.choice_index > order.contract_terms.choices.length) + if (order.choice_index >= order.contract_terms.choices.length) return "v1-wrong-index" as const; const choice = order.contract_terms.choices[order.choice_index]; const amount = Amounts.parseOrThrow(choice.amount);