aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/exchanges.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-01-13 22:01:14 +0100
committerFlorian Dold <florian@dold.me>2022-01-13 22:01:14 +0100
commit17c3ced6488eb14a01b39f1ad724fcfcd5d0c4e7 (patch)
tree66c0bc42d33f93cc185a0fd16648fa54c6cf003f /packages/taler-wallet-core/src/operations/exchanges.ts
parentcd2473e1ade13ca43d8f6fafaa2e8d3c3675bfd8 (diff)
downloadwallet-core-17c3ced6488eb14a01b39f1ad724fcfcd5d0c4e7.tar.xz
make more use of the denom cache
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts26
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index c14f27656..d73d593e8 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -131,7 +131,7 @@ async function handleExchangeUpdateError(
exchange.retryInfo.retryCounter++;
updateRetryInfoTimeout(exchange.retryInfo);
exchange.lastError = err;
- await tx.exchanges.put(exchange)
+ await tx.exchanges.put(exchange);
});
if (err) {
ws.notify({ type: NotificationType.ExchangeOperationError, error: err });
@@ -527,11 +527,11 @@ async function updateExchangeFromUrlImpl(
tosFound !== undefined
? tosFound
: await downloadExchangeWithTermsOfService(
- baseUrl,
- ws.http,
- timeout,
- "text/plain",
- );
+ baseUrl,
+ ws.http,
+ timeout,
+ "text/plain",
+ );
let recoupGroupId: string | undefined = undefined;
@@ -589,7 +589,7 @@ async function updateExchangeFromUrlImpl(
await tx.exchanges.put(r);
await tx.exchangeDetails.put(details);
- logger.trace("updating denominations in database");
+ logger.info("updating denominations in database");
const currentDenomSet = new Set<string>(
keysInfo.currentDenominations.map((x) => x.denomPubHash),
);
@@ -750,9 +750,10 @@ export async function getExchangeTrust(
if (!exchangeDetails) {
throw Error(`exchange ${exchangeInfo.baseUrl} details not available`);
}
- const exchangeTrustRecord = await tx.exchangesTrustStore.indexes.byExchangeMasterPub.get(
- exchangeDetails.masterPublicKey,
- );
+ const exchangeTrustRecord =
+ await tx.exchangesTrustStore.indexes.byExchangeMasterPub.get(
+ exchangeDetails.masterPublicKey,
+ );
if (
exchangeTrustRecord &&
exchangeTrustRecord.uids.length > 0 &&
@@ -762,9 +763,8 @@ export async function getExchangeTrust(
}
for (const auditor of exchangeDetails.auditors) {
- const auditorTrustRecord = await tx.auditorTrust.indexes.byAuditorPub.get(
- auditor.auditor_pub,
- );
+ const auditorTrustRecord =
+ await tx.auditorTrust.indexes.byAuditorPub.get(auditor.auditor_pub);
if (auditorTrustRecord && auditorTrustRecord.uids.length > 0) {
isAudited = true;
break;