[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: added v6 migration skip and r
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: added v6 migration skip and removed rowId field when rowId is undefined (otherwise autoincrement value won't work) |
Date: |
Mon, 17 Oct 2022 16:44:36 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new d1f43ca5f added v6 migration skip and removed rowId field when rowId
is undefined (otherwise autoincrement value won't work)
d1f43ca5f is described below
commit d1f43ca5f21592a1b1db5cf7e98bb90c02db6eea
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Mon Oct 17 11:44:23 2022 -0300
added v6 migration skip and removed rowId field when rowId is undefined
(otherwise autoincrement value won't work)
---
packages/taler-wallet-core/src/db-utils.ts | 1 +
packages/taler-wallet-core/src/operations/backup/state.ts | 4 +++-
packages/taler-wallet-core/src/operations/exchanges.ts | 12 ++++++------
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/packages/taler-wallet-core/src/db-utils.ts
b/packages/taler-wallet-core/src/db-utils.ts
index 88960e6b1..0329ca17a 100644
--- a/packages/taler-wallet-core/src/db-utils.ts
+++ b/packages/taler-wallet-core/src/db-utils.ts
@@ -193,6 +193,7 @@ export async function openTalerDatabase(
case "taler-wallet-main-v3":
case "taler-wallet-main-v4": // temporary, we might migrate v4 later
case "taler-wallet-main-v5":
+ case "taler-wallet-main-v6":
// We consider this a pre-release
// development version, no migration is done.
await metaDb
diff --git a/packages/taler-wallet-core/src/operations/backup/state.ts
b/packages/taler-wallet-core/src/operations/backup/state.ts
index b8dbb15c1..fa632f44c 100644
--- a/packages/taler-wallet-core/src/operations/backup/state.ts
+++ b/packages/taler-wallet-core/src/operations/backup/state.ts
@@ -62,7 +62,9 @@ export async function provideBackupState(
};
await tx.config.put(backupStateEntry);
}
- checkDbInvariant(backupStateEntry.key ===
ConfigRecordKey.WalletBackupState);
+ checkDbInvariant(
+ backupStateEntry.key === ConfigRecordKey.WalletBackupState,
+ );
return backupStateEntry.value;
});
}
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts
b/packages/taler-wallet-core/src/operations/exchanges.ts
index d0da2e948..a8c4fec10 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -674,13 +674,11 @@ export async function updateExchangeFromUrlHandler(
logger.warn(`exchange ${exchangeBaseUrl} no longer present`);
return;
}
- let existingDetails = await getExchangeDetails(tx, r.baseUrl);
- let acceptedTosEtag: string | undefined = undefined;
+ const existingDetails = await getExchangeDetails(tx, r.baseUrl);
if (!existingDetails) {
detailsPointerChanged = true;
}
if (existingDetails) {
- acceptedTosEtag = existingDetails.tosAccepted?.etag;
if (existingDetails.masterPublicKey !== keysInfo.masterPublicKey) {
detailsPointerChanged = true;
}
@@ -689,9 +687,8 @@ export async function updateExchangeFromUrlHandler(
}
// FIXME: We need to do some consistency checks!
}
- let existingTosAccepted = existingDetails?.tosAccepted;
- const newDetails = {
- rowId: existingDetails?.rowId,
+ const existingTosAccepted = existingDetails?.tosAccepted;
+ const newDetails: ExchangeDetailsRecord = {
auditors: keysInfo.auditors,
currency: keysInfo.currency,
masterPublicKey: keysInfo.masterPublicKey,
@@ -703,6 +700,9 @@ export async function updateExchangeFromUrlHandler(
tosCurrentEtag: tosDownload.tosEtag,
tosAccepted: existingTosAccepted,
};
+ if (existingDetails?.rowId) {
+ newDetails.rowId = existingDetails.rowId;
+ }
r.lastUpdate = TalerProtocolTimestamp.now();
r.nextUpdate = keysInfo.expiry;
// New denominations might be available.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-wallet-core] branch master updated: added v6 migration skip and removed rowId field when rowId is undefined (otherwise autoincrement value won't work),
gnunet <=