aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-06 10:48:16 +0200
committerFlorian Dold <florian@dold.me>2023-09-06 10:48:16 +0200
commit665c42f595151650bb87a3108a19d6df67ed6324 (patch)
tree4161a5973ff17ff3b2e3c7ef29ce63c9ac2d2d58
parent49b0f5337c27c5da3e85c512de72e6903e928bc8 (diff)
downloadwallet-core-665c42f595151650bb87a3108a19d6df67ed6324.tar.xz
draft for better operation status codes
-rw-r--r--packages/taler-wallet-core/src/db.ts34
1 files changed, 33 insertions, 1 deletions
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.
*