Skip to content

Commit b682fef

Browse files
committed
fix english
1 parent dbccd73 commit b682fef

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

otsserver/rpc.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,10 @@ def do_GET(self):
165165
transactions_in_last_week = list(filter(lambda x: x["time"] > a_week_ago_posix, transactions))
166166
fees_in_last_week = reduce(lambda a,b: a-b["fee"], transactions_in_last_week, 0)
167167
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)"
169170
except ZeroDivisionError:
170-
time_between_transactions = "Infinite"
171+
time_between_transactions = "N/A"
171172
transactions.sort(key=lambda x: x["confirmations"])
172173
homepage_template = """<html>
173174
<head>
@@ -189,7 +190,7 @@ def do_GET(self):
189190
This address changes after every donation.
190191
</p>
191192
<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>
193194
Fees used in the last week: {{ fees_in_last_week }} BTC</br>
194195
Latest transactions: </br>
195196
{{#transactions}}

0 commit comments

Comments
 (0)