summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.c
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-12-09 13:57:00 +0100
committerÖzgür Kesim <oec-taler@kesim.org>2023-12-09 13:57:00 +0100
commit9454b655454317cc129eecc61009ffc7c2a9925b (patch)
treeec3eddc3e1ed597ce1d174c4bb29a49f1b36029e /src/exchange/taler-exchange-httpd_responses.c
parent5c21cd8d9d9512365334eaf8ea7a5e3dc0f2cbb1 (diff)
downloadexchange-9454b655454317cc129eecc61009ffc7c2a9925b.tar.gz
exchange-9454b655454317cc129eecc61009ffc7c2a9925b.tar.bz2
exchange-9454b655454317cc129eecc61009ffc7c2a9925b.zip
[wip, #7267] added correct response for age commitment conflict during deposit
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 322da3877..c1aa9db6f 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -178,6 +178,28 @@ TEH_RESPONSE_reply_coin_insufficient_funds (
MHD_RESULT
+TEH_RESPONSE_reply_coin_age_commitment_conflict (
+ struct MHD_Connection *connection,
+ enum TALER_ErrorCode ec,
+ const struct TALER_DenominationHashP *h_denom_pub,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub,
+ const struct TALER_AgeCommitmentHash *h_age_commitment_hash)
+{
+ return TALER_MHD_REPLY_JSON_PACK (
+ connection,
+ TALER_ErrorCode_get_http_status_safe (ec),
+ TALER_JSON_pack_ec (ec),
+ GNUNET_JSON_pack_data_auto ("coin_pub",
+ coin_pub),
+ GNUNET_JSON_pack_data_auto ("h_denom_pub",
+ h_denom_pub),
+ GNUNET_JSON_pack_data_auto ("h_age_commitment_hash",
+ h_age_commitment_hash)
+ );
+}
+
+
+MHD_RESULT
TEH_RESPONSE_reply_reserve_insufficient_balance (
struct MHD_Connection *connection,
enum TALER_ErrorCode ec,