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 20:29:47 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-09-08 20:29:47 +0530
commit6c0be1cc956ce57fdc13509113448fe702b43da9 (patch)
tree15bd098eaf36230d597dafe3ada4d1dba3a0242a /packages/taler-wallet-core/src/operations/exchanges.ts
parent043a5f89fe020bbb55170a9fc355c3d699ad8761 (diff)
downloadwallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.tar.gz
wallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.tar.bz2
wallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.zip
DB cleanup
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts13
1 files changed, 3 insertions, 10 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index d3c72d16..7bf07ab2 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -29,9 +29,6 @@ import {
DenominationStatus,
WireFee,
ExchangeUpdateReason,
- ExchangeUpdatedEventRecord,
- initRetryInfo,
- updateRetryInfoTimeout,
} from "../types/dbTypes";
import { canonicalizeBaseUrl } from "../util/helpers";
import * as Amounts from "../util/amounts";
@@ -64,6 +61,7 @@ import { URL } from "../util/url";
import { reconcileReserveHistory } from "../util/reserveHistoryUtil";
import { checkDbInvariant } from "../util/invariants";
import { NotificationType } from "../types/notifications";
+import { updateRetryInfoTimeout, initRetryInfo } from "../util/retries";
const logger = new Logger("exchanges.ts");
@@ -292,7 +290,7 @@ async function updateExchangeFinalize(
return;
}
await ws.db.runWithWriteTransaction(
- [Stores.exchanges, Stores.exchangeUpdatedEvents],
+ [Stores.exchanges],
async (tx) => {
const r = await tx.get(Stores.exchanges, exchangeBaseUrl);
if (!r) {
@@ -307,11 +305,6 @@ async function updateExchangeFinalize(
// as now new denominations might be available.
r.nextRefreshCheck = undefined;
await tx.put(Stores.exchanges, r);
- const updateEvent: ExchangeUpdatedEventRecord = {
- exchangeBaseUrl: exchange.baseUrl,
- timestamp: getTimestampNow(),
- };
- await tx.put(Stores.exchangeUpdatedEvents, updateEvent);
},
);
}
@@ -557,7 +550,7 @@ export async function getExchangeTrust(
);
if (currencyRecord) {
for (const trustedExchange of currencyRecord.exchanges) {
- if (trustedExchange.exchangePub === exchangeDetails.masterPublicKey) {
+ if (trustedExchange.exchangeMasterPub === exchangeDetails.masterPublicKey) {
isTrusted = true;
break;
}