taler-typescript-core

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

commit 2a71db70c87f0f75c02f9efb81dfad941a7289bc
parent 569a13cf456197beddc17cc6928be335410a1463
Author: Florian Dold <florian@dold.me>
Date:   Fri, 29 May 2026 13:41:39 +0200

wallet-core: be less strict about merchant base URLs

Diffstat:
Mpackages/taler-wallet-core/src/pay-merchant.ts | 20+++++++-------------
1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts @@ -1086,19 +1086,13 @@ async function processDownloadProposal( const baseUrlFromContractTerms = parsedContractTerms.merchant_base_url; if (baseUrlForDownload !== baseUrlFromContractTerms) { - const err = makeErrorDetail( - TalerErrorCode.WALLET_CONTRACT_TERMS_BASE_URL_MISMATCH, - { - baseUrlForDownload, - baseUrlFromContractTerms, - }, - "merchant base URL mismatch", - ); - await failProposalClaimPermanently(wex, proposalId, err); - throw makePendingOperationFailedError( - err, - TransactionType.Payment, - proposalId, + // We only write a warning here, since there are various real-world scenarios where + // a mismatch is possible: + // - Case mismatch between instance name (since the merchant treats them case-insensitively) + // - Merchant wants to use some shortened URL for the QR code + // It used to be an error in the past, but it turned out to not be useful. + logger.warn( + `base URL mismatch between taler:// URI and contract terms: ${baseUrlForDownload} / ${baseUrlFromContractTerms}`, ); }