From 1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e Mon Sep 17 00:00:00 2001 From: Sebastian Date: Wed, 16 Nov 2022 16:04:52 -0300 Subject: fix #7411, also making the backup payment visible --- packages/taler-util/src/punycode.ts | 2 +- packages/taler-util/src/wallet-types.ts | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'packages/taler-util/src') diff --git a/packages/taler-util/src/punycode.ts b/packages/taler-util/src/punycode.ts index 353e3bf25..acb8ce911 100644 --- a/packages/taler-util/src/punycode.ts +++ b/packages/taler-util/src/punycode.ts @@ -465,4 +465,4 @@ export const punycode = { encode: encode, toASCII: toASCII, toUnicode: toUnicode, -}; \ No newline at end of file +}; diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index 4e1563e27..900fb7407 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -241,12 +241,18 @@ export interface ConfirmPayResultPending { lastError: TalerErrorDetail | undefined; } +export const codecForTalerErrorDetail = (): Codec => + buildCodecForObject() + .property("code", codecForNumber()) + .property("hint", codecOptional(codecForString())) + .build("TalerErrorDetail"); + export type ConfirmPayResult = ConfirmPayResultDone | ConfirmPayResultPending; export const codecForConfirmPayResultPending = (): Codec => buildCodecForObject() - .property("lastError", codecForAny()) + .property("lastError", codecOptional(codecForTalerErrorDetail())) .property("transactionId", codecForString()) .property("type", codecForConstString(ConfirmPayResultType.Pending)) .build("ConfirmPayResultPending"); -- cgit v1.2.3