File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -165,9 +165,10 @@ def do_GET(self):
165
165
transactions_in_last_week = list (filter (lambda x : x ["time" ] > a_week_ago_posix , transactions ))
166
166
fees_in_last_week = reduce (lambda a ,b : a - b ["fee" ], transactions_in_last_week , 0 )
167
167
try :
168
- time_between_transactions = round (168 / len (transactions_in_last_week )) # in hours based on 168 hours in a week
168
+ time_between_transactions = str (round (168 / len (transactions_in_last_week ))) # in hours based on 168 hours in a week
169
+ time_between_transactions += " hour(s)"
169
170
except ZeroDivisionError :
170
- time_between_transactions = "Infinite "
171
+ time_between_transactions = "N/A "
171
172
transactions .sort (key = lambda x : x ["confirmations" ])
172
173
homepage_template = """<html>
173
174
<head>
@@ -189,7 +190,7 @@ def do_GET(self):
189
190
This address changes after every donation.
190
191
</p>
191
192
<p>
192
- Average time between transactions in the last week: {{ time_between_transactions }} hour(s) </br>
193
+ Average time between transactions in the last week: {{ time_between_transactions }} </br>
193
194
Fees used in the last week: {{ fees_in_last_week }} BTC</br>
194
195
Latest transactions: </br>
195
196
{{#transactions}}
You can’t perform that action at this time.
0 commit comments