commit f524fbb633e80675b4ab2134717b0f3a293815ea
parent e27c7c3219d67801ec42ed660ab104914201aed4
Author: Florian Dold <florian@dold.me>
Date: Fri, 28 Nov 2025 19:49:45 +0100
util: fix optional field
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/packages/taler-util/src/types-taler-merchant.ts b/packages/taler-util/src/types-taler-merchant.ts
@@ -2872,7 +2872,8 @@ export interface CheckPaymentUnpaidResponse {
summary: string;
// Total amount of the order (to be paid by the customer).
- total_amount: AmountString;
+ // Optional for v1 contracts.
+ total_amount?: AmountString;
// Alternative order ID which was paid for already in the same session.
// Only given if the same product was purchased before in the same session.
@@ -4599,7 +4600,7 @@ export const codecForCheckPaymentUnpaidResponse =
.property("creation_time", codecForTimestamp)
.property("pay_deadline", codecOptional(codecForTimestamp))
.property("summary", codecForString())
- .property("total_amount", codecForAmountString())
+ .property("total_amount", codecOptional(codecForAmountString()))
.property("already_paid_order_id", codecOptional(codecForString()))
.property("already_paid_fulfillment_url", codecOptional(codecForString()))
.property("order_status_url", codecForString())