gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-webex] branch master updated: wallet db versi


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] branch master updated: wallet db version belongs with wallet, not webex
Date: Mon, 05 Jun 2017 03:36:36 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-webex.

The following commit(s) were added to refs/heads/master by this push:
     new d2833312 wallet db version belongs with wallet, not webex
d2833312 is described below

commit d28333128568bf3967485763899d3afc8cad9bee
Author: Florian Dold <address@hidden>
AuthorDate: Mon Jun 5 03:36:33 2017 +0200

    wallet db version belongs with wallet, not webex
---
 src/wallet.ts          | 14 ++++++++++++++
 src/webex/wxBackend.ts | 15 ++++-----------
 2 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/wallet.ts b/src/wallet.ts
index a4e1d46f..5de3906d 100644
--- a/src/wallet.ts
+++ b/src/wallet.ts
@@ -329,8 +329,22 @@ export interface ConfigRecord {
 }
 
 
+/**
+ * Wallet protocol version spoken with the exchange
+ * and merchant.
+ *
+ * Uses libtool's current:revision:age versioning.
+ */
 export const WALLET_PROTOCOL_VERSION = "0:0:0";
 
+/**
+ * Current database version, should be incremented
+ * each time we do incompatible schema changes on the database.
+ * In the future we might consider adding migration functions for
+ * each version increment.
+ */
+export const WALLET_DB_VERSION = 18;
+
 const builtinCurrencies: CurrencyRecord[] = [
   {
     auditors: [
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 0bd4a211..0531b7d6 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -39,6 +39,7 @@ import {
   ConfirmReserveRequest,
   CreateReserveRequest,
   Stores,
+  WALLET_DB_VERSION,
   Wallet,
 } from "../wallet";
 
@@ -53,14 +54,6 @@ import MessageSender = chrome.runtime.MessageSender;
 
 const DB_NAME = "taler";
 
-/**
- * Current database version, should be incremented
- * each time we do incompatible schema changes on the database.
- * In the future we might consider adding migration functions for
- * each version increment.
- */
-const DB_VERSION = 18;
-
 const NeedsWallet = Symbol("NeedsWallet");
 
 function handleMessage(sender: MessageSender,
@@ -291,7 +284,7 @@ function handleMessage(sender: MessageSender,
       }
       const resp: wxApi.UpgradeResponse = {
         dbResetRequired,
-        currentDbVersion: DB_VERSION.toString(),
+        currentDbVersion: WALLET_DB_VERSION.toString(),
         oldDbVersion: (oldDbVersion || "unknown").toString(),
       }
       return resp;
@@ -641,7 +634,7 @@ export async function wxMain() {
  */
 function openTalerDb(): Promise<IDBDatabase> {
   return new Promise<IDBDatabase>((resolve, reject) => {
-    const req = indexedDB.open(DB_NAME, DB_VERSION);
+    const req = indexedDB.open(DB_NAME, WALLET_DB_VERSION);
     req.onerror = (e) => {
       console.log("taler database error", e);
       reject(e);
@@ -674,7 +667,7 @@ function openTalerDb(): Promise<IDBDatabase> {
           }
           break;
         default:
-          if (e.oldVersion !== DB_VERSION) {
+          if (e.oldVersion !== WALLET_DB_VERSION) {
             oldDbVersion = e.oldVersion;
             chrome.tabs.create({
               url: 
chrome.extension.getURL("/src/webex/pages/reset-required.html"),

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]