diff --git a/src/exchange/exchange.conf b/src/exchange/exchange.conf index d1558a49c..5d9cb8f29 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 25af862b6..dfdf3546d 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 24e087721..9fcfcd6c1 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 bcc7b9917..388a383f2 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 777053792..eaf9fce4d 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 a21b4c6a5..528662c60 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)),