gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-exchange] 01/03: change 'f' to 'contribution' in /de


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] 01/03: change 'f' to 'contribution' in /deposit
Date: Tue, 02 Jan 2018 00:07:47 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

commit 4f2ad1051b1433974e5d598b1546202797729e31
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Jan 1 22:10:26 2018 +0100

    change 'f' to 'contribution' in /deposit
---
 src/exchange-lib/exchange_api_deposit.c     | 2 +-
 src/exchange/taler-exchange-httpd_deposit.c | 6 +++++-
 src/include/taler_error_codes.h             | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/exchange-lib/exchange_api_deposit.c 
b/src/exchange-lib/exchange_api_deposit.c
index d90b1aa..76e3e4d 100644
--- a/src/exchange-lib/exchange_api_deposit.c
+++ b/src/exchange-lib/exchange_api_deposit.c
@@ -454,7 +454,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle 
*exchange,
                            " s:o," /* merchant_pub */
                            " s:o, s:o," /* refund_deadline, wire_deadline */
                            " s:o}",     /* coin_sig */
-                           "f", TALER_JSON_from_amount (amount),
+                           "contribution", TALER_JSON_from_amount (amount),
                            "wire", wire_details,
                            "H_wire", GNUNET_JSON_from_data_auto (&h_wire),
                            "h_contract_terms", GNUNET_JSON_from_data_auto 
(h_contract_terms),
diff --git a/src/exchange/taler-exchange-httpd_deposit.c 
b/src/exchange/taler-exchange-httpd_deposit.c
index b7fb345..542c56c 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -149,6 +149,8 @@ deposit_transaction (void *cls,
   {
     struct TALER_Amount amount_without_fee;
 
+    GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+               "/deposit replay, accepting again!\n");
     GNUNET_assert (GNUNET_OK ==
                    TALER_amount_subtract (&amount_without_fee,
                                           &deposit->amount_with_fee,
@@ -191,6 +193,8 @@ deposit_transaction (void *cls,
   if (0 < TALER_amount_cmp (&spent,
                             &dc->value))
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+               "Deposited coin has insufficient funds left!\n");
     *mhd_ret = TEH_RESPONSE_reply_coin_insufficient_funds (connection,
                                                           
TALER_EC_DEPOSIT_INSUFFICIENT_FUNDS,
                                                           tl);
@@ -376,7 +380,7 @@ TEH_DEPOSIT_handler_deposit (struct TEH_RequestHandler *rh,
   struct GNUNET_HashCode my_h_wire;
   struct GNUNET_JSON_Specification spec[] = {
     GNUNET_JSON_spec_json ("wire", &wire),
-    TALER_JSON_spec_amount ("f", &deposit.amount_with_fee),
+    TALER_JSON_spec_amount ("contribution", &deposit.amount_with_fee),
     TALER_JSON_spec_denomination_public_key ("denom_pub", 
&deposit.coin.denom_pub),
     TALER_JSON_spec_denomination_signature ("ub_sig", &deposit.coin.denom_sig),
     GNUNET_JSON_spec_fixed_auto ("coin_pub", &deposit.coin.coin_pub),
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index 759e6fc..d90bd4f 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -1001,6 +1001,7 @@ enum TALER_ErrorCode
   TALER_EC_PAY_REFUND_DEADLINE_PAST_WIRE_TRANSFER_DEADLINE = 2114,
 
   /**
+
    * The request fails to provide coins for the payment.
    * This response is provided with HTTP status code
    * MHD_HTTP_BAD_REQUEST.

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]