summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-02-27 22:23:11 +0100
committerFlorian Dold <florian@dold.me>2024-02-27 22:23:11 +0100
commitd3572014b06f60250e3bb9e99898b89cd11a4294 (patch)
treed98879e8198cc748513b4c331ee3a764ea10638e /packages/taler-wallet-core/src/pay-peer-pull-credit.ts
parentf08798520ef9b8b0ff36c6aaf93653605b53b912 (diff)
downloadwallet-core-d3572014b06f60250e3bb9e99898b89cd11a4294.tar.gz
wallet-core-d3572014b06f60250e3bb9e99898b89cd11a4294.tar.bz2
wallet-core-d3572014b06f60250e3bb9e99898b89cd11a4294.zip
observability
Diffstat (limited to 'packages/taler-wallet-core/src/pay-peer-pull-credit.ts')
-rw-r--r--packages/taler-wallet-core/src/pay-peer-pull-credit.ts34
1 files changed, 17 insertions, 17 deletions
diff --git a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
index c999a8d1f..de30f66d2 100644
--- a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
+++ b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
@@ -137,8 +137,8 @@ export class PeerPullCreditTransactionContext implements TransactionContext {
}
async suspendTransaction(): Promise<void> {
- const { wex: ws, pursePub, taskId: retryTag, transactionId } = this;
- const transitionInfo = await ws.db.runReadWriteTx(
+ const { wex, pursePub, taskId: retryTag, transactionId } = this;
+ const transitionInfo = await wex.db.runReadWriteTx(
["peerPullCredit"],
async (tx) => {
const pullCreditRec = await tx.peerPullCredit.get(pursePub);
@@ -192,13 +192,13 @@ export class PeerPullCreditTransactionContext implements TransactionContext {
return undefined;
},
);
- ws.taskScheduler.stopShepherdTask(retryTag);
- notifyTransition(ws, transactionId, transitionInfo);
+ wex.taskScheduler.stopShepherdTask(retryTag);
+ notifyTransition(wex, transactionId, transitionInfo);
}
async failTransaction(): Promise<void> {
- const { wex: ws, pursePub, taskId: retryTag, transactionId } = this;
- const transitionInfo = await ws.db.runReadWriteTx(
+ const { wex, pursePub, taskId: retryTag, transactionId } = this;
+ const transitionInfo = await wex.db.runReadWriteTx(
["peerPullCredit"],
async (tx) => {
const pullCreditRec = await tx.peerPullCredit.get(pursePub);
@@ -243,13 +243,13 @@ export class PeerPullCreditTransactionContext implements TransactionContext {
return undefined;
},
);
- notifyTransition(ws, transactionId, transitionInfo);
- ws.taskScheduler.stopShepherdTask(retryTag);
+ notifyTransition(wex, transactionId, transitionInfo);
+ wex.taskScheduler.stopShepherdTask(retryTag);
}
async resumeTransaction(): Promise<void> {
- const { wex: ws, pursePub, taskId: retryTag, transactionId } = this;
- const transitionInfo = await ws.db.runReadWriteTx(
+ const { wex, pursePub, taskId: retryTag, transactionId } = this;
+ const transitionInfo = await wex.db.runReadWriteTx(
["peerPullCredit"],
async (tx) => {
const pullCreditRec = await tx.peerPullCredit.get(pursePub);
@@ -302,13 +302,13 @@ export class PeerPullCreditTransactionContext implements TransactionContext {
return undefined;
},
);
- notifyTransition(ws, transactionId, transitionInfo);
- ws.taskScheduler.startShepherdTask(retryTag);
+ notifyTransition(wex, transactionId, transitionInfo);
+ wex.taskScheduler.startShepherdTask(retryTag);
}
async abortTransaction(): Promise<void> {
- const { wex: ws, pursePub, taskId: retryTag, transactionId } = this;
- const transitionInfo = await ws.db.runReadWriteTx(
+ const { wex, pursePub, taskId: retryTag, transactionId } = this;
+ const transitionInfo = await wex.db.runReadWriteTx(
["peerPullCredit"],
async (tx) => {
const pullCreditRec = await tx.peerPullCredit.get(pursePub);
@@ -356,9 +356,9 @@ export class PeerPullCreditTransactionContext implements TransactionContext {
return undefined;
},
);
- ws.taskScheduler.stopShepherdTask(retryTag);
- notifyTransition(ws, transactionId, transitionInfo);
- ws.taskScheduler.startShepherdTask(retryTag);
+ wex.taskScheduler.stopShepherdTask(retryTag);
+ notifyTransition(wex, transactionId, transitionInfo);
+ wex.taskScheduler.startShepherdTask(retryTag);
}
}