diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-09-08 20:29:47 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-09-08 20:29:47 +0530 |
commit | 6c0be1cc956ce57fdc13509113448fe702b43da9 (patch) | |
tree | 15bd098eaf36230d597dafe3ada4d1dba3a0242a /packages/taler-wallet-core/src/operations/exchanges.ts | |
parent | 043a5f89fe020bbb55170a9fc355c3d699ad8761 (diff) | |
download | wallet-core-6c0be1cc956ce57fdc13509113448fe702b43da9.tar.xz |
DB cleanup
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/exchanges.ts | 13 |
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 d3c72d164..7bf07ab2a 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; } |