summaryrefslogtreecommitdiff
path: root/src/backend
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-07 20:14:02 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-07 20:14:02 +0200
commit1c14e3319d3f82363a3bfd935410748eb8afb597 (patch)
tree2fa196ffdf27aaf64c4d0e16493f9fcd6328b9e0 /src/backend
parent4344f16b33bad868e8aea32f4921640950068332 (diff)
downloadmerchant-1c14e3319d3f82363a3bfd935410748eb8afb597.tar.gz
merchant-1c14e3319d3f82363a3bfd935410748eb8afb597.tar.bz2
merchant-1c14e3319d3f82363a3bfd935410748eb8afb597.zip
more work on post /transfers and the like
Diffstat (limited to 'src/backend')
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-pay.c3
-rw-r--r--src/backend/taler-merchant-httpd_private-post-transfers.c12
2 files changed, 10 insertions, 5 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index d76965d6..ca519a9f 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -537,12 +537,14 @@ begin_transaction (struct PayContext *pc);
* that no other confirmations are on the way, and can pack a response
* for the wallet
* @param hr HTTP response code details
+ * @param deposit_timestamp time when the exchange generated the deposit confirmation
* @param exchange_sig signature from the exchange over the deposit confirmation
* @param exchange_pub_key which key did the exchange use to create the @a exchange_sig
*/
static void
deposit_cb (void *cls,
const struct TALER_EXCHANGE_HttpResponse *hr,
+ struct GNUNET_TIME_Absolute deposit_timestamp,
const struct TALER_ExchangeSignatureP *exchange_sig,
const struct TALER_ExchangePublicKeyP *exchange_pub)
{
@@ -643,6 +645,7 @@ deposit_cb (void *cls,
TMH_db->preflight (TMH_db->cls);
qs = TMH_db->insert_deposit (TMH_db->cls,
pc->hc->instance->settings.id,
+ deposit_timestamp,
&pc->h_contract_terms,
&dc->coin_pub,
dc->exchange_url,
diff --git a/src/backend/taler-merchant-httpd_private-post-transfers.c b/src/backend/taler-merchant-httpd_private-post-transfers.c
index d78746cb..29e59972 100644
--- a/src/backend/taler-merchant-httpd_private-post-transfers.c
+++ b/src/backend/taler-merchant-httpd_private-post-transfers.c
@@ -261,7 +261,6 @@ transfer_cleanup (void *cls)
*
* @param cls closure with our `struct PostTransfersContext *`
* @param transaction_id of the contract
- * @param coin_pub public key of the coin
* @param exchange_url URL of the exchange that issued @a coin_pub
* @param amount_with_fee amount the exchange will transfer for this coin
* @param deposit_fee fee the exchange will charge for this coin
@@ -270,14 +269,17 @@ transfer_cleanup (void *cls)
*/
static void
check_transfer (void *cls,
- const struct GNUNET_HashCode *h_contract_terms,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
const char *exchange_url,
const struct TALER_Amount *amount_with_fee,
const struct TALER_Amount *deposit_fee,
const struct TALER_Amount *refund_fee,
const struct TALER_Amount *wire_fee,
- const json_t *exchange_proof)
+ const struct GNUNET_HashCode *h_wire,
+ struct GNUNET_TIME_Absolute deposit_timestamp,
+ struct GNUNET_TIME_Absolute refund_deadline,
+ const struct TALER_ExchangeSignatureP *exchange_sig,
+ const struct TALER_ExchangePublicKeyP *exchange_pub);
+
{
struct PostTransfersContext *ptc = cls;
const struct TALER_TrackTransferDetails *ttd = ptc->current_detail;
@@ -301,7 +303,7 @@ check_transfer (void *cls,
"hint", "disagreement about deposit valuation",
"exchange_deposit_proof", exchange_proof,
"conflict_offset", (json_int_t) ptc->current_offset,
- "coin_pub", GNUNET_JSON_from_data_auto (coin_pub),
+ "coin_pub", GNUNET_JSON_from_data_auto (&ttd->coin_pub),
"h_contract_terms", GNUNET_JSON_from_data_auto (
&ttd->h_contract_terms),
"amount_with_fee", TALER_JSON_from_amount (amount_with_fee),