summaryrefslogtreecommitdiff
path: root/packages/taler-util
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-10-15 21:26:36 +0200
committerFlorian Dold <florian@dold.me>2022-10-15 21:26:36 +0200
commitfbb7dd9e7e7fe4cf0611f5827f0bd250634dc29f (patch)
treeb6fb1fc37c67f72e8d2333d76fd1588931d261cb /packages/taler-util
parentd98d49aa58d59e6d428e5d024ba3f6ea0352ae2a (diff)
downloadwallet-core-fbb7dd9e7e7fe4cf0611f5827f0bd250634dc29f.tar.gz
wallet-core-fbb7dd9e7e7fe4cf0611f5827f0bd250634dc29f.tar.bz2
wallet-core-fbb7dd9e7e7fe4cf0611f5827f0bd250634dc29f.zip
wallet-core, wallet-cli: add status to exchange list, add detail query to CLI
Diffstat (limited to 'packages/taler-util')
-rw-r--r--packages/taler-util/src/wallet-types.ts18
1 files changed, 17 insertions, 1 deletions
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<AuditorDenomSig> =>
@@ -984,6 +998,8 @@ export const codecForExchangeListItem = (): Codec<ExchangeListItem> =>
.property("exchangeBaseUrl", codecForString())
.property("paytoUris", codecForList(codecForString()))
.property("tosStatus", codecForAny())
+ .property("exchangeStatus", codecForAny())
+ .property("permanent", codecForBoolean())
.build("ExchangeListItem");
export const codecForExchangesListResponse = (): Codec<ExchangesListResponse> =>