summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-04-23 00:46:00 +0200
committerFlorian Dold <florian@dold.me>2024-04-23 00:46:00 +0200
commit5c0f03f102848d208248e1508f1da8316ebf6407 (patch)
treed33a2bf84b19a8a22c67262e76db8bb29768ddb3 /packages
parentf4ffd0fab12dadc709d6ced5d3129e0a2c03d72b (diff)
downloadwallet-core-5c0f03f102848d208248e1508f1da8316ebf6407.tar.gz
wallet-core-5c0f03f102848d208248e1508f1da8316ebf6407.tar.bz2
wallet-core-5c0f03f102848d208248e1508f1da8316ebf6407.zip
embedded wallet: starting task loop is not necessary anymore
Diffstat (limited to 'packages')
-rw-r--r--packages/taler-wallet-embedded/src/wallet-qjs.ts19
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()));