return tipping_allowed from /keys
This commit is contained in:
parent
90ca90b576
commit
89e21002d6
@ -64,6 +64,11 @@ extern int TEH_check_invariants_flag;
|
|||||||
*/
|
*/
|
||||||
extern int TEH_allow_keys_timetravel;
|
extern int TEH_allow_keys_timetravel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Option set to #GNUNET_YES if tipping is enabled.
|
||||||
|
*/
|
||||||
|
extern int TEH_enable_tipping;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main directory with revocation data.
|
* Main directory with revocation data.
|
||||||
*/
|
*/
|
||||||
|
@ -1857,6 +1857,8 @@ create_krd (struct TEH_KeyStateHandle *ksh,
|
|||||||
TEH_currency),
|
TEH_currency),
|
||||||
GNUNET_JSON_pack_string ("asset_type",
|
GNUNET_JSON_pack_string ("asset_type",
|
||||||
asset_type),
|
asset_type),
|
||||||
|
GNUNET_JSON_pack_bool ("tipping_allowed",
|
||||||
|
GNUNET_YES == TEH_enable_tipping),
|
||||||
GNUNET_JSON_pack_data_auto ("master_public_key",
|
GNUNET_JSON_pack_data_auto ("master_public_key",
|
||||||
&TEH_master_public_key),
|
&TEH_master_public_key),
|
||||||
GNUNET_JSON_pack_time_rel ("reserve_closing_delay",
|
GNUNET_JSON_pack_time_rel ("reserve_closing_delay",
|
||||||
|
@ -366,6 +366,10 @@ struct TALER_EXCHANGE_Keys
|
|||||||
*/
|
*/
|
||||||
char *asset_type;
|
char *asset_type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to true if tipping is allowed at this exchange.
|
||||||
|
*/
|
||||||
|
bool tipping_allowed;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -733,6 +733,7 @@ decode_keys_json (const json_t *resp_obj,
|
|||||||
struct TALER_ExchangePublicKeyP pub;
|
struct TALER_ExchangePublicKeyP pub;
|
||||||
const char *currency;
|
const char *currency;
|
||||||
const char *asset_type;
|
const char *asset_type;
|
||||||
|
bool tipping_allowed = true;
|
||||||
json_t *wblwk = NULL;
|
json_t *wblwk = NULL;
|
||||||
struct GNUNET_JSON_Specification mspec[] = {
|
struct GNUNET_JSON_Specification mspec[] = {
|
||||||
GNUNET_JSON_spec_fixed_auto ("denominations_sig",
|
GNUNET_JSON_spec_fixed_auto ("denominations_sig",
|
||||||
@ -749,6 +750,10 @@ decode_keys_json (const json_t *resp_obj,
|
|||||||
¤cy),
|
¤cy),
|
||||||
GNUNET_JSON_spec_string ("asset_type",
|
GNUNET_JSON_spec_string ("asset_type",
|
||||||
&asset_type),
|
&asset_type),
|
||||||
|
GNUNET_JSON_spec_mark_optional (
|
||||||
|
GNUNET_JSON_spec_bool ("tipping_allowed",
|
||||||
|
&tipping_allowed),
|
||||||
|
NULL),
|
||||||
GNUNET_JSON_spec_mark_optional (
|
GNUNET_JSON_spec_mark_optional (
|
||||||
GNUNET_JSON_spec_json ("wallet_balance_limit_without_kyc",
|
GNUNET_JSON_spec_json ("wallet_balance_limit_without_kyc",
|
||||||
&wblwk),
|
&wblwk),
|
||||||
@ -819,6 +824,7 @@ decode_keys_json (const json_t *resp_obj,
|
|||||||
NULL, NULL));
|
NULL, NULL));
|
||||||
key_data->currency = GNUNET_strdup (currency);
|
key_data->currency = GNUNET_strdup (currency);
|
||||||
key_data->asset_type = GNUNET_strdup (asset_type);
|
key_data->asset_type = GNUNET_strdup (asset_type);
|
||||||
|
key_data->tipping_allowed = tipping_allowed;
|
||||||
|
|
||||||
/* parse the global fees */
|
/* parse the global fees */
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user