diff options
author | Florian Dold <florian@dold.me> | 2024-04-23 00:46:00 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2024-04-23 00:46:00 +0200 |
commit | 5c0f03f102848d208248e1508f1da8316ebf6407 (patch) | |
tree | d33a2bf84b19a8a22c67262e76db8bb29768ddb3 /packages/taler-wallet-embedded/src/wallet-qjs.ts | |
parent | f4ffd0fab12dadc709d6ced5d3129e0a2c03d72b (diff) | |
download | wallet-core-5c0f03f102848d208248e1508f1da8316ebf6407.tar.xz |
embedded wallet: starting task loop is not necessary anymore
Diffstat (limited to 'packages/taler-wallet-embedded/src/wallet-qjs.ts')
-rw-r--r-- | packages/taler-wallet-embedded/src/wallet-qjs.ts | 19 |
1 files 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 index 8502c779a..4441ac8c1 100644 --- 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())); |