diff options
author | Florian Dold <florian@dold.me> | 2023-05-24 12:27:24 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-05-24 12:27:24 +0200 |
commit | da87ce41a6b6a6b66af7b99098e015e74ae27b67 (patch) | |
tree | 78ace864b67f42bfd7b201d4ad76f0684db933dd /packages/taler-wallet-core/src | |
parent | bc4964d4ffb39bb5c2fe8ec16dce4851f2e968f8 (diff) | |
download | wallet-core-da87ce41a6b6a6b66af7b99098e015e74ae27b67.tar.xz |
wallet-core: logging to diagnose perf/hang issue
Diffstat (limited to 'packages/taler-wallet-core/src')
-rw-r--r-- | packages/taler-wallet-core/src/operations/withdraw.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index ba154d05c..2cb0a6253 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -1558,16 +1558,22 @@ export async function getExchangeWithdrawalInfo( instructedAmount: AmountJson, ageRestricted: number | undefined, ): Promise<ExchangeWithdrawalDetails> { + logger.trace("updating exchange"); const { exchange, exchangeDetails } = await ws.exchangeOps.updateExchangeFromUrl(ws, exchangeBaseUrl); + logger.trace("updating withdrawal denoms"); await updateWithdrawalDenoms(ws, exchangeBaseUrl); + logger.trace("getting candidate denoms"); const denoms = await getCandidateWithdrawalDenoms(ws, exchangeBaseUrl); + logger.trace("selecting withdrawal denoms"); const selectedDenoms = selectWithdrawalDenominations( instructedAmount, denoms, ws.config.testing.denomselAllowLate, ); + logger.trace("selection done"); + if (selectedDenoms.selectedDenoms.length === 0) { throw Error( `unable to withdraw from ${exchangeBaseUrl}, can't select denominations for instructed amount (${Amounts.stringify( @@ -1588,6 +1594,8 @@ export async function getExchangeWithdrawalInfo( let hasDenomWithAgeRestriction = false; + logger.trace("computing earliest deposit expiration"); + let earliestDepositExpiration: TalerProtocolTimestamp | undefined; for (let i = 0; i < selectedDenoms.selectedDenoms.length; i++) { const ds = selectedDenoms.selectedDenoms[i]; |