summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/exchanges.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-09-08 21:03:10 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-09-08 21:03:10 +0530
commitaae06c680f7d31d0a2f2a2059b57a8d7c575d3c7 (patch)
tree25653034f74b5e043edd58702a24cad9acdc6fdd /packages/taler-wallet-core/src/operations/exchanges.ts
parentddbb09b1403214cff3e5a598dc51bdf37df72971 (diff)
downloadwallet-core-aae06c680f7d31d0a2f2a2059b57a8d7c575d3c7.tar.gz
wallet-core-aae06c680f7d31d0a2f2a2059b57a8d7c575d3c7.tar.bz2
wallet-core-aae06c680f7d31d0a2f2a2059b57a8d7c575d3c7.zip
DB tweaks
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index 7bf07ab2..d598e398 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -222,7 +222,7 @@ async function updateExchangeWithKeys(
for (const newDenom of newDenominations) {
const oldDenom = await tx.get(Stores.denominations, [
baseUrl,
- newDenom.denomPub,
+ newDenom.denomPubHash,
]);
if (oldDenom) {
// FIXME: Do consistency check
@@ -236,10 +236,10 @@ async function updateExchangeWithKeys(
const newlyRevokedCoinPubs: string[] = [];
logger.trace("recoup list from exchange", recoupDenomList);
for (const recoupInfo of recoupDenomList) {
- const oldDenom = await tx.getIndexed(
- Stores.denominations.denomPubHashIndex,
+ const oldDenom = await tx.get(Stores.denominations, [
+ r.baseUrl,
recoupInfo.h_denom_pub,
- );
+ ]);
if (!oldDenom) {
// We never even knew about the revoked denomination, all good.
continue;