From bd88dcebbcf90414c790a86ee13740eaf20e3334 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 15 Oct 2022 12:59:26 +0200 Subject: wallet-core: simplify exchanges list response --- packages/taler-util/src/wallet-types.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'packages/taler-util') 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 => @@ -976,7 +983,7 @@ export const codecForExchangeListItem = (): Codec => .property("currency", codecForString()) .property("exchangeBaseUrl", codecForString()) .property("paytoUris", codecForList(codecForString())) - .property("tos", codecForExchangeTos()) + .property("tosStatus", codecForAny()) .build("ExchangeListItem"); export const codecForExchangesListResponse = (): Codec => @@ -1146,6 +1153,8 @@ export interface GetExchangeTosResult { * Accepted content type */ contentType: string; + + tosStatus: ExchangeTosStatus; } export interface TestPayArgs { -- cgit v1.2.3