aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/withdraw.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2023-09-07 20:35:46 +0200
committerFlorian Dold <florian@dold.me>2023-09-08 00:12:52 +0200
commitc660db82c12e08020661828f1d8383baa7ef0e02 (patch)
tree655b3aa9cf91fae4a4b4052356b97a9b3b119376 /packages/taler-wallet-core/src/operations/withdraw.ts
parent33f2798004b1235eeb33a66d08bf22243f5ae566 (diff)
downloadwallet-core-c660db82c12e08020661828f1d8383baa7ef0e02.tar.xz
wallet-core: address DB FIXMEs, systematic state numbering
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index b2b25144d..32e63f4f6 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -315,7 +315,7 @@ export async function abortWithdrawalTransaction(
case WithdrawalGroupStatus.AbortingBank:
// No transition needed, but not an error
break;
- case WithdrawalGroupStatus.Finished:
+ case WithdrawalGroupStatus.Done:
case WithdrawalGroupStatus.FailedBankAborted:
case WithdrawalGroupStatus.AbortedExchange:
case WithdrawalGroupStatus.AbortedBank:
@@ -395,7 +395,7 @@ export function computeWithdrawalTransactionStatus(
return {
major: TransactionMajorState.Aborted,
};
- case WithdrawalGroupStatus.Finished:
+ case WithdrawalGroupStatus.Done:
return {
major: TransactionMajorState.Done,
};
@@ -499,7 +499,7 @@ export function computeWithdrawalTransactionActions(
switch (wgRecord.status) {
case WithdrawalGroupStatus.FailedBankAborted:
return [TransactionAction.Delete];
- case WithdrawalGroupStatus.Finished:
+ case WithdrawalGroupStatus.Done:
return [TransactionAction.Delete];
case WithdrawalGroupStatus.PendingRegisteringBank:
return [TransactionAction.Suspend, TransactionAction.Abort];
@@ -1457,7 +1457,7 @@ async function processWithdrawalGroupPendingReady(
return undefined;
}
const txStatusOld = computeWithdrawalTransactionStatus(wg);
- wg.status = WithdrawalGroupStatus.Finished;
+ wg.status = WithdrawalGroupStatus.Done;
wg.timestampFinish = TalerPreciseTimestamp.now();
const txStatusNew = computeWithdrawalTransactionStatus(wg);
await tx.withdrawalGroups.put(wg);
@@ -1555,7 +1555,7 @@ async function processWithdrawalGroupPendingReady(
logger.info(`now withdrawn ${numFinished} of ${numTotalCoins} coins`);
if (wg.timestampFinish === undefined && numFinished === numTotalCoins) {
wg.timestampFinish = TalerPreciseTimestamp.now();
- wg.status = WithdrawalGroupStatus.Finished;
+ wg.status = WithdrawalGroupStatus.Done;
await makeCoinsVisible(ws, tx, transactionId);
}
@@ -1647,7 +1647,7 @@ export async function processWithdrawalGroup(
}
break;
}
- case WithdrawalGroupStatus.Finished:
+ case WithdrawalGroupStatus.Done:
case WithdrawalGroupStatus.FailedBankAborted: {
// FIXME
return TaskRunResult.pending();