summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/withdraw.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/withdraw.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts30
1 files changed, 16 insertions, 14 deletions
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index d0c4d453f..ba154d05c 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -482,7 +482,7 @@ export function computeWithdrawalTransactionStatus(
return {
major: TransactionMajorState.Aborted,
minor: TransactionMinorState.Exchange,
- }
+ };
}
}
@@ -1997,7 +1997,7 @@ async function processReserveBankStatus(
return {
oldTxState,
newTxState,
- }
+ };
});
notifyTransition(ws, transactionId, transitionInfo);
return {
@@ -2059,7 +2059,7 @@ async function processReserveBankStatus(
return {
oldTxState,
newTxState,
- }
+ };
});
notifyTransition(ws, transactionId, transitionInfo);
@@ -2208,12 +2208,12 @@ export async function internalCreateWithdrawalGroup(
const oldTxState = {
major: TransactionMajorState.None,
- }
+ };
const newTxState = computeWithdrawalTransactionStatus(withdrawalGroup);
return {
oldTxState,
newTxState,
- }
+ };
});
notifyTransition(ws, transactionId, transitionInfo);
@@ -2253,10 +2253,10 @@ export async function acceptWithdrawalFromUri(
return {
reservePub: existingWithdrawalGroup.reservePub,
confirmTransferUrl: url,
- transactionId: makeTransactionId(
- TransactionType.Withdrawal,
- existingWithdrawalGroup.withdrawalGroupId,
- ),
+ transactionId: constructTransactionIdentifier({
+ tag: TransactionType.Withdrawal,
+ withdrawalGroupId: existingWithdrawalGroup.withdrawalGroupId,
+ }),
};
}
@@ -2290,8 +2290,8 @@ export async function acceptWithdrawalFromUri(
});
const withdrawalGroupId = withdrawalGroup.withdrawalGroupId;
- const transactionId = constructTaskIdentifier({
- tag: PendingTaskType.Withdraw,
+ const transactionId = constructTransactionIdentifier({
+ tag: TransactionType.Withdrawal,
withdrawalGroupId,
});
@@ -2301,7 +2301,9 @@ export async function acceptWithdrawalFromUri(
const processedWithdrawalGroup = await getWithdrawalGroupRecordTx(ws.db, {
withdrawalGroupId,
});
- if (processedWithdrawalGroup?.status === WithdrawalGroupStatus.FailedBankAborted) {
+ if (
+ processedWithdrawalGroup?.status === WithdrawalGroupStatus.FailedBankAborted
+ ) {
throw TalerError.fromDetail(
TalerErrorCode.WALLET_WITHDRAWAL_OPERATION_ABORTED_BY_BANK,
{},
@@ -2346,8 +2348,8 @@ export async function createManualWithdrawal(
});
const withdrawalGroupId = withdrawalGroup.withdrawalGroupId;
- const transactionId = constructTaskIdentifier({
- tag: PendingTaskType.Withdraw,
+ const transactionId = constructTransactionIdentifier({
+ tag: TransactionType.Withdrawal,
withdrawalGroupId,
});