refresh whitelist based on wallet health (fixes #60)

Refreshs the whitelist in each iteration based on the wallet health,
disabled wallets will be removed from the whitelist automatically.
This commit is contained in:
gcarq
2017-11-13 21:34:47 +01:00
parent 81f7172c4a
commit dd9cb008fb
7 changed files with 115 additions and 14 deletions

View File

@@ -37,7 +37,8 @@ def default_conf():
"BTC_ETH",
"BTC_TKN",
"BTC_TRST",
"BTC_SWT"
"BTC_SWT",
"BTC_BCC"
]
},
"telegram": {
@@ -90,6 +91,36 @@ def ticker():
})
@pytest.fixture
def health():
return MagicMock(return_value=[{
'Currency': 'BTC',
'IsActive': True,
'LastChecked': '2017-11-13T20:15:00.00',
'Notice': None
}, {
'Currency': 'ETH',
'IsActive': True,
'LastChecked': '2017-11-13T20:15:00.00',
'Notice': None
}, {
'Currency': 'TRST',
'IsActive': True,
'LastChecked': '2017-11-13T20:15:00.00',
'Notice': None
}, {
'Currency': 'SWT',
'IsActive': True,
'LastChecked': '2017-11-13T20:15:00.00',
'Notice': None
}, {
'Currency': 'BCC',
'IsActive': False,
'LastChecked': '2017-11-13T20:15:00.00',
'Notice': None
}])
@pytest.fixture
def limit_buy_order():
return {