Total row for telegram "/status table" command
work around mypy warning
This commit is contained in:
parent
915ff7e1bf
commit
196fde44e0
@ -360,13 +360,14 @@ class Telegram(RPCHandler):
|
|||||||
self._config['stake_currency'], fiat_currency)
|
self._config['stake_currency'], fiat_currency)
|
||||||
|
|
||||||
show_total = fiat_currency != ''
|
show_total = fiat_currency != ''
|
||||||
total_sum = 0
|
total_sum = 0.0
|
||||||
if show_total:
|
if show_total:
|
||||||
total_sum = sum(
|
r = re.compile(".*\\((-?\\d*\\.\\d*)\\)")
|
||||||
map(lambda m: float(m[1]) if m else 0.0,
|
for trade in statlist:
|
||||||
map(lambda trade: re.compile(".*\\((-?\\d*\\.\\d*)\\)").match(trade[-1]),
|
m = r.match(trade[-1])
|
||||||
statlist))
|
if m is not None:
|
||||||
)
|
total_sum += float(m[1])
|
||||||
|
|
||||||
max_trades_per_msg = 50
|
max_trades_per_msg = 50
|
||||||
"""
|
"""
|
||||||
Calculate the number of messages of 50 trades per message
|
Calculate the number of messages of 50 trades per message
|
||||||
|
Loading…
Reference in New Issue
Block a user