[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-merchant-demos] branch master updated: migration to new tim
From: |
gnunet |
Subject: |
[taler-taler-merchant-demos] branch master updated: migration to new timestamp/duration format |
Date: |
Mon, 21 Mar 2022 18:42:59 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository taler-merchant-demos.
The following commit(s) were added to refs/heads/master by this push:
new add7718 migration to new timestamp/duration format
add7718 is described below
commit add77184cba4f046ffaae4a3872c81861de9b15e
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Mar 21 18:42:54 2022 +0100
migration to new timestamp/duration format
---
talermerchantdemos/blog/blog.py | 11 ++++++-----
talermerchantdemos/donations/donations.py | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index aa9d20f..5dd1734 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -61,9 +61,10 @@ def refundable(pay_status):
refunded = pay_status.get("refunded")
refund_deadline = pay_status.get("contract_terms",
{}).get("refund_deadline")
assert refunded != None and refund_deadline
- t_ms = refund_deadline.get("t_ms")
- assert t_ms
- rd = Deadline(t_ms)
+ t_s = refund_deadline.get("t_s")
+ # FIXME: do not use assert here!
+ assert t_s
+ rd = Deadline(t_s * 1000)
if not refunded and not rd.isExpired():
return True
return False
@@ -302,12 +303,12 @@ def post_order(article_name, lang):
summary=summary,
# FIXME: add support for i18n of summary!
# 10 minutes time for a refund
- wire_transfer_deadline=dict(t_ms=1000 * int(time.time() + 15 * 30)),
+ wire_transfer_deadline=dict(t_s=int(time.time() + 15 * 30)),
)
order_resp = backend_post(
BACKEND_URL,
"private/orders",
- dict(order=order, refund_delay=dict(d_ms=1000 * 120)),
+ dict(order=order, refund_delay=dict(d_us=1000 * 1000 * 120)),
auth_token=APIKEY,
)
return order_resp
diff --git a/talermerchantdemos/donations/donations.py
b/talermerchantdemos/donations/donations.py
index d5fad4c..1a3fb4f 100644
--- a/talermerchantdemos/donations/donations.py
+++ b/talermerchantdemos/donations/donations.py
@@ -232,7 +232,7 @@ def donate(lang):
),
fulfillment_url=fulfillment_url,
summary="Donation to {}".format(donation_receiver),
- wire_transfer_deadline=dict(t_ms=1000 * int(time.time() + 60)),
+ wire_transfer_deadline=dict(t_s=int(time.time() + 60)),
)
order_resp = backend_instanced_post(
donation_receiver, "private/orders", dict(order=order)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-merchant-demos] branch master updated: migration to new timestamp/duration format,
gnunet <=