taler-typescript-core

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

commit 80a4e3ae58fde4b715b5059a91cb786f286fb40a
parent 7960a45400ea260aed0ef37e7c9110ee1c4a8cb6
Author: Iván Ávalos <avalos@disroot.org>
Date:   Wed, 30 Apr 2025 14:25:19 +0200

taler-util: fix contract terms choice index check

Diffstat:
Mpackages/taler-util/src/contract-terms.ts | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/packages/taler-util/src/contract-terms.ts b/packages/taler-util/src/contract-terms.ts @@ -303,7 +303,7 @@ export namespace ContractTermsUtil { maxFee: undefined, }; } - if (choiceIndex in contractTerms.choices) + if (contractTerms.choices[choiceIndex] === undefined) throw Error(`invalid choice index ${choiceIndex}`); amountRaw = contractTerms.choices[choiceIndex].amount; maxFee = contractTerms.choices[choiceIndex].max_fee;