From fbb7dd9e7e7fe4cf0611f5827f0bd250634dc29f Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sat, 15 Oct 2022 21:26:36 +0200 Subject: wallet-core, wallet-cli: add status to exchange list, add detail query to CLI --- packages/taler-util/src/wallet-types.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'packages/taler-util') diff --git a/packages/taler-util/src/wallet-types.ts b/packages/taler-util/src/wallet-types.ts index aba1b1185..7e538b2d9 100644 --- a/packages/taler-util/src/wallet-types.ts +++ b/packages/taler-util/src/wallet-types.ts @@ -905,13 +905,27 @@ export enum ExchangeTosStatus { Accepted = "accepted", Changed = "changed", NotFound = "not-found", + Unknown = "unknown", } +export enum ExchangeEntryStatus { + Unknown = "unknown", + Outdated = "outdated", + Ok = "ok", +} + +// FIXME: This should probably include some error status. export interface ExchangeListItem { exchangeBaseUrl: string; - currency: string; + currency: string | undefined; paytoUris: string[]; tosStatus: ExchangeTosStatus; + exchangeStatus: ExchangeEntryStatus; + /** + * Permanently added to the wallet, as opposed to just + * temporarily queried. + */ + permanent: boolean; } const codecForAuditorDenomSig = (): Codec => @@ -984,6 +998,8 @@ export const codecForExchangeListItem = (): Codec => .property("exchangeBaseUrl", codecForString()) .property("paytoUris", codecForList(codecForString())) .property("tosStatus", codecForAny()) + .property("exchangeStatus", codecForAny()) + .property("permanent", codecForBoolean()) .build("ExchangeListItem"); export const codecForExchangesListResponse = (): Codec => -- cgit v1.2.3