From 665c42f595151650bb87a3108a19d6df67ed6324 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 6 Sep 2023 10:48:16 +0200 Subject: draft for better operation status codes --- packages/taler-wallet-core/src/db.ts | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts index b9d86eb25..0c51a68c9 100644 --- a/packages/taler-wallet-core/src/db.ts +++ b/packages/taler-wallet-core/src/db.ts @@ -117,11 +117,17 @@ export const TALER_WALLET_MAIN_DB_NAME = "taler-wallet-main-v9"; export const TALER_WALLET_META_DB_NAME = "taler-wallet-meta"; /** - * Stored backups, mainly created when manually importing a backup. + * Name of the "stored backups" database. + * Stored backups are created before manually importing a backup. + * We use IndexedDB for this purpose, since we don't have file system + * access on some platforms. */ export const TALER_WALLET_STORED_BACKUPS_DB_NAME = "taler-wallet-stored-backups"; +/** + * Name of the "meta config" database. + */ export const CURRENT_DB_CONFIG_KEY = "currentMainDbName"; /** @@ -133,6 +139,32 @@ export const CURRENT_DB_CONFIG_KEY = "currentMainDbName"; */ export const WALLET_DB_MINOR_VERSION = 10; + + +/** + * Format of the operation status code: xyznnn + * + * x=1: active + * yz=00: pending + * yz=02: dialog + * yz=03: aborting + * yz=10: suspended + * yz=13: suspended-aborting + * x=2: final + * yz=00: done + * yz=01: failed + * yz=02: expired + * yz=03: aborted + */ +// export const OperationStatusRange = { +// ActiveStart: 10000, +// ActiveEnd: 10999, +// SuspendedStart: 10999, +// SuspendedEnd: 10999, +// FinalStart: 20000, +// FinalEnd: 29999, +//} as const; + /** * Ranges for operation status fields. * -- cgit v1.2.3