From d3572014b06f60250e3bb9e99898b89cd11a4294 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 27 Feb 2024 22:23:11 +0100 Subject: observability --- packages/taler-wallet-core/src/refresh.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'packages/taler-wallet-core/src/refresh.ts') diff --git a/packages/taler-wallet-core/src/refresh.ts b/packages/taler-wallet-core/src/refresh.ts index b467a1c47..f67fb5015 100644 --- a/packages/taler-wallet-core/src/refresh.ts +++ b/packages/taler-wallet-core/src/refresh.ts @@ -183,8 +183,8 @@ export class RefreshTransactionContext implements TransactionContext { } async resumeTransaction(): Promise { - const { wex: ws, refreshGroupId, transactionId } = this; - const transitionInfo = await ws.db.runReadWriteTx( + const { wex, refreshGroupId, transactionId } = this; + const transitionInfo = await wex.db.runReadWriteTx( ["refreshGroups"], async (tx) => { const dg = await tx.refreshGroups.get(refreshGroupId); @@ -212,13 +212,13 @@ export class RefreshTransactionContext implements TransactionContext { return undefined; }, ); - notifyTransition(ws, transactionId, transitionInfo); - ws.taskScheduler.startShepherdTask(this.taskId); + notifyTransition(wex, transactionId, transitionInfo); + wex.taskScheduler.startShepherdTask(this.taskId); } async failTransaction(): Promise { - const { wex: ws, refreshGroupId, transactionId } = this; - const transitionInfo = await ws.db.runReadWriteTx( + const { wex, refreshGroupId, transactionId } = this; + const transitionInfo = await wex.db.runReadWriteTx( ["refreshGroups"], async (tx) => { const dg = await tx.refreshGroups.get(refreshGroupId); @@ -252,9 +252,9 @@ export class RefreshTransactionContext implements TransactionContext { }; }, ); - ws.taskScheduler.stopShepherdTask(this.taskId); - notifyTransition(ws, transactionId, transitionInfo); - ws.taskScheduler.startShepherdTask(this.taskId); + wex.taskScheduler.stopShepherdTask(this.taskId); + notifyTransition(wex, transactionId, transitionInfo); + wex.taskScheduler.startShepherdTask(this.taskId); } } -- cgit v1.2.3