From 82a2437c0967871d6b942105c98c3382978cad29 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 6 Aug 2020 00:30:36 +0530 Subject: towards integration tests with fault injection --- packages/taler-wallet-core/src/operations/exchanges.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/taler-wallet-core/src/operations/exchanges.ts') diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index ee49fddb5..8967173ca 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( -- cgit v1.2.3