diff --git a/balancer.py b/balancer.py index ba9603b..48b781d 100755 --- a/balancer.py +++ b/balancer.py @@ -84,9 +84,7 @@ def __init__(self): self.max_leverage_in_percent = abs(float(props['max_leverage_in_percent'])) self.backtrade_only_on_profit = bool(str(props['backtrade_only_on_profit']).strip('"').lower() == 'true') self.report = str(props['report']).strip('"') - currency = self.pair.split("/") - self.base = currency[0] - self.quote = currency[1] + self.base, self.quote = self.pair.split("/") if self.auto_quote not in self.mm_quotes: raise SystemExit(f"Invalid value for auto_quote: '{self.auto_quote}' possible values are: {self.mm_quotes}") if self.report not in self.report_cadences: @@ -327,7 +325,8 @@ def create_mail_content(daily: bool = False): settings_part = create_report_part_settings() general_part = create_mail_part_general() - performance = ["Performance", "-----------", '\n'.join(performance_part['mail']) + '\n* (change since yesterday noon)', '\n\n'] + performance = ["Performance", "-----------", '\n'.join(performance_part['mail']) + + '\n* (change since yesterday noon)', '\n\n'] if CONF.exchange == 'bitmex': start = ["Start information", "-----------------", '\n'.join(start_values_part['mail']), '\n\n'] else: diff --git a/balancer_test.py b/balancer_test.py index dd6b4d6..6fdbf19 100644 --- a/balancer_test.py +++ b/balancer_test.py @@ -941,7 +941,7 @@ def test_cancel_order_already_filled(self, mock_fetch_order_status, mock_cancel_ @patch('balancer.logging') @mock.patch.object(ccxt.kraken, 'cancel_order') @mock.patch.object(ccxt.kraken, 'fetch_order_status') - def test_cancel_orderd_not_found_already_filled(self, mock_fetch_order_status, mock_cancel_order, mock_logging): + def test_cancel_order_not_found_already_filled(self, mock_fetch_order_status, mock_cancel_order, mock_logging): balancer.CONF = self.create_default_conf() balancer.CONF.test = False balancer.LOG = mock_logging @@ -960,7 +960,7 @@ def test_cancel_orderd_not_found_already_filled(self, mock_fetch_order_status, m @patch('balancer.logging') @mock.patch.object(ccxt.bitmex, 'cancel_order') @mock.patch.object(ccxt.bitmex, 'fetch_order_status') - def test_cancel_orderd_not_found_already_filled_bitmex(self, mock_fetch_order_status, mock_cancel_order, mock_logging): + def test_cancel_order_not_found_already_filled_bitmex(self, mock_fetch_order_status, mock_cancel_order, mock_logging): balancer.CONF = self.create_default_conf() balancer.CONF.exchange = 'bitmex' balancer.LOG = mock_logging