Don't specially handle empty results.
This commit is contained in:
parent
1f9ed0beff
commit
5a4f30d1bd
@ -599,11 +599,6 @@ class RPC:
|
||||
'est_stake': est_stake or 0,
|
||||
'stake': stake_currency,
|
||||
})
|
||||
if total == 0.0:
|
||||
if self._freqtrade.config['dry_run']:
|
||||
raise RPCException('Running in Dry Run, balances are not available.')
|
||||
else:
|
||||
raise RPCException('All balances are zero.')
|
||||
|
||||
value = self._fiat_converter.convert_amount(
|
||||
total, stake_currency, fiat_display_currency) if self._fiat_converter else 0
|
||||
|
@ -861,7 +861,7 @@ def test_balance_handle_empty_response(default_conf, update, mocker) -> None:
|
||||
telegram._balance(update=update, context=MagicMock())
|
||||
result = msg_mock.call_args_list[0][0][0]
|
||||
assert msg_mock.call_count == 1
|
||||
assert 'All balances are zero.' in result
|
||||
assert 'Starting capital: `0 BTC' in result
|
||||
|
||||
|
||||
def test_balance_handle_empty_response_dry(default_conf, update, mocker) -> None:
|
||||
|
@ -46,7 +46,6 @@ def test_init_invalid_db_url():
|
||||
init_db('sqlite:///', True)
|
||||
|
||||
|
||||
|
||||
def test_init_prod_db(default_conf, mocker):
|
||||
default_conf.update({'dry_run': False})
|
||||
default_conf.update({'db_url': constants.DEFAULT_DB_PROD_URL})
|
||||
|
Loading…
Reference in New Issue
Block a user