From 860f10e6f004668d3109b5a1d96ddb2b26ddc2f5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 16 Sep 2022 14:27:24 -0300 Subject: pretty --- .../src/operations/backup/index.ts | 7 +++++- .../taler-wallet-core/src/operations/deposits.ts | 2 +- .../taler-wallet-core/src/operations/exchanges.ts | 7 +++++- packages/taler-wallet-core/src/operations/pay.ts | 8 ++++++- .../taler-wallet-core/src/operations/recoup.ts | 6 ++++- packages/taler-wallet-core/src/operations/tip.ts | 12 +++++----- .../taler-wallet-core/src/operations/withdraw.ts | 26 ++++++++++------------ 7 files changed, 43 insertions(+), 25 deletions(-) (limited to 'packages/taler-wallet-core/src/operations') diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts index d4dfe2916..c7c93e909 100644 --- a/packages/taler-wallet-core/src/operations/backup/index.ts +++ b/packages/taler-wallet-core/src/operations/backup/index.ts @@ -86,7 +86,12 @@ import { checkDbInvariant, checkLogicInvariant, } from "../../util/invariants.js"; -import { OperationAttemptResult, OperationAttemptResultType, RetryTags, scheduleRetryInTx } from "../../util/retries.js"; +import { + OperationAttemptResult, + OperationAttemptResultType, + RetryTags, + scheduleRetryInTx, +} from "../../util/retries.js"; import { checkPaymentByProposalId, confirmPay, diff --git a/packages/taler-wallet-core/src/operations/deposits.ts b/packages/taler-wallet-core/src/operations/deposits.ts index c16b2376d..54fd323de 100644 --- a/packages/taler-wallet-core/src/operations/deposits.ts +++ b/packages/taler-wallet-core/src/operations/deposits.ts @@ -505,7 +505,7 @@ export async function createDepositGroup( return { depositGroupId: depositGroupId, - transactionId: makeEventId(TransactionType.Deposit, depositGroupId) + transactionId: makeEventId(TransactionType.Deposit, depositGroupId), }; } diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts index 9165ed050..8d1f58893 100644 --- a/packages/taler-wallet-core/src/operations/exchanges.ts +++ b/packages/taler-wallet-core/src/operations/exchanges.ts @@ -64,7 +64,12 @@ import { readSuccessResponseTextOrThrow, } from "../util/http.js"; import { DbAccess, GetReadOnlyAccess } from "../util/query.js"; -import { OperationAttemptResult, OperationAttemptResultType, RetryInfo, runOperationHandlerForResult } from "../util/retries.js"; +import { + OperationAttemptResult, + OperationAttemptResultType, + RetryInfo, + runOperationHandlerForResult, +} from "../util/retries.js"; import { WALLET_EXCHANGE_PROTOCOL_VERSION } from "../versions.js"; import { guardOperationException } from "./common.js"; diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index 468f9ca31..52b23713d 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -97,7 +97,13 @@ import { throwUnexpectedRequestError, } from "../util/http.js"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; -import { OperationAttemptResult, OperationAttemptResultType, RetryInfo, RetryTags, scheduleRetry } from "../util/retries.js"; +import { + OperationAttemptResult, + OperationAttemptResultType, + RetryInfo, + RetryTags, + scheduleRetry, +} from "../util/retries.js"; import { spendCoins } from "../wallet.js"; import { getExchangeDetails } from "./exchanges.js"; import { getTotalRefreshCost } from "./refresh.js"; diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts index 4424b9b40..119119035 100644 --- a/packages/taler-wallet-core/src/operations/recoup.ts +++ b/packages/taler-wallet-core/src/operations/recoup.ts @@ -52,7 +52,11 @@ import { import { InternalWalletState } from "../internal-wallet-state.js"; import { readSuccessResponseJsonOrThrow } from "../util/http.js"; import { GetReadWriteAccess } from "../util/query.js"; -import { OperationAttemptResult, RetryInfo, runOperationHandlerForResult } from "../util/retries.js"; +import { + OperationAttemptResult, + RetryInfo, + runOperationHandlerForResult, +} from "../util/retries.js"; import { guardOperationException } from "./common.js"; import { createRefreshGroup, processRefreshGroup } from "./refresh.js"; import { internalCreateWithdrawalGroup } from "./withdraw.js"; diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts index f79851be8..571721658 100644 --- a/packages/taler-wallet-core/src/operations/tip.ts +++ b/packages/taler-wallet-core/src/operations/tip.ts @@ -52,7 +52,10 @@ import { readSuccessResponseJsonOrThrow, } from "../util/http.js"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; -import { OperationAttemptResult, OperationAttemptResultType } from "../util/retries.js"; +import { + OperationAttemptResult, + OperationAttemptResultType, +} from "../util/retries.js"; import { makeCoinAvailable } from "../wallet.js"; import { updateExchangeFromUrl } from "./exchanges.js"; import { makeEventId } from "./transactions.js"; @@ -362,9 +365,6 @@ export async function acceptTip( await processTip(ws, tipId); } return { - transactionId: makeEventId( - TransactionType.Tip, - tipId - ) - } + transactionId: makeEventId(TransactionType.Tip, tipId), + }; } diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts index 6b31842b3..de9721f3d 100644 --- a/packages/taler-wallet-core/src/operations/withdraw.ts +++ b/packages/taler-wallet-core/src/operations/withdraw.ts @@ -93,7 +93,10 @@ import { } from "../util/http.js"; import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js"; import { DbAccess, GetReadOnlyAccess } from "../util/query.js"; -import { OperationAttemptResult, OperationAttemptResultType } from "../util/retries.js"; +import { + OperationAttemptResult, + OperationAttemptResultType, +} from "../util/retries.js"; import { WALLET_BANK_INTEGRATION_PROTOCOL_VERSION, WALLET_EXCHANGE_PROTOCOL_VERSION, @@ -258,7 +261,7 @@ export function selectWithdrawalDenominations( DenominationRecord.getValue(d), d.fees.feeWithdraw, ).amount; - for (; ;) { + for (;;) { if (Amounts.cmp(remaining, cost) < 0) { break; } @@ -900,7 +903,8 @@ 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 = false; @@ -983,7 +987,7 @@ async function queryReserve( if ( resp.status === 404 && result.talerErrorResponse.code === - TalerErrorCode.EXCHANGE_RESERVES_STATUS_UNKNOWN + TalerErrorCode.EXCHANGE_RESERVES_STATUS_UNKNOWN ) { ws.notify({ type: NotificationType.ReserveNotYetFound, @@ -1305,7 +1309,7 @@ export async function getExchangeWithdrawalInfo( ) { logger.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`, ); } } @@ -1804,7 +1808,7 @@ export async function acceptWithdrawalFromUri( transactionId: makeEventId( TransactionType.Withdrawal, existingWithdrawalGroup.withdrawalGroupId, - ) + ), }; } @@ -1862,10 +1866,7 @@ export async function acceptWithdrawalFromUri( return { reservePub: withdrawalGroup.reservePub, confirmTransferUrl: withdrawInfo.confirmTransferUrl, - transactionId: makeEventId( - TransactionType.Withdrawal, - withdrawalGroupId, - ) + transactionId: makeEventId(TransactionType.Withdrawal, withdrawalGroupId), }; } @@ -1920,9 +1921,6 @@ export async function createManualWithdrawal( return { reservePub: withdrawalGroup.reservePub, exchangePaytoUris: exchangePaytoUris, - transactionId: makeEventId( - TransactionType.Withdrawal, - withdrawalGroupId, - ) + transactionId: makeEventId(TransactionType.Withdrawal, withdrawalGroupId), }; } -- cgit v1.2.3