diff options
author | Florian Dold <florian@dold.me> | 2024-02-28 00:23:26 +0100 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-02-28 00:23:26 +0100 |
commit | 5154aca23446d617882f85038231198824010c47 (patch) | |
tree | 7d6cac314f5e855b843149d918407be105ff5a69 /packages/taler-wallet-core/src/wallet.ts | |
parent | d394a6f02f7905813afb74f157badd11f609a18c (diff) | |
download | wallet-core-5154aca23446d617882f85038231198824010c47.tar.xz |
wallet-core: translate transactionId to taskIds
Diffstat (limited to 'packages/taler-wallet-core/src/wallet.ts')
-rw-r--r-- | packages/taler-wallet-core/src/wallet.ts | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/packages/taler-wallet-core/src/wallet.ts b/packages/taler-wallet-core/src/wallet.ts index ea3c4bb83..14f4c85c3 100644 --- a/packages/taler-wallet-core/src/wallet.ts +++ b/packages/taler-wallet-core/src/wallet.ts @@ -55,6 +55,7 @@ import { TalerErrorCode, TalerProtocolTimestamp, TalerUriAction, + TestingListTasksForTransactionsResponse, TestingWaitTransactionRequest, TimerAPI, TimerGroup, @@ -121,6 +122,7 @@ import { codecForStartRefundQueryRequest, codecForSuspendTransaction, codecForTestPayArgs, + codecForTestingListTasksForTransactionRequest, codecForTestingSetTimetravelRequest, codecForTransactionByIdRequest, codecForTransactionsRequest, @@ -233,7 +235,11 @@ import { } from "./pay-peer-push-debit.js"; import { DbAccess } from "./query.js"; import { forceRefresh } from "./refresh.js"; -import { TaskScheduler, TaskSchedulerImpl } from "./shepherd.js"; +import { + TaskScheduler, + TaskSchedulerImpl, + listTaskForTransactionId, +} from "./shepherd.js"; import { runIntegrationTest, runIntegrationTest2, @@ -717,6 +723,13 @@ async function dispatchRequestInternal<Op extends WalletApiOperation>( await withdrawTestBalance(wex, req); return {}; } + case WalletApiOperation.TestingListTaskForTransaction: { + const req = + codecForTestingListTasksForTransactionRequest().decode(payload); + return { + taskIdList: listTaskForTransactionId(req.transactionId), + } satisfies TestingListTasksForTransactionsResponse; + } case WalletApiOperation.RunIntegrationTest: { const req = codecForIntegrationTestArgs().decode(payload); await runIntegrationTest(wex, req); |