don't default fiat_convert to None for outputs
This commit is contained in:
		| @@ -172,7 +172,7 @@ class RPC(object): | |||||||
|                         stake_currency, |                         stake_currency, | ||||||
|                         fiat_display_currency |                         fiat_display_currency | ||||||
|                     ) if self._fiat_converter else 0, |                     ) if self._fiat_converter else 0, | ||||||
|                     symbol=fiat_display_currency if fiat_display_currency else '' |                     symbol=fiat_display_currency | ||||||
|                 ), |                 ), | ||||||
|                 '{value} trade{s}'.format( |                 '{value} trade{s}'.format( | ||||||
|                     value=value['trades'], |                     value=value['trades'], | ||||||
|   | |||||||
| @@ -226,7 +226,7 @@ class Telegram(RPC): | |||||||
|         :return: None |         :return: None | ||||||
|         """ |         """ | ||||||
|         stake_cur = self._config['stake_currency'] |         stake_cur = self._config['stake_currency'] | ||||||
|         fiat_disp_cur = self._config.get('fiat_display_currency', None) |         fiat_disp_cur = self._config.get('fiat_display_currency', '') | ||||||
|         try: |         try: | ||||||
|             timescale = int(update.message.text.replace('/daily', '').strip()) |             timescale = int(update.message.text.replace('/daily', '').strip()) | ||||||
|         except (TypeError, ValueError): |         except (TypeError, ValueError): | ||||||
| @@ -241,7 +241,7 @@ class Telegram(RPC): | |||||||
|                              headers=[ |                              headers=[ | ||||||
|                                  'Day', |                                  'Day', | ||||||
|                                  f'Profit {stake_cur}', |                                  f'Profit {stake_cur}', | ||||||
|                                  f'Profit {fiat_disp_cur if fiat_disp_cur else ""}' |                                  f'Profit {fiat_disp_cur}' | ||||||
|                              ], |                              ], | ||||||
|                              tablefmt='simple') |                              tablefmt='simple') | ||||||
|             message = f'<b>Daily Profit over the last {timescale} days</b>:\n<pre>{stats}</pre>' |             message = f'<b>Daily Profit over the last {timescale} days</b>:\n<pre>{stats}</pre>' | ||||||
| @@ -259,7 +259,7 @@ class Telegram(RPC): | |||||||
|         :return: None |         :return: None | ||||||
|         """ |         """ | ||||||
|         stake_cur = self._config['stake_currency'] |         stake_cur = self._config['stake_currency'] | ||||||
|         fiat_disp_cur = self._config.get('fiat_display_currency', None) |         fiat_disp_cur = self._config.get('fiat_display_currency', '') | ||||||
|  |  | ||||||
|         try: |         try: | ||||||
|             stats = self._rpc_trade_statistics( |             stats = self._rpc_trade_statistics( | ||||||
| @@ -298,7 +298,7 @@ class Telegram(RPC): | |||||||
|     def _balance(self, bot: Bot, update: Update) -> None: |     def _balance(self, bot: Bot, update: Update) -> None: | ||||||
|         """ Handler for /balance """ |         """ Handler for /balance """ | ||||||
|         try: |         try: | ||||||
|             result = self._rpc_balance(self._config.get('fiat_display_currency', None)) |             result = self._rpc_balance(self._config.get('fiat_display_currency', '')) | ||||||
|             output = '' |             output = '' | ||||||
|             for currency in result['currencies']: |             for currency in result['currencies']: | ||||||
|                 output += "*{currency}:*\n" \ |                 output += "*{currency}:*\n" \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user