diff options
author | Sebastian <sebasjm@gmail.com> | 2022-09-16 11:06:55 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2022-09-16 11:13:09 -0300 |
commit | 5d0837913901a2947c66209d64855b324824757d (patch) | |
tree | bff68e1fff6f5833948505849d58f4be4a5e62d1 /packages/taler-wallet-core/src/operations/refund.ts | |
parent | a66b636dee2ed531bb5119feced80d6569d99176 (diff) | |
download | wallet-core-5d0837913901a2947c66209d64855b324824757d.tar.xz |
working on #7357
getTransactionById is introduced:
with that we move all transaction information building into a function
transactionId was added in every response that creates a tx
Diffstat (limited to 'packages/taler-wallet-core/src/operations/refund.ts')
-rw-r--r-- | packages/taler-wallet-core/src/operations/refund.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/taler-wallet-core/src/operations/refund.ts b/packages/taler-wallet-core/src/operations/refund.ts index f028dfbf1..644b07ef1 100644 --- a/packages/taler-wallet-core/src/operations/refund.ts +++ b/packages/taler-wallet-core/src/operations/refund.ts @@ -46,6 +46,7 @@ import { TalerErrorCode, TalerErrorDetail, TalerProtocolTimestamp, + TransactionType, URL, } from "@gnu-taler/taler-util"; import { @@ -63,6 +64,7 @@ import { readSuccessResponseJsonOrThrow } from "../util/http.js"; import { checkDbInvariant } from "../util/invariants.js"; import { GetReadWriteAccess } from "../util/query.js"; import { createRefreshGroup, getTotalRefreshCost } from "./refresh.js"; +import { makeEventId } from "./transactions.js"; const logger = new Logger("refund.ts"); @@ -573,6 +575,7 @@ export async function applyRefundFromPurchaseId( return { contractTermsHash: purchase.download.contractData.contractTermsHash, proposalId: purchase.proposalId, + transactionId: makeEventId(TransactionType.Payment, proposalId), //FIXME: can we have the tx id of the refund amountEffectivePaid: Amounts.stringify(summary.amountEffectivePaid), amountRefundGone: Amounts.stringify(summary.amountRefundGone), amountRefundGranted: Amounts.stringify(summary.amountRefundGranted), |