commit 020c8ca95f9b95d3761a9525bec7880d315b6611
parent 5eae2ea86ed4d2e3ecc52097a51b285e7239f98d
Author: Florian Dold <florian@dold.me>
Date: Fri, 14 Nov 2025 21:50:11 +0100
wallet-core: update transaction metadata in generic helper
Diffstat:
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/packages/taler-wallet-core/src/common.ts b/packages/taler-wallet-core/src/common.ts
@@ -1105,6 +1105,7 @@ export async function getGenericRecordHandle<T>(
storeRec: (r: T) => Promise<void>,
toSt: (r: T) => TransactionState,
toStId: (r: T) => number,
+ updateMeta: () => Promise<void>,
): Promise<[T | undefined, RecordHandle<T>]> {
const rec = await getRec();
let oldTxState: TransactionState;
@@ -1130,6 +1131,7 @@ export async function getGenericRecordHandle<T>(
// Neither old or new record. Nothing to do.
return;
}
+ await updateMeta();
applyNotifyTransition(tx.notify, ctx.transactionId, {
oldTxState,
newTxState,
diff --git a/packages/taler-wallet-core/src/pay-merchant.ts b/packages/taler-wallet-core/src/pay-merchant.ts
@@ -589,6 +589,7 @@ export class PayMerchantTransactionContext implements TransactionContext {
},
(r) => computePayMerchantTransactionState(r),
(r) => r.purchaseStatus,
+ () => this.updateTransactionMeta(tx),
);
}
}
diff --git a/packages/taler-wallet-core/src/transactions.ts b/packages/taler-wallet-core/src/transactions.ts
@@ -254,6 +254,9 @@ async function addFiltered(
// FIXME: This means that in some cases we can return fewer transactions
// than requested.
if (!txDetails) {
+ logger.warn(
+ `full transaction details missing for transaction ${mtx.transactionId}`,
+ );
continue;
}
numAdded += 1;