[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: remove refund_fee from refund co
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: remove refund_fee from refund confirmation message and signature |
Date: |
Wed, 22 Jul 2020 15:59:39 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 93923c16 remove refund_fee from refund confirmation message and
signature
93923c16 is described below
commit 93923c168d7472bf977c1dedc0a01c436769bf6e
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Wed Jul 22 19:29:27 2020 +0530
remove refund_fee from refund confirmation message and signature
---
src/exchange/taler-exchange-httpd_refund.c | 5 +----
src/include/taler_exchange_service.h | 2 --
src/include/taler_signatures.h | 13 -------------
src/lib/exchange_api_refund.c | 7 -------
src/testing/testing_api_cmd_refund.c | 3 ---
5 files changed, 1 insertion(+), 29 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_refund.c
b/src/exchange/taler-exchange-httpd_refund.c
index a6a2c3d6..ea261cb5 100644
--- a/src/exchange/taler-exchange-httpd_refund.c
+++ b/src/exchange/taler-exchange-httpd_refund.c
@@ -61,8 +61,6 @@ reply_refund_success (struct MHD_Connection *connection,
TALER_amount_hton (&rc.refund_amount,
&refund->refund_amount);
- TALER_amount_hton (&rc.refund_fee,
- &refund->refund_fee);
if (GNUNET_OK !=
TEH_KS_sign (&rc,
&pub,
@@ -76,8 +74,7 @@ reply_refund_success (struct MHD_Connection *connection,
return TALER_MHD_reply_json_pack (
connection,
MHD_HTTP_OK,
- "{s:o, s:o, s:o}",
- "refund_fee", TALER_JSON_from_amount (&refund->refund_fee),
+ "{s:o, s:o}",
"exchange_sig", GNUNET_JSON_from_data_auto (&sig),
"exchange_pub", GNUNET_JSON_from_data_auto (&pub));
}
diff --git a/src/include/taler_exchange_service.h
b/src/include/taler_exchange_service.h
index 441a93c7..6c5889ff 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -911,7 +911,6 @@ struct TALER_EXCHANGE_RefundHandle;
*
* @param cls closure
* @param hr HTTP response data
- * @param refund_fee the refund fee the exchange charged us
* @param sign_key exchange key used to sign @a obj, or NULL
* @param signature the actual signature, or NULL on error
*/
@@ -919,7 +918,6 @@ typedef void
(*TALER_EXCHANGE_RefundCallback) (
void *cls,
const struct TALER_EXCHANGE_HttpResponse *hr,
- const struct TALER_Amount *refund_fee,
const struct TALER_ExchangePublicKeyP *sign_key,
const struct TALER_ExchangeSignatureP *signature);
diff --git a/src/include/taler_signatures.h b/src/include/taler_signatures.h
index 07fdae3b..6584f185 100644
--- a/src/include/taler_signatures.h
+++ b/src/include/taler_signatures.h
@@ -509,7 +509,6 @@ struct TALER_RefundRequestPS
* exchange to the customer.
*/
struct TALER_AmountNBO refund_amount;
-
};
@@ -552,18 +551,6 @@ struct TALER_RefundConfirmationPS
* exchange to the customer.
*/
struct TALER_AmountNBO refund_amount;
-
- /**
- * Refund fee charged by the exchange. This must match the
- * Exchange's denomination key's refund fee. If the client puts in
- * an invalid refund fee (too high or too low) that does not match
- * the Exchange's denomination key, the refund operation is invalid
- * and will be rejected by the exchange. The @e amount_with_fee
- * minus the @e refund_fee is the amount that will be credited to
- * the original coin.
- */
- struct TALER_AmountNBO refund_fee; // FIXME: kill! => also do not return
refund_fee (from exchange + merchant APIs)
-
};
diff --git a/src/lib/exchange_api_refund.c b/src/lib/exchange_api_refund.c
index 1af1f14b..f675b07a 100644
--- a/src/lib/exchange_api_refund.c
+++ b/src/lib/exchange_api_refund.c
@@ -97,7 +97,6 @@ verify_refund_signature_ok (struct
TALER_EXCHANGE_RefundHandle *rh,
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("exchange_sig", exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub", exchange_pub),
- TALER_JSON_spec_amount_nbo ("refund_fee", &rh->depconf.refund_fee),
GNUNET_JSON_spec_end ()
};
@@ -148,8 +147,6 @@ handle_refund_finished (void *cls,
struct TALER_ExchangeSignatureP exchange_sig;
struct TALER_ExchangePublicKeyP *ep = NULL;
struct TALER_ExchangeSignatureP *es = NULL;
- struct TALER_Amount ra;
- const struct TALER_Amount *rf = NULL;
const json_t *j = response;
struct TALER_EXCHANGE_HttpResponse hr = {
.reply = j,
@@ -178,9 +175,6 @@ handle_refund_finished (void *cls,
{
ep = &exchange_pub;
es = &exchange_sig;
- TALER_amount_ntoh (&ra,
- &rh->depconf.refund_fee);
- rf = &ra;
}
break;
case MHD_HTTP_BAD_REQUEST:
@@ -239,7 +233,6 @@ handle_refund_finished (void *cls,
}
rh->cb (rh->cb_cls,
&hr,
- rf,
ep,
es);
TALER_EXCHANGE_refund_cancel (rh);
diff --git a/src/testing/testing_api_cmd_refund.c
b/src/testing/testing_api_cmd_refund.c
index aeb59771..30f25769 100644
--- a/src/testing/testing_api_cmd_refund.c
+++ b/src/testing/testing_api_cmd_refund.c
@@ -76,7 +76,6 @@ struct RefundState
*
* @param cls closure
* @param hr HTTP response details
- * @param refund_fee the refund fee the exchange charged
* @param exchange_pub public key the exchange
* used for signing @a obj.
* @param exchange_sig actual signature confirming the refund
@@ -84,7 +83,6 @@ struct RefundState
static void
refund_cb (void *cls,
const struct TALER_EXCHANGE_HttpResponse *hr,
- const struct TALER_Amount *refund_fee,
const struct TALER_ExchangePublicKeyP *exchange_pub,
const struct TALER_ExchangeSignatureP *exchange_sig)
{
@@ -92,7 +90,6 @@ refund_cb (void *cls,
struct RefundState *rs = cls;
struct TALER_TESTING_Command *refund_cmd;
- (void) refund_fee;
refund_cmd = &rs->is->commands[rs->is->ip];
rs->rh = NULL;
if (rs->expected_response_code != hr->http_status)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: remove refund_fee from refund confirmation message and signature,
gnunet <=