aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-06-02 21:55:21 +0200
committerChristian Grothoff <christian@grothoff.org>2022-06-02 21:55:21 +0200
commit04c32eafb9194727876469c92b7cbedc008c51ec (patch)
treeae879e12757e0939c3bed52fad2c9b1ac33e769f /src/exchange/taler-exchange-httpd_responses.c
parent5dd03fe359f541f7e1e4849ed4bd38259200f4df (diff)
-work on P2P payment details
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c56
1 files changed, 54 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 40e702bd..450a9bab 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -361,7 +361,7 @@ TEH_RESPONSE_compile_transaction_history (
hash and the denomination key's RSA signature over coin_pub, but as
the wallet should really already have this information (and cannot
check or do anything with it anyway if it doesn't), it seems
- strictly unnecessary. *///
+ strictly unnecessary. */
if (0 !=
json_array_append_new (
history,
@@ -420,6 +420,56 @@ TEH_RESPONSE_compile_transaction_history (
}
break;
}
+
+#if FIXME_PURSE_REFUND
+ case TALER_EXCHANGEDB_TT_PURSE_REFUND:
+ {
+ struct TALER_EXCHANGEDB_PurseRefundListEntry *pr
+ = pos->details.purse_refund;
+ struct TALER_ExchangePublicKeyP epub;
+ struct TALER_ExchangeSignatureP esig;
+
+ if (TALER_EC_NONE !=
+ TALER_exchange_online_purse_refund_sign (
+ &TEH_keys_exchange_sign_,
+ &pr->amount,
+ &pr->refund_fee,
+ &pr->purse_share_fee,
+ &pr->purse_pub,
+ coin_pub,
+ &epub,
+ &esig))
+ {
+ GNUNET_break (0);
+ json_decref (history);
+ return NULL;
+ }
+ if (0 !=
+ json_array_append_new (
+ history,
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("type",
+ "PURSE-REFUND"),
+ TALER_JSON_pack_amount ("amount",
+ &pd->amount),
+ TALER_JSON_pack_amount ("refund_fee",
+ &pd->refund_fee),
+ TALER_JSON_pack_amount ("purse_share_fee",
+ &pd->purse_share_fee),
+ GNUNET_JSON_pack_data_auto ("purse_pub",
+ &pd->purse_pub),
+ GNUNET_JSON_pack_data_auto ("exchange_sig",
+ &esig),
+ GNUNET_JSON_pack_data_auto ("exchange_pub",
+ &epub))))
+ {
+ GNUNET_break (0);
+ json_decref (history);
+ return NULL;
+ }
+ break;
+ }
+#endif
}
}
return history;
@@ -797,7 +847,9 @@ TEH_RESPONSE_compile_reserve_history (
TALER_JSON_pack_amount ("amount",
&amount),
TALER_JSON_pack_amount ("purse_fee",
- &merge->purse_fee))))
+ &merge->purse_fee),
+ GNUNET_JSON_pack_bool ("merged",
+ merge->merged))))
{
GNUNET_break (0);
json_decref (json_history);