aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/db.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/db.ts')
-rw-r--r--packages/taler-wallet-core/src/db.ts35
1 files changed, 34 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/db.ts b/packages/taler-wallet-core/src/db.ts
index 78c73fba5..8aff18c6d 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -121,7 +121,7 @@ export const CURRENT_DB_CONFIG_KEY = "currentMainDbName";
* backwards-compatible way or object stores and indices
* are added.
*/
-export const WALLET_DB_MINOR_VERSION = 2;
+export const WALLET_DB_MINOR_VERSION = 3;
/**
* Ranges for operation status fields.
@@ -1956,11 +1956,44 @@ export interface UserAttentionRecord {
read: TalerProtocolTimestamp | undefined;
}
+export interface DbExchangeHandle {
+ url: string;
+ exchangeMasterPub: string;
+}
+
+export interface DbAuditorHandle {
+ url: string;
+ auditorPub: string;
+}
+
+// Work in progress for regional currencies
+export interface CurrencySettingsRecord {
+ currency: string;
+
+ globalScopeExchanges: DbExchangeHandle[];
+
+ globalScopeAuditors: DbAuditorHandle[];
+
+ // Used to decide which auditor to show the currency under
+ // when multiple auditors apply.
+ auditorPriority: string[];
+
+ // Later, we might add stuff related to how the currency is rendered.
+}
+
/**
* Schema definition for the IndexedDB
* wallet database.
*/
export const WalletStoresV1 = {
+ currencySettings: describeStore(
+ "currencySettings",
+ describeContents<CurrencySettingsRecord>({
+ keyPath: ["currency"],
+ versionAdded: 3,
+ }),
+ {},
+ ),
coinAvailability: describeStore(
"coinAvailability",
describeContents<CoinAvailabilityRecord>({