gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (d2231425a -> 7d562e7ee)


From: gnunet
Subject: [taler-wallet-core] branch master updated (d2231425a -> 7d562e7ee)
Date: Tue, 28 Nov 2023 11:24:32 +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 d2231425a info -> trace
     new f8499a57a -incomplete comment
     new 7d562e7ee always return WithdrawalAccountInfo instead of using two 
separate types for the same purpose

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-util/src/wallet-types.ts            | 27 +++++++++++++++++-----
 .../taler-wallet-core/src/operations/withdraw.ts   | 12 ++--------
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/packages/taler-util/src/wallet-types.ts 
b/packages/taler-util/src/wallet-types.ts
index 8d44fd1c5..d4d6119fb 100644
--- a/packages/taler-util/src/wallet-types.ts
+++ b/packages/taler-util/src/wallet-types.ts
@@ -1440,7 +1440,7 @@ export interface ManualWithdrawalDetails {
   paytoUris: string[];
 
   /**
-   * Ways to pay the exchange, including
+   * Ways to pay the exchange, including accounts that require currency 
conversion.
    */
   withdrawalAccountList: WithdrawalAccountInfo[];
 
@@ -1463,11 +1463,6 @@ export interface DenomSelectionState {
   }[];
 }
 
-export interface WireAccountDetails {
-  paytoUri: string;
-  creditRestrictions?: AccountRestriction[];
-}
-
 /**
  * Information about what will happen doing a withdrawal.
  *
@@ -2770,6 +2765,26 @@ export interface TestingWaitTransactionRequest {
 }
 
 export interface WithdrawalAccountInfo {
+  /**
+   * Payto URI to credit the exchange.
+   *
+   * Depending on whether the (manual!) withdrawal is accepted or just
+   * being checked, this already includes the subject with the
+   * reserve public key.
+   */
   paytoUri: string;
+
+  /**
+   * Transfer amount. Might be in a different currency than the requested
+   * amount for withdrawal.
+   *
+   * Redundant with the amount in paytoUri, just included to avoid parsing.
+   */
   transferAmount: AmountString;
+
+  /**
+   * Further restrictions for sending money to the
+   * exchange.
+   */
+  creditRestrictions?: AccountRestriction[];
 }
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts 
b/packages/taler-wallet-core/src/operations/withdraw.ts
index 4673e1f0b..9dd0f0a3f 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -43,7 +43,6 @@ import {
   LibtoolVersion,
   Logger,
   NotificationType,
-  PaytoUri,
   TalerError,
   TalerErrorCode,
   TalerErrorDetail,
@@ -56,7 +55,6 @@ import {
   TransactionType,
   URL,
   UnblindedSignature,
-  WireAccountDetails,
   WithdrawUriInfoResponse,
   WithdrawalAccountInfo,
   addPaytoQueryParams,
@@ -68,7 +66,6 @@ import {
   codecForReserveStatus,
   codecForWalletKycUuid,
   codecForWithdrawOperationStatusResponse,
-  createEddsaKeyPair,
   encodeCrock,
   getErrorDetailFromException,
   getRandomBytes,
@@ -1796,13 +1793,7 @@ export async function getExchangeWithdrawalInfo(
   const exchangeWireAccounts: string[] = [];
 
   for (const account of exchangeDetails.wireInfo.accounts) {
-    const details: WireAccountDetails = {
-      paytoUri: account.payto_uri,
-    };
-    if (account.credit_restrictions) {
-      details.creditRestrictions = account.credit_restrictions;
-    }
-    exchangeWireAccounts.push(details.paytoUri);
+    exchangeWireAccounts.push(account.payto_uri);
   }
 
   let hasDenomWithAgeRestriction = false;
@@ -2629,6 +2620,7 @@ async function fetchWithdrawalAccountInfo(
     const acctInfo: WithdrawalAccountInfo = {
       paytoUri,
       transferAmount,
+      creditRestrictions: acct.credit_restrictions,
     };
     withdrawalAccounts.push(acctInfo);
   }

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