summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refund.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 15:36:38 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 15:36:38 +0200
commitd45774ccecaed85f45c2eebe641e2d2f8c8673af (patch)
tree7c15d023eed2b7f47c0496ddc982d881cb398d6d /src/exchange/taler-exchange-httpd_refund.c
parentf1f0bf637bcfd7d10d3acdb328d016ccf2cc4ffb (diff)
downloadexchange-d45774ccecaed85f45c2eebe641e2d2f8c8673af.tar.gz
exchange-d45774ccecaed85f45c2eebe641e2d2f8c8673af.tar.bz2
exchange-d45774ccecaed85f45c2eebe641e2d2f8c8673af.zip
introduce TALER_JSON_pack_ec
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refund.c')
-rw-r--r--src/exchange/taler-exchange-httpd_refund.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/exchange/taler-exchange-httpd_refund.c b/src/exchange/taler-exchange-httpd_refund.c
index c2b2d800..2ea19b7e 100644
--- a/src/exchange/taler-exchange-httpd_refund.c
+++ b/src/exchange/taler-exchange-httpd_refund.c
@@ -233,11 +233,7 @@ refund_transaction (void *cls,
MHD_HTTP_PRECONDITION_FAILED,
TALER_JSON_pack_amount ("detail",
&ref->refund_amount),
- GNUNET_JSON_pack_string ("hint",
- TALER_ErrorCode_get_hint (
- TALER_EC_EXCHANGE_REFUND_INCONSISTENT_AMOUNT)),
- GNUNET_JSON_pack_uint64 ("code",
- TALER_EC_EXCHANGE_REFUND_INCONSISTENT_AMOUNT),
+ TALER_JSON_pack_ec (TALER_EC_EXCHANGE_REFUND_INCONSISTENT_AMOUNT),
GNUNET_JSON_pack_array_steal ("history",
TEH_RESPONSE_compile_transaction_history (
&refund->coin.coin_pub,
@@ -332,11 +328,8 @@ refund_transaction (void *cls,
MHD_HTTP_CONFLICT,
GNUNET_JSON_pack_string ("detail",
"total amount refunded exceeds total amount deposited for this coin"),
- GNUNET_JSON_pack_string ("hint",
- TALER_ErrorCode_get_hint (
- TALER_EC_EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT)),
- GNUNET_JSON_pack_uint64 ("code",
- TALER_EC_EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT),
+ TALER_JSON_pack_ec (
+ TALER_EC_EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT),
GNUNET_JSON_pack_array_steal ("history",
TEH_RESPONSE_compile_transaction_history (
&refund->coin.coin_pub,