gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: wallet-core: use/allow txids


From: gnunet
Subject: [taler-wallet-core] branch master updated: wallet-core: use/allow txids as tombstone
Date: Wed, 24 May 2023 15:07:33 +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 126e9e745 wallet-core: use/allow txids as tombstone
126e9e745 is described below

commit 126e9e7457851d7d4293797c4c75cafea59f3444
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed May 24 15:07:29 2023 +0200

    wallet-core: use/allow txids as tombstone
---
 .../taler-wallet-core/src/operations/common.ts     |  4 ++--
 .../src/operations/transactions.ts                 | 22 +++-------------------
 2 files changed, 5 insertions(+), 21 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/common.ts 
b/packages/taler-wallet-core/src/operations/common.ts
index f6572c851..5ad1e7112 100644
--- a/packages/taler-wallet-core/src/operations/common.ts
+++ b/packages/taler-wallet-core/src/operations/common.ts
@@ -364,7 +364,7 @@ export enum TombstoneTag {
 
 /**
  * Create an event ID from the type and the primary key for the event.
- * 
+ *
  * @deprecated use constructTombstone instead
  */
 export function makeTombstoneId(type: TombstoneTag, ...args: string[]): string 
{
@@ -465,7 +465,7 @@ export type ParsedTombstone =
       tag: TombstoneTag.DeleteWithdrawalGroup;
       withdrawalGroupId: string;
     }
-  | { tag: TombstoneTag.DeleteRefund; refundGroupId: string };
+  | { tag: TombstoneTag.DeleteRefund; refundGroupId: string }
 
 export function constructTombstone(p: ParsedTombstone): TombstoneIdStr {
   switch (p.tag) {
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts 
b/packages/taler-wallet-core/src/operations/transactions.ts
index 647b9dd90..dba082854 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -24,7 +24,6 @@ import {
   Logger,
   NotificationType,
   OrderShortInfo,
-  PaymentStatus,
   PeerContractTerms,
   RefundInfoShort,
   RefundPaymentInfo,
@@ -54,7 +53,6 @@ import {
   WithdrawalGroupRecord,
   WithdrawalRecordType,
   WalletContractData,
-  PeerPushPaymentInitiationStatus,
   PeerPullPaymentIncomingStatus,
   DepositElementStatus,
   WithdrawalGroupStatus,
@@ -71,8 +69,6 @@ import { assertUnreachable } from 
"../util/assertUnreachable.js";
 import { checkDbInvariant, checkLogicInvariant } from "../util/invariants.js";
 import { constructTaskIdentifier, TaskIdentifiers } from "../util/retries.js";
 import {
-  constructTombstone,
-  makeTombstoneId,
   resetOperationTimeout,
   runOperationWithErrorReporting,
   TombstoneTag,
@@ -1625,12 +1621,7 @@ export async function deleteTransaction(
             return;
           }
           await tx.refundGroups.delete(refundGroupId);
-          await tx.tombstones.put({
-            id: constructTombstone({
-              tag: TombstoneTag.DeleteRefund,
-              refundGroupId,
-            }),
-          });
+          await tx.tombstones.put({ id: transactionId });
         });
       return;
     }
@@ -1645,12 +1636,7 @@ export async function deleteTransaction(
           );
           if (debit) {
             await tx.peerPullPaymentIncoming.delete(peerPullPaymentIncomingId);
-            await tx.tombstones.put({
-              id: makeTombstoneId(
-                TombstoneTag.DeletePeerPullDebit,
-                peerPullPaymentIncomingId,
-              ),
-            });
+            await tx.tombstones.put({ id: transactionId });
           }
         });
 
@@ -1665,9 +1651,7 @@ export async function deleteTransaction(
           const debit = await tx.peerPushPaymentInitiations.get(pursePub);
           if (debit) {
             await tx.peerPushPaymentInitiations.delete(pursePub);
-            await tx.tombstones.put({
-              id: makeTombstoneId(TombstoneTag.DeletePeerPushDebit, pursePub),
-            });
+            await tx.tombstones.put({ id: transactionId });
           }
         });
       return;

-- 
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]