summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wxApi.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-wallet-webextension/src/wxApi.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-wallet-webextension/src/wxApi.ts')
-rw-r--r--packages/taler-wallet-webextension/src/wxApi.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/packages/taler-wallet-webextension/src/wxApi.ts b/packages/taler-wallet-webextension/src/wxApi.ts
index b797179c3..e9d26853d 100644
--- a/packages/taler-wallet-webextension/src/wxApi.ts
+++ b/packages/taler-wallet-webextension/src/wxApi.ts
@@ -68,6 +68,10 @@ import {
WalletCoreVersion,
WithdrawUriInfoResponse,
ExchangeFullDetails,
+ Transaction,
+ AcceptTipResponse,
+ AcceptPeerPullPaymentResponse,
+ AcceptPeerPushPaymentResponse,
} from "@gnu-taler/taler-util";
import {
AddBackupProviderRequest,
@@ -476,7 +480,7 @@ export function prepareTip(req: PrepareTipRequest): Promise<PrepareTipResult> {
return callBackend("prepareTip", req);
}
-export function acceptTip(req: AcceptTipRequest): Promise<void> {
+export function acceptTip(req: AcceptTipRequest): Promise<AcceptTipResponse> {
return callBackend("acceptTip", req);
}
@@ -513,7 +517,7 @@ export function checkPeerPushPayment(
}
export function acceptPeerPushPayment(
req: AcceptPeerPushPaymentRequest,
-): Promise<void> {
+): Promise<AcceptPeerPushPaymentResponse> {
return callBackend("acceptPeerPushPayment", req);
}
export function initiatePeerPullPayment(
@@ -528,6 +532,12 @@ export function checkPeerPullPayment(
}
export function acceptPeerPullPayment(
req: AcceptPeerPullPaymentRequest,
-): Promise<void> {
+): Promise<AcceptPeerPullPaymentResponse> {
return callBackend("acceptPeerPullPayment", req);
}
+
+export function getTransactionById(tid: string): Promise<Transaction> {
+ return callBackend("getTransactionById", {
+ transactionId: tid
+ })
+} \ No newline at end of file