diff options
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refund.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refund.ts | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/packages/taler-wallet-core/src/operations/refund.ts b/packages/taler-wallet-core/src/operations/refund.ts index a5846f259..106c79365 100644 --- a/packages/taler-wallet-core/src/operations/refund.ts +++ b/packages/taler-wallet-core/src/operations/refund.ts @@ -65,6 +65,23 @@ import { InternalWalletState } from "../common.js"; const logger = new Logger("refund.ts"); +async function resetPurchaseQueryRefundRetry( + ws: InternalWalletState, + proposalId: string, +): Promise<void> { + await ws.db + .mktx((x) => ({ + purchases: x.purchases, + })) + .runReadWrite(async (tx) => { + const x = await tx.purchases.get(proposalId); + if (x) { + x.refundStatusRetryInfo = initRetryInfo(); + await tx.purchases.put(x); + } + }); +} + /** * Retry querying and applying refunds for an order later. */ @@ -578,23 +595,6 @@ export async function processPurchaseQueryRefund( ); } -async function resetPurchaseQueryRefundRetry( - ws: InternalWalletState, - proposalId: string, -): Promise<void> { - await ws.db - .mktx((x) => ({ - purchases: x.purchases, - })) - .runReadWrite(async (tx) => { - const x = await tx.purchases.get(proposalId); - if (x) { - x.refundStatusRetryInfo = initRetryInfo(); - await tx.purchases.put(x); - } - }); -} - async function processPurchaseQueryRefundImpl( ws: InternalWalletState, proposalId: string, |