diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-03-22 16:09:01 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-03-22 16:09:01 +0100 |
commit | 1277f8445d0497107c5bd41b35007480d6a4472a (patch) | |
tree | d6144643860085ba45f66e06748912acc83e6aa9 /src/mint/taler-mint-httpd_refresh.c | |
parent | c2a42d5475daf23889c720734edbafc8c2ce4e4f (diff) |
include fees in amounts being signed, check available balance on refresh
Diffstat (limited to 'src/mint/taler-mint-httpd_refresh.c')
-rw-r--r-- | src/mint/taler-mint-httpd_refresh.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mint/taler-mint-httpd_refresh.c b/src/mint/taler-mint-httpd_refresh.c index d4979288..602fc67f 100644 --- a/src/mint/taler-mint-httpd_refresh.c +++ b/src/mint/taler-mint-httpd_refresh.c @@ -109,8 +109,8 @@ handle_refresh_melt_binary (struct MHD_Connection *connection, body.purpose.purpose = htonl (TALER_SIGNATURE_REFRESH_MELT_SESSION); body.purpose.size = htonl (sizeof (struct RefreshMeltSessionSignature)); body.melt_hash = melt_hash; - TALER_amount_hton (&body.amount, - &coin_melt_details->melt_amount); + TALER_amount_hton (&body.amount_with_fee, + &coin_melt_details->melt_amount_with_fee); if (GNUNET_OK != GNUNET_CRYPTO_eddsa_verify (TALER_SIGNATURE_REFRESH_MELT_SESSION, &body.purpose, @@ -252,7 +252,7 @@ get_coin_public_info (struct MHD_Connection *connection, ? GNUNET_NO : GNUNET_SYSERR; } r_melt_detail->melt_sig = melt_sig; - r_melt_detail->melt_amount = amount; + r_melt_detail->melt_amount_with_fee = amount; TALER_MINT_release_parsed_data (spec); return GNUNET_OK; } @@ -288,8 +288,8 @@ verify_coin_public_info (struct MHD_Connection *connection, body.purpose.size = htonl (sizeof (struct RefreshMeltCoinSignature)); body.purpose.purpose = htonl (TALER_SIGNATURE_REFRESH_MELT_COIN); body.melt_hash = *melt_hash; - TALER_amount_hton (&body.amount, - &r_melt_detail->melt_amount); + TALER_amount_hton (&body.amount_with_fee, + &r_melt_detail->melt_amount_with_fee); body.coin_pub = r_public_info->coin_pub; if (GNUNET_OK != GNUNET_CRYPTO_ecdsa_verify (TALER_SIGNATURE_REFRESH_MELT_COIN, |