From ad5d54f48534ac0ad5bfd7f048bd7782e674a89b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 14 Dec 2021 16:10:40 +0100 Subject: migration to protocol v11 --- .../taler-merchant-httpd_private-get-orders-ID.c | 33 ++++++++++------------ 1 file changed, 15 insertions(+), 18 deletions(-) (limited to 'src/backend/taler-merchant-httpd_private-get-orders-ID.c') diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c index 5b2bfeb0..328ffbf0 100644 --- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c @@ -505,10 +505,9 @@ deposit_get_cb (void *cls, /* got a 'preliminary' reply from the exchange, remember our target UUID */ enum GNUNET_DB_QueryStatus qs; - struct GNUNET_TIME_Absolute now; + struct GNUNET_TIME_Timestamp now; - now = GNUNET_TIME_absolute_get (); - (void) GNUNET_TIME_round_abs (&now); + now = GNUNET_TIME_timestamp_get (); qs = TMH_db->account_kyc_set_status ( TMH_db->cls, gorc->hc->instance->settings.id, @@ -740,7 +739,7 @@ gorc_cleanup (void *cls) static void process_refunds_cb (void *cls, uint64_t refund_serial, - struct GNUNET_TIME_Absolute timestamp, + struct GNUNET_TIME_Timestamp timestamp, const struct TALER_CoinSpendPublicKeyP *coin_pub, const char *exchange_url, uint64_t rtransaction_id, @@ -756,8 +755,8 @@ process_refunds_cb (void *cls, GNUNET_JSON_PACK ( TALER_JSON_pack_amount ("amount", refund_amount), - GNUNET_JSON_pack_time_abs ("timestamp", - timestamp), + GNUNET_JSON_pack_timestamp ("timestamp", + timestamp), GNUNET_JSON_pack_string ("reason", reason)))); /* For refunded coins, we are not charged deposit fees, so subtract those @@ -802,7 +801,7 @@ static void process_transfer_details (void *cls, const struct TALER_WireTransferIdentifierRawP *wtid, const char *exchange_url, - struct GNUNET_TIME_Absolute execution_time, + struct GNUNET_TIME_Timestamp execution_time, const struct TALER_Amount *deposit_value, const struct TALER_Amount *deposit_fee, bool transfer_confirmed) @@ -810,7 +809,6 @@ process_transfer_details (void *cls, struct GetOrderRequestContext *gorc = cls; json_t *wire_details = gorc->wire_details; struct TALER_Amount wired; - struct GNUNET_TIME_Absolute execution_time_round = execution_time; /* Compute total amount *wired* */ GNUNET_assert (0 < @@ -822,7 +820,6 @@ process_transfer_details (void *cls, &gorc->deposit_fees_total, deposit_fee)); - GNUNET_TIME_round_abs (&execution_time_round); GNUNET_assert (0 <= TALER_amount_subtract (&wired, deposit_value, @@ -837,8 +834,8 @@ process_transfer_details (void *cls, exchange_url), TALER_JSON_pack_amount ("amount", &wired), - GNUNET_JSON_pack_time_abs ("execution_time", - execution_time_round), + GNUNET_JSON_pack_timestamp ("execution_time", + execution_time), GNUNET_JSON_pack_bool ("confirmed", transfer_confirmed)))); } @@ -856,7 +853,7 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, bool order_only = false; struct TALER_ClaimTokenP claim_token = { 0 }; const char *summary; - struct GNUNET_TIME_Absolute timestamp; + struct GNUNET_TIME_Timestamp timestamp; if (NULL == gorc) { @@ -1067,8 +1064,8 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, &gorc->fulfillment_url)), GNUNET_JSON_spec_string ("summary", &summary), - TALER_JSON_spec_absolute_time ("timestamp", - ×tamp), + GNUNET_JSON_spec_timestamp ("timestamp", + ×tamp), GNUNET_JSON_spec_end () }; @@ -1210,8 +1207,8 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, &gorc->contract_amount), GNUNET_JSON_pack_string ("summary", summary), - GNUNET_JSON_pack_time_abs ("creation_time", - timestamp)); + GNUNET_JSON_pack_timestamp ("creation_time", + timestamp)); GNUNET_free (taler_pay_uri); GNUNET_free (already_paid_order_id); return ret; @@ -1323,8 +1320,8 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh, &gorc->contract_amount), GNUNET_JSON_pack_string ("summary", summary), - GNUNET_JSON_pack_time_abs ("creation_time", - timestamp)); + GNUNET_JSON_pack_timestamp ("creation_time", + timestamp)); GNUNET_free (taler_pay_uri); GNUNET_free (order_status_url); return ret; -- cgit v1.2.3