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/wallet.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/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index 02ed8a61b..49c7f77cf 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -91,6 +91,7 @@ import { OperationMap, FeeDescription, TalerErrorDetail, + codecForTransactionByIdRequest, } from "@gnu-taler/taler-util"; import { TalerCryptoInterface } from "./crypto/cryptoImplementation.js"; import { @@ -198,6 +199,7 @@ import { import { acceptTip, prepareTip, processTip } from "./operations/tip.js"; import { deleteTransaction, + getTransactionById, getTransactions, retryTransaction, } from "./operations/transactions.js"; @@ -1080,6 +1082,10 @@ async function dispatchRequestInternal( const req = codecForTransactionsRequest().decode(payload); return await getTransactions(ws, req); } + case "getTransactionById": { + const req = codecForTransactionByIdRequest().decode(payload); + return await getTransactionById(ws, req) + } case "addExchange": { const req = codecForAddExchangeRequest().decode(payload); await updateExchangeFromUrl(ws, req.exchangeBaseUrl, { @@ -1227,8 +1233,7 @@ async function dispatchRequestInternal( } case "acceptTip": { const req = codecForAcceptTipRequest().decode(payload); - await acceptTip(ws, req.walletTipId); - return {}; + return await acceptTip(ws, req.walletTipId); } case "exportBackupPlain": { return exportBackup(ws); |