From 0949f54c7d238c8ca6027b62089512563ee32dd5 Mon Sep 17 00:00:00 2001 From: gcarq Date: Sun, 21 May 2017 16:52:36 +0200 Subject: [PATCH] minor changes --- config.json.example | 1 - main.py | 7 +++---- rpc/telegram.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config.json.example b/config.json.example index 671535bea..29eb75075 100644 --- a/config.json.example +++ b/config.json.example @@ -27,7 +27,6 @@ "BTC_MLN", "BTC_XZC", "BTC_TIME", - "BTC_NXS", "BTC_LUN" ] }, diff --git a/main.py b/main.py index 57a847317..b6fecd69e 100755 --- a/main.py +++ b/main.py @@ -196,10 +196,9 @@ def create_trade(stake_amount: float, exchange): trades = Trade.query.filter(Trade.is_open.is_(True)).all() trades.append(latest_trade) for trade in trades: - if trade.pair not in whitelist: - continue - whitelist.remove(trade.pair) - logger.debug('Ignoring {} in pair whitelist'.format(trade.pair)) + if trade.pair in whitelist: + whitelist.remove(trade.pair) + logger.debug('Ignoring {} in pair whitelist'.format(trade.pair)) if not whitelist: raise ValueError('No pair in whitelist') diff --git a/rpc/telegram.py b/rpc/telegram.py index 9b17da532..5900e0a50 100644 --- a/rpc/telegram.py +++ b/rpc/telegram.py @@ -2,7 +2,7 @@ import logging from datetime import timedelta import arrow -from telegram.error import NetworkError, BadRequest +from telegram.error import NetworkError from telegram.ext import CommandHandler, Updater from telegram import ParseMode, Bot, Update from wrapt import synchronized