diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-11-06 19:43:47 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-11-06 19:43:47 +0100 |
commit | 9d6e1040669435dfa2ab93abd4f1669c7bf90871 (patch) | |
tree | c072a1284e6b3da14f972d98197d22f4d14500d5 /src/exchange/taler-exchange-httpd_deposit.c | |
parent | 57acad487de0ecb3f964c83a60e4f2d7d1ec460b (diff) | |
download | exchange-9d6e1040669435dfa2ab93abd4f1669c7bf90871.tar.gz exchange-9d6e1040669435dfa2ab93abd4f1669c7bf90871.tar.bz2 exchange-9d6e1040669435dfa2ab93abd4f1669c7bf90871.zip |
include h_extensions in deposit confirmation
Diffstat (limited to 'src/exchange/taler-exchange-httpd_deposit.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_deposit.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 323a77b55..e9851de79 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -58,9 +58,11 @@ static MHD_RESULT reply_deposit_success (struct MHD_Connection *connection, const struct TALER_CoinSpendPublicKeyP *coin_pub, const struct TALER_MerchantWireHash *h_wire, + const struct TALER_ExtensionContractHash *h_extensions, const struct TALER_PrivateContractHash *h_contract_terms, struct GNUNET_TIME_Absolute exchange_timestamp, struct GNUNET_TIME_Absolute refund_deadline, + struct GNUNET_TIME_Absolute wire_deadline, const struct TALER_MerchantPublicKeyP *merchant, const struct TALER_Amount *amount_without_fee) { @@ -73,11 +75,14 @@ reply_deposit_success (struct MHD_Connection *connection, .h_wire = *h_wire, .exchange_timestamp = GNUNET_TIME_absolute_hton (exchange_timestamp), .refund_deadline = GNUNET_TIME_absolute_hton (refund_deadline), + .wire_deadline = GNUNET_TIME_absolute_hton (wire_deadline), .coin_pub = *coin_pub, - .merchant = *merchant + .merchant_pub = *merchant }; enum TALER_ErrorCode ec; + if (NULL != h_extensions) + dc.h_extensions = *h_extensions; TALER_amount_hton (&dc.amount_without_fee, amount_without_fee); if (TALER_EC_NONE != @@ -184,9 +189,11 @@ deposit_precheck (void *cls, *mhd_ret = reply_deposit_success (connection, &deposit->coin.coin_pub, &dc->h_wire, + NULL /* h_extensions! */, &deposit->h_contract_terms, dc->exchange_timestamp, deposit->refund_deadline, + deposit->wire_deadline, &deposit->merchant_pub, &amount_without_fee); /* Treat as 'hard' DB error as we want to rollback and @@ -559,9 +566,11 @@ TEH_handler_deposit (struct MHD_Connection *connection, res = reply_deposit_success (connection, &deposit.coin.coin_pub, &dc.h_wire, + NULL /* h_extensions! */, &deposit.h_contract_terms, dc.exchange_timestamp, deposit.refund_deadline, + deposit.wire_deadline, &deposit.merchant_pub, &amount_without_fee); GNUNET_JSON_parse_free (spec); |