gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: include error details in tran


From: gnunet
Subject: [taler-wallet-core] branch master updated: include error details in transactions list
Date: Tue, 01 Sep 2020 16:03:10 +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 62406304 include error details in transactions list
62406304 is described below

commit 62406304d9a81a08797c09f5151de74d8ca43fe8
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Tue Sep 1 19:33:06 2020 +0530

    include error details in transactions list
---
 .../src/operations/transactions.ts                 | 35 ++--------------------
 1 file changed, 3 insertions(+), 32 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/transactions.ts 
b/packages/taler-wallet-core/src/operations/transactions.ts
index cc569fd2..2515415d 100644
--- a/packages/taler-wallet-core/src/operations/transactions.ts
+++ b/packages/taler-wallet-core/src/operations/transactions.ts
@@ -216,6 +216,7 @@ export async function getTransactions(
             TransactionType.Withdrawal,
             r.initialWithdrawalGroupId,
           ),
+          ...(r.lastError ? { error: r.lastError } : {}),
         });
       });
 
@@ -250,6 +251,7 @@ export async function getTransactions(
           TransactionType.Payment,
           pr.proposalId,
         );
+        const err = pr.lastPayError ?? pr.lastRefundStatusError;
         transactions.push({
           type: TransactionType.Payment,
           amountRaw: Amounts.stringify(pr.contractData.amount),
@@ -261,6 +263,7 @@ export async function getTransactions(
           timestamp: pr.timestampAccept,
           transactionId: paymentTransactionId,
           info: info,
+          ...(err ? { error: err } : {}),
         });
 
         const refundGroupKeys = new Set<string>();
@@ -305,7 +308,6 @@ export async function getTransactions(
           if (!r0) {
             throw Error("invariant violated");
           }
-          let ts: Timestamp;
           transactions.push({
             type: TransactionType.Refund,
             info,
@@ -317,37 +319,6 @@ export async function getTransactions(
             pending: false,
           });
         });
-
-        // for (const rg of pr.refundGroups) {
-        //   const pending = Object.keys(pr.refundsPending).length > 0;
-        //   const stats = getRefundStats(pr, rg.refundGroupId);
-
-        //   transactions.push({
-        //     type: TransactionType.Refund,
-        //     pending,
-        //     info: {
-        //       fulfillmentUrl: pr.contractData.fulfillmentUrl,
-        //       merchant: pr.contractData.merchant,
-        //       orderId: pr.contractData.orderId,
-        //       products: pr.contractData.products,
-        //       summary: pr.contractData.summary,
-        //       summary_i18n: pr.contractData.summaryI18n,
-        //     },
-        //     timestamp: rg.timestampQueried,
-        //     transactionId: makeEventId(
-        //       TransactionType.Refund,
-        //       pr.proposalId,
-        //       `${rg.timestampQueried.t_ms}`,
-        //     ),
-        //     refundedTransactionId: makeEventId(
-        //       TransactionType.Payment,
-        //       pr.proposalId,
-        //     ),
-        //     amountEffective: Amounts.stringify(stats.amountEffective),
-        //     amountInvalid: Amounts.stringify(stats.amountInvalid),
-        //     amountRaw: Amounts.stringify(stats.amountRaw),
-        //   });
-        // }
       });
     },
   );

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