Total row for telegram "/status table" command

work around mypy warning
This commit is contained in:
Eugene Schava 2021-05-17 14:45:54 +03:00
parent 915ff7e1bf
commit 196fde44e0

View File

@ -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