gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: -comments


From: gnunet
Subject: [taler-wallet-core] branch master updated: -comments
Date: Fri, 17 Feb 2023 02:25:52 +0100

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 8b83f729d -comments
8b83f729d is described below

commit 8b83f729d7394837a3be231bbeeea44f6a01e9a1
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Feb 17 02:25:46 2023 +0100

    -comments
---
 .../taler-wallet-core/src/operations/pay-peer.ts   |  2 ++
 .../src/operations/transactions.ts                 | 23 ++++++++++++++--------
 packages/taler-wallet-core/src/wallet-api-types.ts | 15 +++++++++++---
 3 files changed, 29 insertions(+), 11 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/pay-peer.ts 
b/packages/taler-wallet-core/src/operations/pay-peer.ts
index dd5ea13c9..c1cacead9 100644
--- a/packages/taler-wallet-core/src/operations/pay-peer.ts
+++ b/packages/taler-wallet-core/src/operations/pay-peer.ts
@@ -1222,3 +1222,5 @@ export async function initiatePeerPullPayment(
     ),
   };
 }
+
+
diff --git a/packages/taler-wallet-core/src/operations/transactions.ts 
b/packages/taler-wallet-core/src/operations/transactions.ts
index 0dbbc56c1..d2a7e9d41 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -1361,13 +1361,20 @@ export async function abortTransaction(
 ): Promise<void> {
   const { type, args: rest } = parseId("txn", transactionId);
 
-  if (type === TransactionType.Payment) {
-    const proposalId = rest[0];
-    await abortPay(ws, proposalId, forceImmediateAbort);
-  } else {
-    const unknownTxType: any = type;
-    throw Error(
-      `can't abort a '${unknownTxType}' transaction: not yet implemented`,
-    );
+  switch (type) {
+    case TransactionType.Payment: {
+      const proposalId = rest[0];
+      await abortPay(ws, proposalId, forceImmediateAbort);
+      break;
+    }
+    case TransactionType.PeerPushDebit: {
+      break;
+    }
+    default: {
+      const unknownTxType: any = type;
+      throw Error(
+        `can't abort a '${unknownTxType}' transaction: not yet implemented`,
+      );
+    }
   }
 }
diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts 
b/packages/taler-wallet-core/src/wallet-api-types.ts
index fab7632f2..3895c944d 100644
--- a/packages/taler-wallet-core/src/wallet-api-types.ts
+++ b/packages/taler-wallet-core/src/wallet-api-types.ts
@@ -591,8 +591,9 @@ export type ExportBackupPlainOp = {
 // group: Peer Payments
 
 /**
- * Check if initiating a peer push payment is possible.
- * 
+ * Check if initiating a peer push payment is possible
+ * based on the funds in the wallet.
+ *
  * FIXME: Rename to CheckPeerPushPaymentInitiation
  */
 export type PreparePeerPushPaymentOp = {
@@ -612,6 +613,8 @@ export type InitiatePeerPushPaymentOp = {
 
 /**
  * Check an incoming peer push payment.
+ * 
+ * FIXME: Rename to "PrepareIncomingPeerPushPayment"
  */
 export type CheckPeerPushPaymentOp = {
   op: WalletApiOperation.CheckPeerPushPayment;
@@ -630,6 +633,8 @@ export type AcceptPeerPushPaymentOp = {
 
 /**
  * Initiate an outgoing peer pull payment.
+ * 
+ * FIXME: This does not check anything, so rename to 
CheckPeerPullPaymentInitiation
  */
 export type PreparePeerPullPaymentOp = {
   op: WalletApiOperation.PreparePeerPullPayment;
@@ -648,6 +653,8 @@ export type InitiatePeerPullPaymentOp = {
 
 /**
  * Prepare for an incoming peer pull payment.
+ *
+ * FIXME: Rename to "PreparePeerPullPayment"
  */
 export type CheckPeerPullPaymentOp = {
   op: WalletApiOperation.CheckPeerPullPayment;
@@ -656,7 +663,9 @@ export type CheckPeerPullPaymentOp = {
 };
 
 /**
- * Accept an incoming peer pull payment.
+ * Accept an incoming peer pull payment (i.e. pay the other party).
+ *
+ * FIXME: Rename to ConfirmPeerPullPayment
  */
 export type AcceptPeerPullPaymentOp = {
   op: WalletApiOperation.AcceptPeerPullPayment;

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