aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-15 12:59:26 +0200
committerFlorian Dold <florian@dold.me>2022-10-15 12:59:26 +0200
commitbd88dcebbcf90414c790a86ee13740eaf20e3334 (patch)
tree3faa7508089bfa4316aebb310a7a5cf55076db34 /packages/taler-util
parente075134ffc94fda3582b179122bda594d91a962b (diff)
downloadwallet-core-bd88dcebbcf90414c790a86ee13740eaf20e3334.tar.xz
wallet-core: simplify exchanges list response
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/wallet-types.ts13
1 files changed, 11 insertions, 2 deletions
diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts
index 54f4c54a2..aba1b1185 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -900,11 +900,18 @@ export interface ExchangeFullDetails {
globalFees: FeeDescription[];
}
+export enum ExchangeTosStatus {
+ New = "new",
+ Accepted = "accepted",
+ Changed = "changed",
+ NotFound = "not-found",
+}
+
export interface ExchangeListItem {
exchangeBaseUrl: string;
currency: string;
paytoUris: string[];
- tos: ExchangeTosStatusDetails;
+ tosStatus: ExchangeTosStatus;
}
const codecForAuditorDenomSig = (): Codec<AuditorDenomSig> =>
@@ -976,7 +983,7 @@ export const codecForExchangeListItem = (): Codec<ExchangeListItem> =>
.property("currency", codecForString())
.property("exchangeBaseUrl", codecForString())
.property("paytoUris", codecForList(codecForString()))
- .property("tos", codecForExchangeTos())
+ .property("tosStatus", codecForAny())
.build("ExchangeListItem");
export const codecForExchangesListResponse = (): Codec<ExchangesListResponse> =>
@@ -1146,6 +1153,8 @@ export interface GetExchangeTosResult {
* Accepted content type
*/
contentType: string;
+
+ tosStatus: ExchangeTosStatus;
}
export interface TestPayArgs {