[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 02/02: taler-wallet-cli: stop wallet properly
From: |
gnunet |
Subject: |
[taler-wallet-core] 02/02: taler-wallet-cli: stop wallet properly |
Date: |
Fri, 10 Feb 2023 19:48:08 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
commit 16408595945b83dcc8dc773cc5c1c84eb36ecb2b
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Feb 10 19:47:59 2023 +0100
taler-wallet-cli: stop wallet properly
---
.../taler-harness/src/integrationtests/test-withdrawal-manual.ts | 9 ++++++++-
packages/taler-wallet-cli/src/index.ts | 4 +++-
packages/taler-wallet-core/src/operations/withdraw.ts | 2 +-
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git
a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
index 10b2e5f44..d28ecc91c 100644
--- a/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
+++ b/packages/taler-harness/src/integrationtests/test-withdrawal-manual.ts
@@ -21,9 +21,11 @@ import { GlobalTestState } from "../harness/harness.js";
import { createSimpleTestkudosEnvironment } from "../harness/helpers.js";
import { WalletApiOperation, BankApi } from "@gnu-taler/taler-wallet-core";
import {
- AbsoluteTime,
+ AbsoluteTime, j2s, Logger,
} from "@gnu-taler/taler-util";
+const logger = new Logger("test-withdrawal-manual.ts");
+
/**
* Run test for basic, bank-integrated withdrawal.
*/
@@ -43,7 +45,9 @@ export async function runWithdrawalManualTest(t:
GlobalTestState) {
const tStart = AbsoluteTime.now();
+ logger.info("starting AcceptManualWithdrawal request");
// We expect this to return immediately.
+
const wres = await wallet.client.call(
WalletApiOperation.AcceptManualWithdrawal,
{
@@ -52,6 +56,9 @@ export async function runWithdrawalManualTest(t:
GlobalTestState) {
},
);
+ logger.info("AcceptManualWithdrawal finished");
+ logger.info(`result: ${j2s(wres)}`);
+
// Check that the request did not go into long-polling.
const duration = AbsoluteTime.difference(tStart, AbsoluteTime.now());
if (duration.d_ms > 5 * 1000) {
diff --git a/packages/taler-wallet-cli/src/index.ts
b/packages/taler-wallet-cli/src/index.ts
index 48e98264d..6641dab09 100644
--- a/packages/taler-wallet-cli/src/index.ts
+++ b/packages/taler-wallet-cli/src/index.ts
@@ -306,7 +306,9 @@ async function withWallet<T>(
return w.handleCoreApiRequest(operation, "my-req", payload);
},
};
- return await f(ctx);
+ const result = await f(ctx);
+ w.stop();
+ return result;
}
}
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts
b/packages/taler-wallet-core/src/operations/withdraw.ts
index cb1627c1e..5c9854c0f 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -2040,7 +2040,7 @@ export async function createManualWithdrawal(
x.exchangeDetails,
x.exchangeTrust,
])
- .runReadWrite(async (tx) => {
+ .runReadOnly(async (tx) => {
return await getFundingPaytoUris(tx, withdrawalGroup.withdrawalGroupId);
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.