[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] branch master updated: wallet-core: logging
From: |
gnunet |
Subject: |
[taler-wallet-core] branch master updated: wallet-core: logging |
Date: |
Mon, 01 Jul 2024 15:19:36 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-core.
The following commit(s) were added to refs/heads/master by this push:
new 007c75084 wallet-core: logging
007c75084 is described below
commit 007c75084c3f26aa0d6e3c438b541ea0dd3ba598
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Jul 1 15:19:32 2024 +0200
wallet-core: logging
---
packages/taler-wallet-core/src/testing.ts | 4 ++--
packages/taler-wallet-core/src/wallet.ts | 4 ++--
packages/taler-wallet-core/src/withdraw.ts | 18 +++++++++++++++++-
3 files changed, 21 insertions(+), 5 deletions(-)
diff --git a/packages/taler-wallet-core/src/testing.ts
b/packages/taler-wallet-core/src/testing.ts
index 6435595cb..225773f8c 100644
--- a/packages/taler-wallet-core/src/testing.ts
+++ b/packages/taler-wallet-core/src/testing.ts
@@ -80,7 +80,7 @@ import { initiatePeerPushDebit } from
"./pay-peer-push-debit.js";
import { getRefreshesForTransaction } from "./refresh.js";
import { getTransactionById, getTransactions } from "./transactions.js";
import type { WalletExecutionContext } from "./wallet.js";
-import { acceptWithdrawalFromUri } from "./withdraw.js";
+import { acceptBankIntegratedWithdrawal } from "./withdraw.js";
const logger = new Logger("operations/testing.ts");
@@ -128,7 +128,7 @@ export async function withdrawTestBalance(
await fetchFreshExchange(wex, req.exchangeBaseUrl);
await acceptExchangeTermsOfService(wex, req.exchangeBaseUrl);
- const acceptResp = await acceptWithdrawalFromUri(wex, {
+ const acceptResp = await acceptBankIntegratedWithdrawal(wex, {
talerWithdrawUri: wresp.taler_withdraw_uri,
selectedExchange: exchangeBaseUrl,
forcedDenomSel: req.forcedDenomSel,
diff --git a/packages/taler-wallet-core/src/wallet.ts
b/packages/taler-wallet-core/src/wallet.ts
index 614310cb6..1f2686cc9 100644
--- a/packages/taler-wallet-core/src/wallet.ts
+++ b/packages/taler-wallet-core/src/wallet.ts
@@ -357,7 +357,7 @@ import {
WalletCoreResponseType,
} from "./wallet-api-types.js";
import {
- acceptWithdrawalFromUri,
+ acceptBankIntegratedWithdrawal,
confirmWithdrawal,
createManualWithdrawal,
getWithdrawalDetailsForAmount,
@@ -1366,7 +1366,7 @@ async function handleAcceptBankIntegratedWithdrawal(
wex: WalletExecutionContext,
req: AcceptBankIntegratedWithdrawalRequest,
): Promise<AcceptWithdrawalResponse> {
- return await acceptWithdrawalFromUri(wex, {
+ return await acceptBankIntegratedWithdrawal(wex, {
selectedExchange: req.exchangeBaseUrl,
talerWithdrawUri: req.talerWithdrawUri,
forcedDenomSel: req.forcedDenomSel,
diff --git a/packages/taler-wallet-core/src/withdraw.ts
b/packages/taler-wallet-core/src/withdraw.ts
index 3e2f4411f..229727a54 100644
--- a/packages/taler-wallet-core/src/withdraw.ts
+++ b/packages/taler-wallet-core/src/withdraw.ts
@@ -3292,7 +3292,7 @@ export async function confirmWithdrawal(
*
* @deprecated in favor of prepare/accept
*/
-export async function acceptWithdrawalFromUri(
+export async function acceptBankIntegratedWithdrawal(
wex: WalletExecutionContext,
req: {
talerWithdrawUri: string;
@@ -3302,6 +3302,12 @@ export async function acceptWithdrawalFromUri(
amount?: AmountLike;
},
): Promise<AcceptWithdrawalResponse> {
+
+ wex.oc.observe({
+ type: ObservabilityEventType.Message,
+ contents: "at start of acceptBankIntegratedWithdrawal",
+ });
+
const selectedExchange = req.selectedExchange;
logger.info(
`preparing withdrawal via ${req.talerWithdrawUri}, canonicalized selected
exchange ${selectedExchange}`,
@@ -3311,6 +3317,11 @@ export async function acceptWithdrawalFromUri(
talerWithdrawUri: req.talerWithdrawUri,
});
+ wex.oc.observe({
+ type: ObservabilityEventType.Message,
+ contents: "prepared acceptBankIntegratedWithdrawal",
+ });
+
let amount: AmountString;
if (p.info.amount == null) {
if (req.amount == null) {
@@ -3344,6 +3355,11 @@ export async function acceptWithdrawalFromUri(
forcedDenomSel: req.forcedDenomSel,
});
+ wex.oc.observe({
+ type: ObservabilityEventType.Message,
+ contents: "confirmed acceptBankIntegratedWithdrawal",
+ });
+
const newWithdrawralGroup = await wex.db.runReadOnlyTx(
{ storeNames: ["withdrawalGroups"] },
async (tx) => {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated: wallet-core: logging,
gnunet <=