aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core/src/operations/transactions.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-core/src/operations/transactions.ts')
-rw-r--r--packages/taler-wallet-core/src/operations/transactions.ts17
1 files changed, 15 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts b/packages/taler-wallet-core/src/operations/transactions.ts
index 41bdae249..cf2006406 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -20,6 +20,7 @@
import {
AbsoluteTime,
Amounts,
+ DepositTransactionTrackingState,
j2s,
Logger,
NotificationType,
@@ -69,6 +70,7 @@ import {
GetReadOnlyAccess,
timestampOptionalPreciseFromDb,
timestampPreciseFromDb,
+ timestampProtocolFromDb,
WalletStoresV1,
} from "../index.js";
import { InternalWalletState } from "../internal-wallet-state.js";
@@ -809,6 +811,17 @@ function buildTransactionForDeposit(
}
}
+ const trackingState: DepositTransactionTrackingState[] = [];
+
+ for (const ts of Object.values(dg.trackingState ?? {})) {
+ trackingState.push({
+ amountRaw: ts.amountRaw,
+ timestampExecuted: timestampProtocolFromDb(ts.timestampExecuted),
+ wireFee: ts.wireFee,
+ wireTransferId: ts.wireTransferId,
+ });
+ }
+
return {
type: TransactionType.Deposit,
txState: computeDepositTransactionStatus(dg),
@@ -817,7 +830,7 @@ function buildTransactionForDeposit(
amountEffective: Amounts.stringify(dg.totalPayCost),
timestamp: timestampPreciseFromDb(dg.timestampCreated),
targetPaytoUri: dg.wire.payto_uri,
- wireTransferDeadline: dg.wireTransferDeadline,
+ wireTransferDeadline: timestampProtocolFromDb(dg.wireTransferDeadline),
transactionId: constructTransactionIdentifier({
tag: TransactionType.Deposit,
depositGroupId: dg.depositGroupId,
@@ -830,7 +843,7 @@ function buildTransactionForDeposit(
)) /
dg.statusPerCoin.length,
depositGroupId: dg.depositGroupId,
- trackingState: Object.values(dg.trackingState ?? {}),
+ trackingState,
deposited,
...(ort?.lastError ? { error: ort.lastError } : {}),
};