summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/exchanges.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-08-06 00:30:36 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-08-06 00:30:36 +0530
commit82a2437c0967871d6b942105c98c3382978cad29 (patch)
treeda803c3d4a58d9c691f5908b379791c8ee55cc37 /packages/taler-wallet-core/src/operations/exchanges.ts
parenta8f03d3dd1ad04abf7f569cb44933b6dce6713e7 (diff)
downloadwallet-core-82a2437c0967871d6b942105c98c3382978cad29.tar.gz
wallet-core-82a2437c0967871d6b942105c98c3382978cad29.tar.bz2
wallet-core-82a2437c0967871d6b942105c98c3382978cad29.zip
towards integration tests with fault injection
Diffstat (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts10
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index ee49fddb..8967173c 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -112,6 +112,8 @@ async function updateExchangeWithKeys(
return;
}
+ logger.info("updating exchange /keys info");
+
const keysUrl = new URL("keys", baseUrl);
keysUrl.searchParams.set("cacheBreaker", WALLET_CACHE_BREAKER_CLIENT_VERSION);
@@ -121,6 +123,8 @@ async function updateExchangeWithKeys(
codecForExchangeKeysJson(),
);
+ logger.info("received /keys response");
+
if (exchangeKeysJson.denoms.length === 0) {
const opErr = makeErrorDetails(
TalerErrorCode.WALLET_EXCHANGE_DENOMINATIONS_INSUFFICIENT,
@@ -152,12 +156,16 @@ async function updateExchangeWithKeys(
const currency = Amounts.parseOrThrow(exchangeKeysJson.denoms[0].value)
.currency;
+ logger.trace("processing denominations");
+
const newDenominations = await Promise.all(
exchangeKeysJson.denoms.map((d) =>
denominationRecordFromKeys(ws, baseUrl, d),
),
);
+ logger.trace("done with processing denominations");
+
const lastUpdateTimestamp = getTimestampNow();
const recoupGroupId: string | undefined = undefined;
@@ -241,6 +249,8 @@ async function updateExchangeWithKeys(
console.log("error while recouping coins:", e);
});
}
+
+ logger.trace("done updating exchange /keys");
}
async function updateExchangeFinalize(