exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 243d39920cd2006400a2a3a0ca275806218d1b30
parent 33a28efef74d1db0c08a8e9e3facf3656b4b29e1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 31 Jul 2021 23:07:03 +0200

-allow NULL in amounts

Diffstat:
Msrc/json/json_pack.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/json/json_pack.c b/src/json/json_pack.c @@ -113,7 +113,9 @@ TALER_JSON_pack_amount (const char *name, { struct GNUNET_JSON_PackSpec ps = { .field_name = name, - .object = TALER_JSON_from_amount (amount) + .object = (NULL != amount) + ? TALER_JSON_from_amount (amount) + : NULL }; return ps; @@ -126,7 +128,9 @@ TALER_JSON_pack_amount_nbo (const char *name, { struct GNUNET_JSON_PackSpec ps = { .field_name = name, - .object = TALER_JSON_from_amount_nbo (amount) + .object = (NULL != amount) + ? TALER_JSON_from_amount_nbo (amount) + : NULL }; return ps;