aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
m---------contrib/wallet-core0
m---------doc/prebuilt0
-rw-r--r--src/backend/taler-merchant-httpd_private-get-instances-ID.c7
-rw-r--r--src/include/taler_merchant_service.h5
-rw-r--r--src/lib/merchant_api_get_instance.c12
5 files changed, 17 insertions, 7 deletions
diff --git a/contrib/wallet-core b/contrib/wallet-core
-Subproject abc01ba21f670960df8a79047d536f16c263183
+Subproject 7079bce1ad2640e44561f56b46d5f00758df8e5
diff --git a/doc/prebuilt b/doc/prebuilt
-Subproject 4739f1447d0e8a6534c7fbdbc361d5d756d1875
+Subproject 8452f991dd967328207fab52a99beb19e2cb4df
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID.c b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
index d2e3d937..2a2116d9 100644
--- a/src/backend/taler-merchant-httpd_private-get-instances-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-instances-ID.c
@@ -52,9 +52,10 @@ get_instances_ID (struct TMH_MerchantInstance *mi,
GNUNET_JSON_pack_string (
"payto_uri",
wm->payto_uri),
- GNUNET_JSON_pack_string (
- "credit_facade_url",
- wm->credit_facade_url),
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string (
+ "credit_facade_url",
+ wm->credit_facade_url)),
GNUNET_JSON_pack_data_auto ("h_wire",
&wm->h_wire),
GNUNET_JSON_pack_data_auto (
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h
index 39f39a3e..8cf8fbcc 100644
--- a/src/include/taler_merchant_service.h
+++ b/src/include/taler_merchant_service.h
@@ -719,6 +719,11 @@ struct TALER_MERCHANT_Account
const char *payto_uri;
/**
+ * Credit facade URL of the account.
+ */
+ const char *credit_facade_url;
+
+ /**
* Hash of @e payto_uri and @e salt.
*/
struct TALER_MerchantWireHashP h_wire;
diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c
index c8fbfc00..6807866f 100644
--- a/src/lib/merchant_api_get_instance.c
+++ b/src/lib/merchant_api_get_instance.c
@@ -137,19 +137,24 @@ handle_get_instance_finished (void *cls,
{
unsigned int accounts_length = json_array_size (accounts);
struct TALER_MERCHANT_Account aa[accounts_length];
- const char *payto_uris[accounts_length];
size_t index;
json_t *value;
int ret = GNUNET_OK;
- memset (payto_uris, 0, sizeof (payto_uris));
+ memset (aa,
+ 0,
+ sizeof (aa));
json_array_foreach (accounts, index, value)
{
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("salt",
&aa[index].salt),
+ GNUNET_JSON_spec_mark_optional (
+ GNUNET_JSON_spec_string ("credit_facade_url",
+ &aa[index].credit_facade_url),
+ NULL),
GNUNET_JSON_spec_string ("payto_uri",
- &payto_uris[index]),
+ &aa[index].payto_uri),
GNUNET_JSON_spec_fixed_auto ("h_wire",
&aa[index].h_wire),
GNUNET_JSON_spec_bool ("active",
@@ -168,7 +173,6 @@ handle_get_instance_finished (void *cls,
igr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
- aa[index].payto_uri = payto_uris[index];
}
if (GNUNET_OK == ret)