taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 5c0f03f102848d208248e1508f1da8316ebf6407
parent f4ffd0fab12dadc709d6ced5d3129e0a2c03d72b
Author: Florian Dold <florian@dold.me>
Date:   Tue, 23 Apr 2024 00:46:00 +0200

embedded wallet: starting task loop is not necessary anymore

Diffstat:
Mpackages/taler-wallet-embedded/src/wallet-qjs.ts | 19+++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)

diff --git a/packages/taler-wallet-embedded/src/wallet-qjs.ts b/packages/taler-wallet-embedded/src/wallet-qjs.ts @@ -106,11 +106,6 @@ class NativeWalletMessageHandler { }, ); initResponse = resp.type == "response" ? resp.result : resp.error; - w.runTaskLoop().catch((e) => { - logger.error( - `Error during wallet retry loop: ${e.stack ?? e.toString()}`, - ); - }); this.wp.resolve(w); }; @@ -296,9 +291,8 @@ export async function testWithGv() { merchantBaseUrl: "https://backend.demo.taler.net/", merchantAuthToken: "secret-token:sandbox", }); - await w.wallet.runTaskLoop({ - stopWhenDone: true, - }); + await w.wallet.client.call(WalletApiOperation.TestingWaitTasksDone, {}); + w.wallet.stop(); } export async function testWithFdold() { @@ -317,9 +311,8 @@ export async function testWithFdold() { exchangeBaseUrl: "https://exchange.taler.fdold.eu/", merchantBaseUrl: "https://merchant.taler.fdold.eu/", }); - await w.wallet.runTaskLoop({ - stopWhenDone: true, - }); + await w.wallet.client.call(WalletApiOperation.TestingWaitTasksDone, {}); + w.wallet.stop(); } export async function testWithLocal(path: string) { @@ -347,9 +340,7 @@ export async function testWithLocal(path: string) { merchantBaseUrl: "http://localhost:8083/", }); console.log("started integration test"); - await w.wallet.runTaskLoop({ - stopWhenDone: true, - }); + await w.wallet.client.call(WalletApiOperation.TestingWaitTasksDone, {}); console.log("done with task loop"); w.wallet.stop(); console.log("DB stats:", j2s(w.getDbStats()));