taler-typescript-core

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

commit 5fa0292ffa6d13c29b4349b57a1ab8cb386d1aa0
parent 45c3cd31b0db889575f30a0ed3962061f2f2d62b
Author: Florian Dold <florian@dold.me>
Date:   Wed,  3 Jun 2026 19:39:07 +0200

wallet-core: do not fall back to global scope in choices[].scopeInfo

Diffstat:
Mpackages/taler-util/src/types-taler-wallet.ts | 2+-
Mpackages/taler-wallet-core/src/pay-merchant.ts | 7+------
2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/packages/taler-util/src/types-taler-wallet.ts b/packages/taler-util/src/types-taler-wallet.ts @@ -2598,7 +2598,7 @@ export interface ChoiceSelectionDetailPaymentPossible { status: ChoiceSelectionDetailType.PaymentPossible; amountRaw: AmountString; amountEffective: AmountString; - scopeInfo: ScopeInfo; + scopeInfo: ScopeInfo | undefined; tokenDetails?: PaymentTokenAvailabilityDetails; } diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts @@ -2738,8 +2738,6 @@ export async function getChoicesForPayment( } else { // We use the first known scope for the // exchanges of the selected coins. - // If no such scope exists, we return - // the global currency scope as a fallback. let scopeInfo = await wex.runLegacyWalletDbTx(async (tx) => { for (const exch of exchanges) { const s = await getExchangeScopeInfoOrUndefined(tx, exch); @@ -2747,10 +2745,7 @@ export async function getChoicesForPayment( return s; } } - return { - type: ScopeType.Global, - currency, - } satisfies ScopeInfo; + return undefined; }); choice = { status: ChoiceSelectionDetailType.PaymentPossible,