diff options
author | Sebastian <sebasjm@gmail.com> | 2022-05-18 14:41:51 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-05-18 14:41:51 -0300 |
commit | c67d0bff1daa35d380d1d71b94428a5026b56450 (patch) | |
tree | b4e1f164e1bed3b13fa4ff5969806d2212079f41 /packages/taler-wallet-core/src/operations/withdraw.ts | |
parent | d3a857743dd9ed2f7350bb64af8808729156edba (diff) | |
download | wallet-core-c67d0bff1daa35d380d1d71b94428a5026b56450.tar.xz |
all retryInfo function in the same namespace, adding missing retryInfo increment
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/withdraw.ts | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index 2edc3ed98..ea9e22331 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -72,7 +72,7 @@ import { readSuccessResponseJsonOrThrow, } from "../util/http.js"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; -import { resetRetryInfo, RetryInfo } from "../util/retries.js"; +import { RetryInfo } from "../util/retries.js"; import { WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, WALLET_EXCHANGE_PROTOCOL_VERSION, @@ -215,7 +215,7 @@ export function selectWithdrawalDenominations( for (const d of denoms) { let count = 0; const cost = Amounts.add(d.value, d.feeWithdraw).amount; - for (;;) { + for (; ;) { if (Amounts.cmp(remaining, cost) < 0) { break; } @@ -875,11 +875,10 @@ export async function updateWithdrawalDenoms( denom.verificationStatus === DenominationVerificationStatus.Unverified ) { logger.trace( - `Validating denomination (${current + 1}/${ - denominations.length + `Validating denomination (${current + 1}/${denominations.length }) signature of ${denom.denomPubHash}`, ); - let valid: boolean = false; + let valid = false; if (ws.insecureTrustExchange) { valid = true; } else { @@ -932,7 +931,7 @@ async function setupWithdrawalRetry( return; } if (options.reset) { - wsr.retryInfo = resetRetryInfo(); + wsr.retryInfo = RetryInfo.reset(); } else { wsr.retryInfo = RetryInfo.increment(wsr.retryInfo); } @@ -1097,7 +1096,7 @@ async function processWithdrawGroupImpl( wg.timestampFinish = TalerProtocolTimestamp.now(); wg.operationStatus = OperationStatus.Finished; delete wg.lastError; - wg.retryInfo = resetRetryInfo(); + wg.retryInfo = RetryInfo.reset(); } await tx.withdrawalGroups.put(wg); @@ -1203,7 +1202,7 @@ export async function getExchangeWithdrawalInfo( ) { console.warn( `wallet's support for exchange protocol version ${WALLET_EXCHANGE_PROTOCOL_VERSION} might be outdated ` + - `(exchange has ${exchangeDetails.protocolVersion}), checking for updates`, + `(exchange has ${exchangeDetails.protocolVersion}), checking for updates`, ); } } |