diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 22:49:04 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 22:49:04 +0200 |
commit | 92b86cc5a7277de1a3b3ab55aaf37c83a649930e (patch) | |
tree | eef73525a65c6fe6825559f050b8ea971ca8302a /src/lib/merchant_api_patch_instance.c | |
parent | 4e18bf19dfed52aa448a0b0d8547c0be182ba36a (diff) |
finish implementing #6935
Diffstat (limited to 'src/lib/merchant_api_patch_instance.c')
-rw-r--r-- | src/lib/merchant_api_patch_instance.c | 45 |
1 files changed, 19 insertions, 26 deletions
diff --git a/src/lib/merchant_api_patch_instance.c b/src/lib/merchant_api_patch_instance.c index 74256330..5515e5e1 100644 --- a/src/lib/merchant_api_patch_instance.c +++ b/src/lib/merchant_api_patch_instance.c @@ -189,32 +189,25 @@ TALER_MERCHANT_instance_patch ( return NULL; } } - req_obj = json_pack ("{s:o, s:s, s:O, s:O" - " s:o, s:I: s:o, s:o, s:o}", - "payto_uris", - jpayto_uris, - "name", - name, - "address", - address, - "jurisdiction", - jurisdiction, - /* end of group of 4 */ - "default_max_wire_fee", - TALER_JSON_from_amount (default_max_wire_fee), - "default_wire_fee_amortization", - (json_int_t) default_wire_fee_amortization, - "default_max_deposit_fee", - TALER_JSON_from_amount (default_max_deposit_fee), - "default_wire_transfer_delay", - GNUNET_JSON_from_time_rel (default_wire_transfer_delay), - "default_pay_delay", - GNUNET_JSON_from_time_rel (default_pay_delay)); - if (NULL == req_obj) - { - GNUNET_break (0); - return NULL; - } + req_obj = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_array_steal ("payto_uris", + jpayto_uris), + GNUNET_JSON_pack_string ("name", + name), + GNUNET_JSON_pack_object_incref ("address", + (json_t *) address), + GNUNET_JSON_pack_object_incref ("jurisdiction", + (json_t *) jurisdiction), + TALER_JSON_pack_amount ("default_max_wire_fee", + default_max_wire_fee), + GNUNET_JSON_pack_uint64 ("default_wire_fee_amortization", + default_wire_fee_amortization), + TALER_JSON_pack_amount ("default_max_deposit_fee", + default_max_deposit_fee), + GNUNET_JSON_pack_time_rel ("default_wire_transfer_delay", + default_wire_transfer_delay), + GNUNET_JSON_pack_time_rel ("default_pay_delay", + default_pay_delay)); iph = GNUNET_new (struct TALER_MERCHANT_InstancePatchHandle); iph->ctx = ctx; iph->cb = cb; |