taler-typescript-core

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

commit 44fa9a141ac3ca5a73d600d48be373bd43f7f07d
parent a3e21f9c7df2338557ae8845fbca4d050a6997a2
Author: Florian Dold <florian@dold.me>
Date:   Wed,  4 Mar 2026 12:56:29 +0100

wallet-core: add extra invariant check

Diffstat:
Mpackages/taler-wallet-core/src/withdraw.ts | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/packages/taler-wallet-core/src/withdraw.ts b/packages/taler-wallet-core/src/withdraw.ts @@ -1475,6 +1475,13 @@ export async function getWithdrawableDenomsTx( if (logger.shouldLogTrace()) { logger.trace(`relevant denoms: ${j2s(relevantDenoms)}`); } + for (const denom of relevantDenoms) { + if (denom.exchangeBaseUrl != exchangeBaseUrl) { + throw Error( + "invariant violation in withdrawal denom selection (exchangeBaseUrl)", + ); + } + } return relevantDenoms; }