diff options
author | Florian Dold <florian@dold.me> | 2021-08-19 16:06:09 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2021-08-19 16:06:09 +0200 |
commit | 8929086ebf6f16f74e97bfdac67f6717114c8ae9 (patch) | |
tree | d648a65294c3829faa2be8916660773b31a1dcf2 /packages/taler-wallet-core/src/operations/refresh.ts | |
parent | c0e6b6d0f66508ebc8d33502d1281cb48a1c9cc6 (diff) | |
download | wallet-core-8929086ebf6f16f74e97bfdac67f6717114c8ae9.tar.xz |
logging
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refresh.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refresh.ts | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts index 20b07d44e..2e6e7d80c 100644 --- a/packages/taler-wallet-core/src/operations/refresh.ts +++ b/packages/taler-wallet-core/src/operations/refresh.ts @@ -31,6 +31,7 @@ import { NotificationType, RefreshGroupId, RefreshReason, + stringifyTimestamp, TalerErrorDetails, timestampToIsoString, } from "@gnu-taler/taler-util"; @@ -147,6 +148,8 @@ async function refreshCreateSession( throw Error("db inconsistent: exchange of coin not found"); } + // FIXME: use helper functions from withdraw.ts + // to update and filter withdrawable denoms. const { availableAmount, availableDenoms } = await ws.db .mktx((x) => ({ @@ -179,6 +182,19 @@ async function refreshCreateSession( availableDenoms, ); + if (logger.shouldLogTrace()) { + logger.trace(`printing selected denominations for refresh`); + logger.trace(`current time: ${stringifyTimestamp(getTimestampNow())}`); + for (const denom of newCoinDenoms.selectedDenoms) { + console.log(`denom ${denom.denom}, count ${denom.count}`); + console.log( + `withdrawal expiration ${stringifyTimestamp( + denom.denom.stampExpireWithdraw, + )}`, + ); + } + } + if (newCoinDenoms.selectedDenoms.length === 0) { logger.trace( `not refreshing, available amount ${amountToPretty( |