From 3d2b7b2a65787858c9471bc48cc5860c07b7f7dc Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Wed, 9 Jun 2021 15:26:18 +0200 Subject: formatting: re-run prettier --- .../taler-wallet-core/src/operations/pending.ts | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/pending.ts') diff --git a/packages/taler-wallet-core/src/operations/pending.ts b/packages/taler-wallet-core/src/operations/pending.ts index d3904c426..4eee85278 100644 --- a/packages/taler-wallet-core/src/operations/pending.ts +++ b/packages/taler-wallet-core/src/operations/pending.ts @@ -239,7 +239,7 @@ async function gatherRefreshPending( async function gatherWithdrawalPending( tx: GetReadOnlyAccess<{ withdrawalGroups: typeof WalletStoresV1.withdrawalGroups; - planchets: typeof WalletStoresV1.planchets, + planchets: typeof WalletStoresV1.planchets; }>, now: Timestamp, resp: PendingOperationsResponse, @@ -464,21 +464,22 @@ export async function getPendingOperations( { onlyDue = false } = {}, ): Promise { const now = getTimestampNow(); - return await ws.db.mktx((x) => ({ - exchanges: x.exchanges, - exchangeDetails: x.exchangeDetails, - reserves: x.reserves, - refreshGroups: x.refreshGroups, - coins: x.coins, - withdrawalGroups: x.withdrawalGroups, - proposals: x.proposals, - tips: x.tips, - purchases: x.purchases, - planchets: x.planchets, - depositGroups: x.depositGroups, - recoupGroups: x.recoupGroups, - })).runReadWrite( - async (tx) => { + return await ws.db + .mktx((x) => ({ + exchanges: x.exchanges, + exchangeDetails: x.exchangeDetails, + reserves: x.reserves, + refreshGroups: x.refreshGroups, + coins: x.coins, + withdrawalGroups: x.withdrawalGroups, + proposals: x.proposals, + tips: x.tips, + purchases: x.purchases, + planchets: x.planchets, + depositGroups: x.depositGroups, + recoupGroups: x.recoupGroups, + })) + .runReadWrite(async (tx) => { const walletBalance = await getBalancesInsideTransaction(ws, tx); const resp: PendingOperationsResponse = { nextRetryDelay: { d_ms: Number.MAX_SAFE_INTEGER }, @@ -496,6 +497,5 @@ export async function getPendingOperations( await gatherRecoupPending(tx, now, resp, onlyDue); await gatherDepositPending(tx, now, resp, onlyDue); return resp; - }, - ); + }); } -- cgit v1.2.3