summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/walletTypes.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-11-24 08:55:37 -0300
committerSebastian <sebasjm@gmail.com>2021-11-24 08:58:48 -0300
commitf07436aa4910114a514235fb17879411dae0a555 (patch)
tree83e1dd651ca895882b74aa6bb1d5f188a3415e4d /packages/taler-util/src/walletTypes.ts
parentb3b3c21acba0cda261d339572de02aff0e704b59 (diff)
downloadwallet-core-f07436aa4910114a514235fb17879411dae0a555.tar.gz
wallet-core-f07436aa4910114a514235fb17879411dae0a555.tar.bz2
wallet-core-f07436aa4910114a514235fb17879411dae0a555.zip
new exchange-added notifiaction and including tos information in the wxApi.listExchange api
Diffstat (limited to 'packages/taler-util/src/walletTypes.ts')
-rw-r--r--packages/taler-util/src/walletTypes.ts15
1 files changed, 15 insertions, 0 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 879640e8..f00e2907 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -523,17 +523,32 @@ export interface ExchangesListRespose {
exchanges: ExchangeListItem[];
}
+export interface ExchangeTos {
+ acceptedVersion?: string;
+ currentVersion?: string;
+ contentType?: string;
+ content?: string;
+}
export interface ExchangeListItem {
exchangeBaseUrl: string;
currency: string;
paytoUris: string[];
+ tos: ExchangeTos;
}
+const codecForExchangeTos = (): Codec<ExchangeTos> => buildCodecForObject<ExchangeTos>()
+ .property("acceptedVersion", codecOptional(codecForString()))
+ .property("currentVersion", codecOptional(codecForString()))
+ .property("contentType", codecOptional(codecForString()))
+ .property("content", codecOptional(codecForString()))
+ .build("ExchangeTos")
+
export const codecForExchangeListItem = (): Codec<ExchangeListItem> =>
buildCodecForObject<ExchangeListItem>()
.property("currency", codecForString())
.property("exchangeBaseUrl", codecForString())
.property("paytoUris", codecForList(codecForString()))
+ .property("tos", codecForExchangeTos())
.build("ExchangeListItem");
export const codecForExchangesListResponse = (): Codec<ExchangesListRespose> =>