gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-core] branch master updated (30e5b7f6b -> be0f21389)


From: gnunet
Subject: [taler-wallet-core] branch master updated (30e5b7f6b -> be0f21389)
Date: Wed, 27 Mar 2024 19:21:58 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository wallet-core.

    from 30e5b7f6b wallet-core: report more info about (missing) fees
     new 3a1a56704 wallet-core: emit balance-changed transaction after 
transitioning transaction
     new be0f21389 wallet-core: empty balance item for exchanges that are used 
or have accepted ToS

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/taler-wallet-core/src/balance.ts              | 13 +++++++++++++
 packages/taler-wallet-core/src/pay-peer-pull-credit.ts |  6 +++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/packages/taler-wallet-core/src/balance.ts 
b/packages/taler-wallet-core/src/balance.ts
index 5e3562ba2..50996b8de 100644
--- a/packages/taler-wallet-core/src/balance.ts
+++ b/packages/taler-wallet-core/src/balance.ts
@@ -67,6 +67,7 @@ import {
 import { ExchangeRestrictionSpec, findMatchingWire } from "./coinSelection.js";
 import {
   DepositOperationStatus,
+  ExchangeEntryDbRecordStatus,
   OPERATION_STATUS_ACTIVE_FIRST,
   OPERATION_STATUS_ACTIVE_LAST,
   RefreshGroupRecord,
@@ -304,6 +305,18 @@ export async function getBalancesInsideTransaction(
     OPERATION_STATUS_ACTIVE_LAST,
   );
 
+  await tx.exchanges.iter().forEachAsync(async (ex) => {
+    if (
+      ex.entryStatus === ExchangeEntryDbRecordStatus.Used ||
+      ex.tosAcceptedTimestamp != null
+    ) {
+      const det = await getExchangeWireDetailsInTx(tx, ex.baseUrl);
+      if (det) {
+        await balanceStore.addZero(det.currency, ex.baseUrl);
+      }
+    }
+  });
+
   await tx.coinAvailability.iter().forEachAsync(async (ca) => {
     const count = ca.visibleCoinCount ?? 0;
     await balanceStore.addZero(ca.currency, ca.exchangeBaseUrl);
diff --git a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts 
b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
index 96d8f65a6..4155f83e6 100644
--- a/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
+++ b/packages/taler-wallet-core/src/pay-peer-pull-credit.ts
@@ -1073,15 +1073,15 @@ export async function initiatePeerPullPayment(
 
   const ctx = new PeerPullCreditTransactionContext(wex, pursePair.pub);
 
+  notifyTransition(wex, ctx.transactionId, transitionInfo);
+  wex.taskScheduler.startShepherdTask(ctx.taskId);
+
   // The pending-incoming balance has changed.
   wex.ws.notify({
     type: NotificationType.BalanceChange,
     hintTransactionId: ctx.transactionId,
   });
 
-  notifyTransition(wex, ctx.transactionId, transitionInfo);
-  wex.taskScheduler.startShepherdTask(ctx.taskId);
-
   return {
     talerUri: stringifyTalerUri({
       type: TalerUriAction.PayPull,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]