gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] 02/03: wallet-core: spec/clarify explicit refresh tr


From: gnunet
Subject: [taler-wallet-core] 02/03: wallet-core: spec/clarify explicit refresh transaction
Date: Sat, 08 Oct 2022 23:45:55 +0200

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

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

commit 3897bd4f018bf23ab485325d48a259958653ff52
Author: Florian Dold <florian@dold.me>
AuthorDate: Sat Oct 8 23:21:34 2022 +0200

    wallet-core: spec/clarify explicit refresh transaction
---
 packages/taler-util/src/transactionsTypes.ts | 30 +++++++++++++++++++++-------
 packages/taler-wallet-core/src/db.ts         |  2 --
 2 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/packages/taler-util/src/transactionsTypes.ts 
b/packages/taler-util/src/transactionsTypes.ts
index 3dc4a93d7..5fd01448c 100644
--- a/packages/taler-util/src/transactionsTypes.ts
+++ b/packages/taler-util/src/transactionsTypes.ts
@@ -43,7 +43,7 @@ import {
   codecForList,
   codecForAny,
 } from "./codec.js";
-import { TalerErrorDetail } from "./walletTypes.js";
+import { RefreshReason, TalerErrorDetail } from "./walletTypes.js";
 
 export interface TransactionsRequest {
   /**
@@ -468,19 +468,35 @@ export interface TransactionTip extends TransactionCommon 
{
   merchantBaseUrl: string;
 }
 
-// A transaction shown for refreshes that are not associated to other 
transactions
-// such as a refresh necessary before coin expiration.
-// It should only be returned by the API if the effective amount is different 
from zero.
+/**
+ * A transaction shown for refreshes.
+ * Only shown for (1) refreshes not associated with other transactions
+ * and (2) refreshes in an error state.
+ */
 export interface TransactionRefresh extends TransactionCommon {
   type: TransactionType.Refresh;
 
-  // Exchange that the coins are refreshed with
+  /**
+   * Exchange that the coins are refreshed with
+   */
   exchangeBaseUrl: string;
 
-  // Raw amount that is refreshed
+  refreshReason: RefreshReason;
+
+  /**
+   * Transaction ID that caused this refresh.
+   */
+  originatingTransactionId?: string;
+
+  /**
+   * Always zero for refreshes
+   */
   amountRaw: AmountString;
 
-  // Amount that will be paid as fees for the refresh
+  /**
+   * Fees, i.e. the effective, negative effect of the refresh
+   * on the balance.
+   */
   amountEffective: AmountString;
 }
 
diff --git a/packages/taler-wallet-core/src/db.ts 
b/packages/taler-wallet-core/src/db.ts
index 5d344319f..b13428183 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -1382,8 +1382,6 @@ export interface WithdrawalGroupRecord {
 
   /**
    * Current status of the reserve.
-   *
-   * FIXME: Wrong name!
    */
   status: WithdrawalGroupStatus;
 

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