summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/walletTypes.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-09-16 11:06:55 -0300
committerSebastian <sebasjm@gmail.com>2022-09-16 11:13:09 -0300
commit5d0837913901a2947c66209d64855b324824757d (patch)
treebff68e1fff6f5833948505849d58f4be4a5e62d1 /packages/taler-util/src/walletTypes.ts
parenta66b636dee2ed531bb5119feced80d6569d99176 (diff)
downloadwallet-core-5d0837913901a2947c66209d64855b324824757d.tar.gz
wallet-core-5d0837913901a2947c66209d64855b324824757d.tar.bz2
wallet-core-5d0837913901a2947c66209d64855b324824757d.zip
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-util/src/walletTypes.ts')
-rw-r--r--packages/taler-util/src/walletTypes.ts26
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 701049c26..7fcb752b1 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -138,11 +138,12 @@ export enum ConfirmPayResultType {
export interface ConfirmPayResultDone {
type: ConfirmPayResultType.Done;
contractTerms: ContractTerms;
+ transactionId: string;
}
export interface ConfirmPayResultPending {
type: ConfirmPayResultType.Pending;
-
+ transactionId: string;
lastError: TalerErrorDetail | undefined;
}
@@ -152,12 +153,14 @@ export const codecForConfirmPayResultPending =
(): Codec<ConfirmPayResultPending> =>
buildCodecForObject<ConfirmPayResultPending>()
.property("lastError", codecForAny())
+ .property("transactionId", codecForString())
.property("type", codecForConstString(ConfirmPayResultType.Pending))
.build("ConfirmPayResultPending");
export const codecForConfirmPayResultDone = (): Codec<ConfirmPayResultDone> =>
buildCodecForObject<ConfirmPayResultDone>()
.property("type", codecForConstString(ConfirmPayResultType.Done))
+ .property("transactionId", codecForString())
.property("contractTerms", codecForContractTerms())
.build("ConfirmPayResultDone");
@@ -334,6 +337,10 @@ export interface PrepareTipResult {
expirationTimestamp: TalerProtocolTimestamp;
}
+export interface AcceptTipResponse {
+ transactionId: string;
+}
+
export const codecForPrepareTipResult = (): Codec<PrepareTipResult> =>
buildCodecForObject<PrepareTipResult>()
.property("accepted", codecForBoolean())
@@ -462,6 +469,7 @@ export interface BankWithdrawDetails {
export interface AcceptWithdrawalResponse {
reservePub: string;
confirmTransferUrl?: string;
+ transactionId: string;
}
/**
@@ -864,6 +872,8 @@ export interface AcceptManualWithdrawalResult {
* Public key of the newly created reserve.
*/
reservePub: string;
+
+ transactionId: string;
}
export interface ManualWithdrawalDetails {
@@ -1252,6 +1262,8 @@ export const codecForWithdrawTestBalance =
export interface ApplyRefundResponse {
contractTermsHash: string;
+ transactionId: string;
+
proposalId: string;
amountEffectivePaid: AmountString;
@@ -1273,6 +1285,7 @@ export const codecForApplyRefundResponse = (): Codec<ApplyRefundResponse> =>
.property("contractTermsHash", codecForString())
.property("pendingAtExchange", codecForBoolean())
.property("proposalId", codecForString())
+ .property("transactionId", codecForString())
.property("info", codecForOrderShortInfo())
.build("ApplyRefundResponse");
@@ -1374,6 +1387,7 @@ export const codecForCreateDepositGroupRequest =
export interface CreateDepositGroupResponse {
depositGroupId: string;
+ transactionId: string;
}
export interface TrackDepositGroupRequest {
@@ -1539,6 +1553,7 @@ export interface InitiatePeerPushPaymentResponse {
mergePriv: string;
contractPriv: string;
talerUri: string;
+ transactionId: string;
}
export const codecForInitiatePeerPushPaymentRequest =
@@ -1586,6 +1601,13 @@ export interface AcceptPeerPushPaymentRequest {
*/
peerPushPaymentIncomingId: string;
}
+export interface AcceptPeerPushPaymentResponse {
+ transactionId: string;
+}
+
+export interface AcceptPeerPullPaymentResponse {
+ transactionId: string;
+}
export const codecForAcceptPeerPushPaymentRequest =
(): Codec<AcceptPeerPushPaymentRequest> =>
@@ -1629,4 +1651,6 @@ export interface InitiatePeerPullPaymentResponse {
* that was requested.
*/
talerUri: string;
+
+ transactionId: string;
}