Fix typo in close trade message

This commit is contained in:
Matthias 2020-05-30 19:28:30 +02:00
parent 46456516bb
commit 91f84f1a43
2 changed files with 2 additions and 2 deletions

View File

@ -328,7 +328,7 @@ class Telegram(RPC):
best_rate = stats['best_rate'] best_rate = stats['best_rate']
# Message to display # Message to display
if stats['closed_trade_count'] > 0: if stats['closed_trade_count'] > 0:
markdown_msg = ("*ROI:* Close trades\n" markdown_msg = ("*ROI:* Closed trades\n"
f"∙ `{profit_closed_coin:.8f} {stake_cur} " f"∙ `{profit_closed_coin:.8f} {stake_cur} "
f"({profit_closed_percent:.2f}%)`\n" f"({profit_closed_percent:.2f}%)`\n"
f"∙ `{profit_closed_fiat:.3f} {fiat_disp_cur}`\n") f"∙ `{profit_closed_fiat:.3f} {fiat_disp_cur}`\n")

View File

@ -446,7 +446,7 @@ def test_profit_handle(default_conf, update, ticker, ticker_sell_up, fee,
telegram._profit(update=update, context=MagicMock()) telegram._profit(update=update, context=MagicMock())
assert msg_mock.call_count == 1 assert msg_mock.call_count == 1
assert '*ROI:* Close trades' in msg_mock.call_args_list[-1][0][0] assert '*ROI:* Closed trades' in msg_mock.call_args_list[-1][0][0]
assert '∙ `0.00006217 BTC (6.20%)`' in msg_mock.call_args_list[-1][0][0] assert '∙ `0.00006217 BTC (6.20%)`' in msg_mock.call_args_list[-1][0][0]
assert '∙ `0.933 USD`' in msg_mock.call_args_list[-1][0][0] assert '∙ `0.933 USD`' in msg_mock.call_args_list[-1][0][0]
assert '*ROI:* All trades' in msg_mock.call_args_list[-1][0][0] assert '*ROI:* All trades' in msg_mock.call_args_list[-1][0][0]