aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/withdraw.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-08-19 15:12:33 +0200
committerFlorian Dold <florian@dold.me>2021-08-19 15:12:33 +0200
commitc0e6b6d0f66508ebc8d33502d1281cb48a1c9cc6 (patch)
treee80d81ec1c13a24c73a00eb6f388d6db75b32c0c /packages/taler-wallet-core/src/operations/withdraw.ts
parentdefc393d6e320f6cc76df059a94936a7b88571a1 (diff)
downloadwallet-core-c0e6b6d0f66508ebc8d33502d1281cb48a1c9cc6.tar.xz
run pending operations at least once, style fixes
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index 44e626110..81c35c17b 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -17,7 +17,6 @@
/**
* Imports.
*/
-import * as LibtoolVersion from "@gnu-taler/taler-util";
import {
AmountJson,
Amounts,
@@ -41,6 +40,7 @@ import {
WithdrawResponse,
URL,
WithdrawUriInfoResponse,
+ VersionMatchResult,
} from "@gnu-taler/taler-util";
import {
CoinRecord,
@@ -143,7 +143,7 @@ interface ExchangeWithdrawDetails {
*
* Older exchanges don't return version information.
*/
- versionMatch: LibtoolVersion.VersionMatchResult | undefined;
+ versionMatch: VersionMatchResult | undefined;
/**
* Libtool-style version string for the exchange or "unknown"
@@ -693,15 +693,15 @@ export async function updateWithdrawalDenoms(
while (current < denominations.length) {
const updatedDenominations: DenominationRecord[] = [];
// Do a batch of batchSize
- for (let batchIdx = 0; batchIdx < batchSize; batchIdx++) {
- current++;
- if (current >= denominations.length) {
- break;
- }
+ for (
+ let batchIdx = 0;
+ batchIdx < batchSize && current < denominations.length;
+ batchIdx++, current++
+ ) {
const denom = denominations[current];
if (denom.status === DenominationStatus.Unverified) {
logger.trace(
- `Validation denomination (${current + 1}/${
+ `Validating denomination (${current + 1}/${
denominations.length
}) signature of ${denom.denomPubHash}`,
);
@@ -939,7 +939,7 @@ export async function getExchangeWithdrawalInfo(
let versionMatch;
if (exchangeDetails.protocolVersion) {
- versionMatch = LibtoolVersion.compare(
+ versionMatch = compare(
WALLET_EXCHANGE_PROTOCOL_VERSION,
exchangeDetails.protocolVersion,
);