gnunet-svn
[Top][All Lists]
Advanced

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

[taler-typescript-core] branch master updated: wallet-core: define cause


From: Admin
Subject: [taler-typescript-core] branch master updated: wallet-core: define cause hints for insufficient balance
Date: Mon, 17 Feb 2025 22:05:31 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 8876292c3 wallet-core: define cause hints for insufficient balance
8876292c3 is described below

commit 8876292c3fcf2b5493b5398ea0f10cd73b386ff2
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Feb 17 22:04:38 2025 +0100

    wallet-core: define cause hints for insufficient balance
---
 packages/taler-util/src/types-taler-wallet.ts | 42 +++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/packages/taler-util/src/types-taler-wallet.ts 
b/packages/taler-util/src/types-taler-wallet.ts
index 44f7d3a4c..678604b1b 100644
--- a/packages/taler-util/src/types-taler-wallet.ts
+++ b/packages/taler-util/src/types-taler-wallet.ts
@@ -748,6 +748,39 @@ export const codecForPreparePayResultPaymentPossible =
 
 export interface BalanceDetails {}
 
+export enum InsufficientBalanceHint {
+  /**
+   *  Merchant doesn't accept money from exchange(s) that the wallet supports.
+   */
+  MerchantAcceptInsufficient = "merchant-accept-insufficient",
+
+  /**
+   * Merchant accepts funds from a matching exchange, but the funds can't be
+   * deposited with the wire method.
+   */
+  MerchantDepositInsufficient = "merchant-deposit-insufficient",
+
+  /**
+   * While in principle the balance is sufficient,
+   * the age restriction on coins causes the spendable
+   * balance to be insufficient.
+   */
+  MerchantAgeRestricted = "merchant-age-restricted",
+
+  /**
+   * Wallet has enough available funds,
+   * but the material funds are insufficient. Usually because there is a
+   * pending refresh operation.
+   */
+  WalletMateriallyInsufficient = "wallet-materially-insufficient",
+
+  /**
+   * Exchange is missing the global fee configuration, thus fees are unknown
+   * and funds from this exchange can't be used for p2p payments.
+   */
+  ExchangeMissingGlobalFees = "exchange-missing-global-fees",
+}
+
 /**
  * Detailed reason for why the wallet's balance is insufficient.
  */
@@ -799,11 +832,20 @@ export interface PaymentInsufficientBalanceDetails {
       balanceReceiverAcceptable: AmountString;
       balanceReceiverDepositable: AmountString;
       maxEffectiveSpendAmount: AmountString;
+
       /**
        * Exchange doesn't have global fees configured for the relevant year,
        * p2p payments aren't possible.
+       *
+       * @deprecated use causeHint instead
        */
       missingGlobalFees: boolean;
+
+      /**
+       * Hint that UIs should show to explain the insufficient
+       * balance.
+       */
+      causeHint?: string | undefined;
     };
   };
 }

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