aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_recoup.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-10 20:15:17 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-10 20:15:17 +0100
commitd58d89dcab91823dff208d230e1b1b3a742810bd (patch)
treec206aa35a61b5e782dd44220d94fe52f8d535dc6 /src/lib/exchange_api_recoup.c
parented5ef2b5f7d1fc5e87d47a2023733604f1f04278 (diff)
downloadexchange-d58d89dcab91823dff208d230e1b1b3a742810bd.tar.xz
-get recoup/refresh to pass
Diffstat (limited to 'src/lib/exchange_api_recoup.c')
-rw-r--r--src/lib/exchange_api_recoup.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/exchange_api_recoup.c b/src/lib/exchange_api_recoup.c
index c507d1e6a..b6a99ba52 100644
--- a/src/lib/exchange_api_recoup.c
+++ b/src/lib/exchange_api_recoup.c
@@ -329,6 +329,24 @@ TALER_EXCHANGE_recoup (struct TALER_EXCHANGE_Handle *exchange,
&coin_sig),
GNUNET_JSON_pack_data_auto ("coin_blind_key_secret",
&bks));
+ if (TALER_DENOMINATION_CS == denom_sig->cipher)
+ {
+ struct TALER_CsNonce nonce;
+
+ // FIXME: add this to the spec!
+ /* NOTE: this is not elegant, and as per the note in TALER_coin_ev_hash()
+ it is not strictly clear that the nonce is needed. Best case would be
+ to find a way to include it more 'naturally' somehow, for example with
+ the variant union version of bks! */
+ TALER_cs_withdraw_nonce_derive (ps,
+ &nonce);
+ GNUNET_assert (
+ 0 ==
+ json_object_set_new (recoup_obj,
+ "cs-nonce",
+ GNUNET_JSON_from_data_auto (
+ &nonce)));
+ }
{
char pub_str[sizeof (struct TALER_CoinSpendPublicKeyP) * 2];