diff options
author | Sebastian <sebasjm@gmail.com> | 2022-11-16 16:04:52 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-11-16 16:05:13 -0300 |
commit | 1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e (patch) | |
tree | 7255cf4a5b51af4807e2a01a370497413a78968f /packages/taler-util/src/wallet-types.ts | |
parent | 53164dc47b1138235a0c797affaa6fb37ea43239 (diff) | |
download | wallet-core-1a63d56bfdd091cc7aefdf1e25f3a074bfdf5e0e.tar.xz |
fix #7411, also making the backup payment visible
Diffstat (limited to 'packages/taler-util/src/wallet-types.ts')
-rw-r--r-- | packages/taler-util/src/wallet-types.ts | 8 |
1 files changed, 7 insertions, 1 deletions
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<TalerErrorDetail> => + buildCodecForObject<TalerErrorDetail>() + .property("code", codecForNumber()) + .property("hint", codecOptional(codecForString())) + .build("TalerErrorDetail"); + export type ConfirmPayResult = ConfirmPayResultDone | ConfirmPayResultPending; export const codecForConfirmPayResultPending = (): Codec<ConfirmPayResultPending> => buildCodecForObject<ConfirmPayResultPending>() - .property("lastError", codecForAny()) + .property("lastError", codecOptional(codecForTalerErrorDetail())) .property("transactionId", codecForString()) .property("type", codecForConstString(ConfirmPayResultType.Pending)) .build("ConfirmPayResultPending"); |