diff options
author | Sebastian <sebasjm@gmail.com> | 2021-02-15 17:03:44 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-02-15 17:03:44 -0300 |
commit | c1a58ef343302bd2ded679986f637865adecc961 (patch) | |
tree | 1f2092e50864dcd4096a1c7d09c43196977856db | |
parent | 471fc11663b48580e0a31d9af1e6a7166fe9b9df (diff) |
added missing currency in ser/deser, see #6744
-rw-r--r-- | src/include/taler_exchange_service.h | 5 | ||||
-rw-r--r-- | src/lib/exchange_api_handle.c | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 98af4f9f3..5789e23dd 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -253,6 +253,11 @@ struct TALER_EXCHANGE_Keys char *version; /** + * Supported currency of the exchange. + */ + char *currency; + + /** * How long after a reserve went idle will the exchange close it? * This is an approximate number, not cryptographically signed by * the exchange (advisory-only, may change anytime). diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c index 043760745..f362bc5e5 100644 --- a/src/lib/exchange_api_handle.c +++ b/src/lib/exchange_api_handle.c @@ -690,6 +690,8 @@ decode_keys_json (const json_t *resp_obj, &key_data->list_issue_date), TALER_JSON_spec_relative_time ("reserve_closing_delay", &key_data->reserve_closing_delay), + GNUNET_JSON_spec_string ("currency", + &key_data->currency), GNUNET_JSON_spec_end () }; @@ -1743,11 +1745,13 @@ TALER_EXCHANGE_serialize_data (struct TALER_EXCHANGE_Handle *exchange) return NULL; } } - keys = json_pack ("{s:s, s:o, s:o, s:o, s:o" + keys = json_pack ("{s:s, s:s, s:o, s:o, s:o, s:o" ",s:o, s:o}", /* 1 */ "version", kd->version, + "currency", + kd->currency, "master_public_key", GNUNET_JSON_from_data_auto (&kd->master_pub), "reserve_closing_delay", @@ -1756,7 +1760,7 @@ TALER_EXCHANGE_serialize_data (struct TALER_EXCHANGE_Handle *exchange) GNUNET_JSON_from_time_abs (kd->list_issue_date), "signkeys", signkeys, - /* #6 */ + /* #7 */ "denoms", denoms, "auditors", |