gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 02/02: tip -> reward


From: gnunet
Subject: [taler-exchange] 02/02: tip -> reward
Date: Mon, 10 Jul 2023 10:34:38 +0200

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

grothoff pushed a commit to branch master
in repository exchange.

commit f4abc1c369ad3becf3d995106c6e1e9ee5f89257
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Jul 10 10:34:27 2023 +0200

    tip -> reward
---
 src/exchange/exchange.conf               |  4 ++--
 src/exchange/taler-exchange-httpd.c      | 12 ++++++------
 src/exchange/taler-exchange-httpd.h      |  4 ++--
 src/exchange/taler-exchange-httpd_keys.c |  5 ++++-
 src/include/taler_exchange_service.h     |  4 ++--
 src/lib/exchange_api_handle.c            |  8 ++++----
 6 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf
index d1558a49..5d9cb8f2 100644
--- a/src/exchange/exchange.conf
+++ b/src/exchange/exchange.conf
@@ -20,8 +20,8 @@ KYC_AML_TRIGGER = true
 # in the database. Should be a high-entropy nonce.
 ATTRIBUTE_ENCRYPTION_KEY = SET_ME_PLEASE
 
-# Set to NO to disable tipping.
-ENABLE_TIPPING = YES
+# Set to NO to disable rewards.
+ENABLE_REWARDS = YES
 
 # How long do we allow /keys to be cached at most? The actual
 # limit is the minimum of this value and the first expected
diff --git a/src/exchange/taler-exchange-httpd.c 
b/src/exchange/taler-exchange-httpd.c
index 25af862b..dfdf3546 100644
--- a/src/exchange/taler-exchange-httpd.c
+++ b/src/exchange/taler-exchange-httpd.c
@@ -161,9 +161,9 @@ char *TEH_currency;
 char *TEH_kyc_aml_trigger;
 
 /**
- * Option set to #GNUNET_YES if tipping is enabled.
+ * Option set to #GNUNET_YES if rewards are enabled.
  */
-int TEH_enable_tipping;
+int TEH_enable_rewards;
 
 /**
  * What is the largest amount we allow a peer to
@@ -1943,15 +1943,15 @@ exchange_serve_process_config (void)
                 "Amount in section `exchange' under `AML_THRESHOLD' uses the 
wrong currency!\n");
     return GNUNET_SYSERR;
   }
-  TEH_enable_tipping
+  TEH_enable_rewards
     = GNUNET_CONFIGURATION_get_value_yesno (
         TEH_cfg,
         "exchange",
-        "ENABLE_TIPPING");
-  if (GNUNET_SYSERR == TEH_enable_tipping)
+        "ENABLE_REWARDS");
+  if (GNUNET_SYSERR == TEH_enable_rewards)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Need YES or NO in section `exchange' under 
`ENABLE_TIPPING'\n");
+                "Need YES or NO in section `exchange' under 
`ENABLE_REWARDS'\n");
     return GNUNET_SYSERR;
   }
   if (GNUNET_OK !=
diff --git a/src/exchange/taler-exchange-httpd.h 
b/src/exchange/taler-exchange-httpd.h
index 24e08772..9fcfcd6c 100644
--- a/src/exchange/taler-exchange-httpd.h
+++ b/src/exchange/taler-exchange-httpd.h
@@ -65,9 +65,9 @@ extern int TEH_check_invariants_flag;
 extern int TEH_allow_keys_timetravel;
 
 /**
- * Option set to #GNUNET_YES if tipping is enabled.
+ * Option set to #GNUNET_YES if rewards are allowed.
  */
-extern int TEH_enable_tipping;
+extern int TEH_enable_rewards;
 
 /**
  * Main directory with revocation data.
diff --git a/src/exchange/taler-exchange-httpd_keys.c 
b/src/exchange/taler-exchange-httpd_keys.c
index bcc7b991..388a383f 100644
--- a/src/exchange/taler-exchange-httpd_keys.c
+++ b/src/exchange/taler-exchange-httpd_keys.c
@@ -1859,8 +1859,11 @@ create_krd (struct TEH_KeyStateHandle *ksh,
                              TEH_currency),
     GNUNET_JSON_pack_string ("asset_type",
                              asset_type),
+    // FIXME: legacy, remove soon!
     GNUNET_JSON_pack_bool ("tipping_allowed",
-                           GNUNET_YES == TEH_enable_tipping),
+                           GNUNET_YES == TEH_enable_rewards),
+    GNUNET_JSON_pack_bool ("rewards_allowed",
+                           GNUNET_YES == TEH_enable_rewards),
     GNUNET_JSON_pack_data_auto ("master_public_key",
                                 &TEH_master_public_key),
     GNUNET_JSON_pack_time_rel ("reserve_closing_delay",
diff --git a/src/include/taler_exchange_service.h 
b/src/include/taler_exchange_service.h
index 77705379..eaf9fce4 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -374,9 +374,9 @@ struct TALER_EXCHANGE_Keys
   unsigned int rc;
 
   /**
-   * Set to true if tipping is allowed at this exchange.
+   * Set to true if rewards are allowed at this exchange.
    */
-  bool tipping_allowed;
+  bool rewards_allowed;
 };
 
 
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index a21b4c6a..528662c6 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -639,8 +639,8 @@ decode_keys_json (const json_t *resp_obj,
         &auditors_array),
       GNUNET_JSON_spec_mark_optional (
         GNUNET_JSON_spec_bool (
-          "tipping_allowed",
-          &key_data->tipping_allowed),
+          "rewards_allowed",
+          &key_data->rewards_allowed),
         NULL),
       GNUNET_JSON_spec_mark_optional (
         GNUNET_JSON_spec_object_const ("extensions",
@@ -1983,8 +1983,8 @@ TALER_EXCHANGE_keys_to_json (const struct 
TALER_EXCHANGE_Keys *kd)
                                     recoup)),
     GNUNET_JSON_pack_array_steal ("auditors",
                                   auditors),
-    GNUNET_JSON_pack_bool ("tipping_allowed",
-                           kd->tipping_allowed),
+    GNUNET_JSON_pack_bool ("rewards_allowed",
+                           kd->rewards_allowed),
     GNUNET_JSON_pack_allow_null (
       GNUNET_JSON_pack_object_incref ("extensions",
                                       kd->extensions)),

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