diff options
author | Florian Dold <florian@dold.me> | 2023-06-20 15:10:51 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-06-20 15:10:51 +0200 |
commit | 26b30a462ad373d4b5188362ba2e4f6adad0674d (patch) | |
tree | d3a0448badd16ef6f8921c9d16ee63dd0ab6f255 | |
parent | 9c708251f92e6691ebba80fa8d129c6c04cec618 (diff) |
wallet-core: be less spammy with self-transitions and logging
5 files changed, 15 insertions, 14 deletions
diff --git a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts index fd2d48398..1dd70304a 100644 --- a/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts +++ b/packages/taler-wallet-core/src/crypto/cryptoImplementation.ts @@ -1005,9 +1005,6 @@ export const nativeCryptoR: TalerCryptoInterfaceR = { pb.put(hash(stringToBytes(canonicalJson(req.creditRestrictions) + "\0"))); } const p = pb.build(); - logger.info(`wire sig blob: ${encodeCrock(p)}`); - logger.info(`credit restrictions: ${j2s(req.creditRestrictions)}`); - logger.info(`debit restrictions: ${j2s(req.debitRestrictions)}`); return { valid: eddsaVerify(p, decodeCrock(sig), decodeCrock(masterPub)) }; }, diff --git a/packages/taler-wallet-core/src/operations/common.ts b/packages/taler-wallet-core/src/operations/common.ts index 293870a18..37f1a2f22 100644 --- a/packages/taler-wallet-core/src/operations/common.ts +++ b/packages/taler-wallet-core/src/operations/common.ts @@ -371,7 +371,11 @@ async function storePendingTaskPending( retryRecord.retryInfo = RetryInfo.increment(retryRecord.retryInfo); } await tx.operationRetries.put(retryRecord); - return taskToTransactionNotification(ws, tx, pendingTaskId, undefined); + if (hadError) { + return taskToTransactionNotification(ws, tx, pendingTaskId, undefined); + } else { + return undefined; + } }); if (maybeNotification) { ws.notify(maybeNotification); diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index 7e01071b4..29c370e2c 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -134,7 +134,7 @@ export async function downloadExchangeWithTermsOfService( timeout: Duration, contentType: string, ): Promise<ExchangeTosDownloadResult> { - logger.info(`downloading exchange tos (type ${contentType})`); + logger.trace(`downloading exchange tos (type ${contentType})`); const reqUrl = new URL("terms", exchangeBaseUrl); const headers = { Accept: contentType, @@ -580,7 +580,7 @@ export async function updateExchangeFromUrlHandler( }> > { const forceNow = options.forceNow ?? false; - logger.info( + logger.trace( `updating exchange info for ${exchangeBaseUrl}, forced: ${forceNow}`, ); @@ -628,7 +628,7 @@ export async function updateExchangeFromUrlHandler( timeout, ); - logger.info("validating exchange /wire info"); + logger.trace("validating exchange /wire info"); const version = LibtoolVersion.parseVersion(keysInfo.protocolVersion); if (!version) { @@ -663,7 +663,7 @@ export async function updateExchangeFromUrlHandler( }; } - logger.info("finished validating exchange /wire info"); + logger.trace("finished validating exchange /wire info"); // We download the text/plain version here, // because that one needs to exist, and we @@ -783,7 +783,7 @@ export async function updateExchangeFromUrlHandler( }); } - logger.info("updating denominations in database"); + logger.trace("updating denominations in database"); const currentDenomSet = new Set<string>( keysInfo.currentDenominations.map((x) => x.denomPubHash), ); diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index e573ddb44..e00275c8d 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -1175,10 +1175,10 @@ export async function autoRefresh( `created refresh group for auto-refresh (${res.refreshGroupId})`, ); } - logger.info( + logger.trace( `current wallet time: ${AbsoluteTime.toIsoString(AbsoluteTime.now())}`, ); - logger.info( + logger.trace( `next refresh check at ${AbsoluteTime.toIsoString(minCheckThreshold)}`, ); exchange.nextRefreshCheck = diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index dd07bdebc..118084197 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1199,14 +1199,14 @@ async function queryReserve( ); reserveUrl.searchParams.set("timeout_ms", "30000"); - logger.info(`querying reserve status via ${reserveUrl.href}`); + logger.trace(`querying reserve status via ${reserveUrl.href}`); const resp = await ws.http.fetch(reserveUrl.href, { timeout: getReserveRequestTimeout(withdrawalGroup), cancellationToken, }); - logger.info(`reserve status code: HTTP ${resp.status}`); + logger.trace(`reserve status code: HTTP ${resp.status}`); const result = await readSuccessResponseJsonOrErrorCode( resp, @@ -1214,7 +1214,7 @@ async function queryReserve( ); if (result.isError) { - logger.info( + logger.trace( `got reserve status error, EC=${result.talerErrorResponse.code}`, ); if ( |