commit 7e400973186deab8177d805434a83cfc15984722
parent 0bdd8292778575416be8183affd0c658057e4148
Author: Florian Dold <florian@dold.me>
Date: Fri, 17 Jul 2026 19:07:35 +0200
wallet-core: check if auto-refund is zero
The merchant treats absence of the field and zero the same way.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts
@@ -1558,7 +1558,7 @@ async function storeFirstPaySuccess(
contractTermsRecord.contractTermsRaw,
);
const protoAr = contractTerms.auto_refund;
- if (protoAr) {
+ if (protoAr && protoAr.d_us != 0) {
const ar = Duration.fromTalerProtocolDuration(protoAr);
logger.info("auto_refund present");
purchase.purchaseStatus = PurchaseStatus.FinalizingQueryingAutoRefund;