-address FIXMEs

This commit is contained in:
Christian Grothoff 2022-05-08 12:50:25 +02:00
parent d3a6388199
commit 02eb80e0b2
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 16 additions and 9 deletions

@ -1 +1 @@
Subproject commit 74cf5789db8d857780ac49b7ab9307b3cd4d80c4
Subproject commit fa6373d8e2432cd63da881e05f4100240e688cdf

View File

@ -159,13 +159,8 @@ reply_merge_success (struct MHD_Connection *connection,
&pcc->target_amount,
&pcc->wf->wad))
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Purse merged, balance of %s benefits exchange as it is below wad fee.\n",
TALER_amount2s (&pcc->target_amount));
return TALER_MHD_reply_with_ec (
connection,
TALER_EC_EXCHANGE_PURSE_MERGE_WAD_FEE_EXCEEDS_PURSE_VALUE,
TALER_amount2s (&pcc->wf->wad));
TALER_amount_set_zero (TEH_currency,
&merge_amount);
}
}
if (TALER_EC_NONE !=

View File

@ -551,6 +551,7 @@ TEH_handler_reserves_purse (
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Cannot purse purse: global fees not configured!\n");
GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_EXCHANGE_GENERIC_GLOBAL_FEES_MISSING,
@ -565,7 +566,18 @@ TEH_handler_reserves_purse (
else
{
rpc.flags = TALER_WAMF_MODE_CREATE_WITH_PURSE_FEE;
// FIXME: check rpc.purse_fee is at or above gf.fees.purse!
if (-1 ==
TALER_amount_cmp (&rpc.purse_fee,
&rpc.gf->fees.purse))
{
/* rpc.purse_fee is below gf.fees.purse! */
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_EXCHANGE_RESERVES_PURSE_FEE_TOO_LOW,
TALER_amount2s (&rpc.gf->fees.purse));
}
}
TEH_METRICS_num_verifications[TEH_MT_SIGNATURE_EDDSA]++;
if (GNUNET_OK !=