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: expose bankC


From: Admin
Subject: [taler-typescript-core] branch master updated: wallet-core: expose bankComplianceLanguage on exchange entries
Date: Fri, 13 Jun 2025 00:40:04 +0200

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 6cb522bba wallet-core: expose bankComplianceLanguage on exchange 
entries
6cb522bba is described below

commit 6cb522bba247021cc20133da8705ddd0a597ed62
Author: Florian Dold <florian@dold.me>
AuthorDate: Fri Jun 13 00:40:00 2025 +0200

    wallet-core: expose bankComplianceLanguage on exchange entries
---
 packages/taler-util/src/types-taler-exchange.ts | 12 ++++++++++++
 packages/taler-util/src/types-taler-wallet.ts   | 14 +++++++++++---
 packages/taler-wallet-core/src/db.ts            |  7 +++++++
 packages/taler-wallet-core/src/exchanges.ts     |  5 +++++
 4 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/packages/taler-util/src/types-taler-exchange.ts 
b/packages/taler-util/src/types-taler-exchange.ts
index ef24fac63..f5c850911 100644
--- a/packages/taler-util/src/types-taler-exchange.ts
+++ b/packages/taler-util/src/types-taler-exchange.ts
@@ -413,6 +413,17 @@ export interface ExchangeKeysResponse {
    */
   currency: string;
 
+  // Instructs wallets to use certain bank-specific
+  // language (for buttons) and/or other UI/UX customization
+  // for compliance with the rules of that bank.
+  // The specific customizations to apply are done on a per-wallet
+  // basis as requested by the specific bank. They only
+  // apply when it is clear that the wallet is using digital
+  // cash from that bank.  This is an advisory option, not
+  // all wallets must support all compliance languages.
+  // @since protocol **v24**.
+  bank_compliance_language?: string;
+
   /**
    * Type of the asset. "fiat", "crypto", "regional"
    * or "stock".  Wallets should adjust their UI/UX
@@ -2592,6 +2603,7 @@ export const codecForExchangeKeysResponse = (): 
Codec<ExchangeKeysResponse> =>
     .property("kyc_enabled", codecOptional(codecForBoolean()))
     .property("shopping_url", codecOptional(codecForString()))
     .property("tiny_amount", codecOptional(codecForAmountString()))
+    .property("bank_compliance_language", codecOptional(codecForString()))
     .deprecatedProperty("rewards_allowed")
     .build("TalerExchangeApi.ExchangeKeysResponse");
 
diff --git a/packages/taler-util/src/types-taler-wallet.ts 
b/packages/taler-util/src/types-taler-wallet.ts
index 184b23627..33f265aa4 100644
--- a/packages/taler-util/src/types-taler-wallet.ts
+++ b/packages/taler-util/src/types-taler-wallet.ts
@@ -1602,6 +1602,7 @@ export interface ExchangeListItem {
   walletKycReservePub?: string;
   walletKycAccessToken?: string;
   walletKycUrl?: string;
+
   /** Threshold that we've requested to satisfy. */
   walletKycRequestedThreshold?: string;
 
@@ -1611,13 +1612,19 @@ export interface ExchangeListItem {
    */
   peerPaymentsDisabled: boolean;
 
-  /**
-   * Set to true if this exchange doesn't charge any fees.
-   */
+  /** Set to true if this exchange doesn't charge any fees. */
   noFees: boolean;
 
+  /** Most general scope that the exchange is a part of. */
   scopeInfo: ScopeInfo;
 
+  /**
+   * Instructs wallets to use certain bank-specific
+   * language (for buttons) and/or other UI/UX customization
+   * for compliance with the rules of that bank.
+   */
+  bankComplianceLanguage: string | undefined;
+
   lastUpdateTimestamp: TalerPreciseTimestamp | undefined;
 
   /**
@@ -1699,6 +1706,7 @@ export const codecForExchangeListItem = (): 
Codec<ExchangeListItem> =>
     .property("lastUpdateTimestamp", codecOptional(codecForPreciseTimestamp))
     .property("noFees", codecForBoolean())
     .property("peerPaymentsDisabled", codecForBoolean())
+    .property("bankComplianceLanguage", codecOptional(codecForString()))
     .build("ExchangeListItem");
 
 export const codecForExchangesListResponse = (): Codec<ExchangesListResponse> 
=>
diff --git a/packages/taler-wallet-core/src/db.ts 
b/packages/taler-wallet-core/src/db.ts
index 0322cbeb0..ddf41deac 100644
--- a/packages/taler-wallet-core/src/db.ts
+++ b/packages/taler-wallet-core/src/db.ts
@@ -641,6 +641,13 @@ export interface ExchangeDetailsRecord {
   hardLimits?: AccountLimit[];
 
   zeroLimits?: ZeroLimitedOperation[];
+
+  /**
+   * Instructs wallets to use certain bank-specific
+   * language (for buttons) and/or other UI/UX customization
+   * for compliance with the rules of that bank.
+   */
+  bankComplianceLanguage: string | undefined;
 }
 
 export interface ExchangeDetailsPointer {
diff --git a/packages/taler-wallet-core/src/exchanges.ts 
b/packages/taler-wallet-core/src/exchanges.ts
index ebcef58b3..27d05ec1b 100644
--- a/packages/taler-wallet-core/src/exchanges.ts
+++ b/packages/taler-wallet-core/src/exchanges.ts
@@ -512,6 +512,7 @@ async function makeExchangeListItem(
       ? AgeRestriction.getAgeGroupsFromMask(exchangeDetails.ageMask)
       : [],
     paytoUris: exchangeDetails?.wireInfo.accounts.map((x) => x.payto_uri) ?? 
[],
+    bankComplianceLanguage: exchangeDetails?.bankComplianceLanguage,
     lastUpdateTimestamp: timestampOptionalPreciseFromDb(r.lastUpdate),
     lastUpdateErrorInfo,
     scopeInfo: scopeInfo ?? {
@@ -904,6 +905,7 @@ export interface ExchangeKeysDownloadResult {
   walletBalanceLimits: AmountString[] | undefined;
   hardLimits: AccountLimit[] | undefined;
   zeroLimits: ZeroLimitedOperation[] | undefined;
+  bankComplianceLanguage: string | undefined;
 }
 
 /**
@@ -1070,6 +1072,8 @@ async function downloadExchangeKeysInfo(
       exchangeKeysResponseUnchecked.wallet_balance_limit_without_kyc,
     hardLimits: exchangeKeysResponseUnchecked.hard_limits,
     zeroLimits: exchangeKeysResponseUnchecked.zero_limits,
+    bankComplianceLanguage:
+      exchangeKeysResponseUnchecked.bank_compliance_language,
   };
   return {
     type: "ok",
@@ -1847,6 +1851,7 @@ export async function updateExchangeFromUrlHandler(
         walletBalanceLimits: keysInfo.walletBalanceLimits,
         hardLimits: keysInfo.hardLimits,
         zeroLimits: keysInfo.zeroLimits,
+        bankComplianceLanguage: keysInfo.bankComplianceLanguage,
       };
       r.noFees = noFees;
       r.peerPaymentsDisabled = peerPaymentsDisabled;

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