summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_helper.c')
-rw-r--r--src/backend/taler-merchant-httpd_helper.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/backend/taler-merchant-httpd_helper.c b/src/backend/taler-merchant-httpd_helper.c
index a5de1781..86ff37c3 100644
--- a/src/backend/taler-merchant-httpd_helper.c
+++ b/src/backend/taler-merchant-httpd_helper.c
@@ -88,6 +88,7 @@ TMH_payto_uri_array_valid (const json_t *payto_uris)
return payto_ok;
}
+
bool
TMH_location_object_valid (const json_t *location)
{
@@ -270,8 +271,8 @@ TMH_products_array_valid (const json_t *products)
if ( (NULL != taxes) &&
(! TMH_taxes_array_valid (taxes)) )
{
- GNUNET_break_op (0);
- valid = false;
+ GNUNET_break_op (0);
+ valid = false;
}
if ( (NULL != description_i18n) &&
(! TALER_JSON_check_i18n (description_i18n)) )
@@ -315,13 +316,14 @@ TMH_image_data_url_valid (const char *image_data_url)
return true;
}
+
bool
TMH_template_contract_valid (const json_t *template_contract)
{
const char *summary;
struct TALER_Amount amount = { .value = 0};
uint32_t minimum_age = 0;
- struct GNUNET_TIME_Relative pay_duration= { 0 };
+ struct GNUNET_TIME_Relative pay_duration = { 0 };
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("summary",
@@ -332,14 +334,10 @@ TMH_template_contract_valid (const json_t *template_contract)
TMH_currency,
&amount),
NULL),
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_uint32 ("minimum_age",
- &minimum_age),
- NULL),
- GNUNET_JSON_spec_mark_optional (
- GNUNET_JSON_spec_relative_time ("pay_duration",
- &pay_duration),
- NULL),
+ GNUNET_JSON_spec_uint32 ("minimum_age",
+ &minimum_age),
+ GNUNET_JSON_spec_relative_time ("pay_duration",
+ &pay_duration),
GNUNET_JSON_spec_end ()
};
const char *ename;
@@ -359,6 +357,7 @@ TMH_template_contract_valid (const json_t *template_contract)
return true;
}
+
bool
TMH_taxes_array_valid (const json_t *taxes)
{