summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/types/talerTypes.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/types/talerTypes.ts')
-rw-r--r--packages/taler-wallet-core/src/types/talerTypes.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/types/talerTypes.ts b/packages/taler-wallet-core/src/types/talerTypes.ts
index bb0118a78..99f44ea25 100644
--- a/packages/taler-wallet-core/src/types/talerTypes.ts
+++ b/packages/taler-wallet-core/src/types/talerTypes.ts
@@ -47,7 +47,7 @@ import {
Duration,
codecForDuration,
} from "../util/time";
-import { ExchangeListItem } from "./walletTypes";
+import { ExchangeListItem, codecForExchangeListItem } from "./walletTypes";
import { codecForAmountString } from "../util/amounts";
/**
@@ -940,6 +940,13 @@ export interface WithdrawUriInfoResponse {
possibleExchanges: ExchangeListItem[];
}
+export const codecForWithdrawUriInfoResponse = (): Codec<WithdrawUriInfoResponse> =>
+ buildCodecForObject<WithdrawUriInfoResponse>()
+ .property("amount", codecForAmountString())
+ .property("defaultExchangeBaseUrl", codecOptional(codecForString()))
+ .property("possibleExchanges", codecForList(codecForExchangeListItem()))
+ .build("WithdrawUriInfoResponse");
+
/**
* Response body for the following endpoint:
*