diff options
| author | Christian Grothoff <christian@grothoff.org> | 2022-12-11 13:48:44 +0100 | 
|---|---|---|
| committer | Christian Grothoff <christian@grothoff.org> | 2022-12-11 13:48:44 +0100 | 
| commit | 58983d7455dd0529be0b7e6ba599845956c75ea4 (patch) | |
| tree | ef8816e298d4c4d144dfe11044457763ab4be7af /src/lib | |
| parent | e682f4213e4798593fcbc39b778d231be35bf6f9 (diff) | |
add asset_type to /keys response
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/exchange_api_handle.c | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 14ba7317..3a23508c 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -732,6 +732,7 @@ decode_keys_json (const json_t *resp_obj,    struct GNUNET_HashCode hash_xor = {0};    struct TALER_ExchangePublicKeyP pub;    const char *currency; +  const char *asset_type;    json_t *wblwk = NULL;    struct GNUNET_JSON_Specification mspec[] = {      GNUNET_JSON_spec_fixed_auto ("denominations_sig", @@ -746,6 +747,8 @@ decode_keys_json (const json_t *resp_obj,                                      &key_data->reserve_closing_delay),      GNUNET_JSON_spec_string ("currency",                               ¤cy), +    GNUNET_JSON_spec_string ("asset_type", +                             &asset_type),      GNUNET_JSON_spec_mark_optional (        GNUNET_JSON_spec_json ("wallet_balance_limit_without_kyc",                               &wblwk), @@ -815,6 +818,7 @@ decode_keys_json (const json_t *resp_obj,                               (check_sig) ? mspec : &mspec[2],                               NULL, NULL));    key_data->currency = GNUNET_strdup (currency); +  key_data->asset_type = GNUNET_strdup (asset_type);    /* parse the global fees */    { @@ -1233,6 +1237,7 @@ free_key_data (struct TALER_EXCHANGE_Keys *key_data)    GNUNET_free (key_data->wallet_balance_limit_without_kyc);    GNUNET_free (key_data->version);    GNUNET_free (key_data->currency); +  GNUNET_free (key_data->asset_type);    GNUNET_free (key_data->global_fees);  } @@ -1917,6 +1922,8 @@ TALER_EXCHANGE_serialize_data (struct TALER_EXCHANGE_Handle *exchange)                               kd->version),      GNUNET_JSON_pack_string ("currency",                               kd->currency), +    GNUNET_JSON_pack_string ("asset_type", +                             kd->asset_type),      GNUNET_JSON_pack_data_auto ("master_public_key",                                  &kd->master_pub),      GNUNET_JSON_pack_time_rel ("reserve_closing_delay", | 
