diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-03-08 22:53:35 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-03-08 22:53:35 +0100 |
commit | 19c368fc47192f44d1cf9e651d9360c4546b2807 (patch) | |
tree | c750e3a06119aa27b00c54890e5db09b1e1d0f4b /src/lib/exchange_api_common.c | |
parent | 1beb3e72899aea2ca0b8cf3855be94575d7977c0 (diff) | |
download | exchange-19c368fc47192f44d1cf9e651d9360c4546b2807.tar.xz |
implement protocol v19 in taler-exchange-httpd (for #8000); note that taler-exchange-offline support is still missing
Diffstat (limited to 'src/lib/exchange_api_common.c')
-rw-r--r-- | src/lib/exchange_api_common.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c index 417fdf357..bd731ad37 100644 --- a/src/lib/exchange_api_common.c +++ b/src/lib/exchange_api_common.c @@ -515,7 +515,9 @@ TALER_EXCHANGE_parse_accounts ( { struct TALER_EXCHANGE_WireAccount *wa = &was[i]; const char *payto_uri; - const char *conversion_url; + const char *conversion_url = NULL; + const char *bank_label = NULL; + int64_t priority = 0; const json_t *credit_restrictions; const json_t *debit_restrictions; struct GNUNET_JSON_Specification spec_account[] = { @@ -525,6 +527,14 @@ TALER_EXCHANGE_parse_accounts ( TALER_JSON_spec_web_url ("conversion_url", &conversion_url), NULL), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_int64 ("priority", + &priority), + NULL), + GNUNET_JSON_spec_mark_optional ( + GNUNET_JSON_spec_string ("bank_label", + &bank_label), + NULL), GNUNET_JSON_spec_array_const ("credit_restrictions", &credit_restrictions), GNUNET_JSON_spec_array_const ("debit_restrictions", @@ -574,8 +584,11 @@ TALER_EXCHANGE_parse_accounts ( return GNUNET_SYSERR; } wa->payto_uri = GNUNET_strdup (payto_uri); + wa->priority = priority; if (NULL != conversion_url) wa->conversion_url = GNUNET_strdup (conversion_url); + if (NULL != bank_label) + wa->bank_label = GNUNET_strdup (bank_label); } /* end 'for all accounts */ return GNUNET_OK; } @@ -622,6 +635,7 @@ TALER_EXCHANGE_free_accounts ( GNUNET_free (wa->payto_uri); GNUNET_free (wa->conversion_url); + GNUNET_free (wa->bank_label); free_restrictions (wa->credit_restrictions_length, wa->credit_restrictions); GNUNET_array_grow (wa->credit_restrictions, |