added str.lower check
If someone can TEST my code quickly we can accept it and go
This commit is contained in:
parent
0a67334e77
commit
476c54cd9b
@ -48,15 +48,13 @@ def refresh_whitelist(whitelist: List[str]) -> List[str]:
|
|||||||
'Ignoring %s from whitelist (reason: %s).',
|
'Ignoring %s from whitelist (reason: %s).',
|
||||||
pair, status.get('Notice') or 'wallet is not active'
|
pair, status.get('Notice') or 'wallet is not active'
|
||||||
)
|
)
|
||||||
# Wallet is going to be delisted (and cause a loss)
|
# Wallet will be delisted soon (and cause a loss)
|
||||||
delisted = 'delisted'
|
if 'delisted' in str(status['Notice']).lower():
|
||||||
if delisted in str(status['Notice']):
|
|
||||||
sanitized_whitelist.remove(pair)
|
sanitized_whitelist.remove(pair)
|
||||||
logger.info(
|
logger.info(
|
||||||
'Ignoring %s from whitelist (reason: %s).',
|
'Ignoring %s from whitelist (reason: %s).',
|
||||||
pair, status.get('Notice') or 'wallet will be delisted soon'
|
pair, status.get('Notice') or 'wallet will be delisted soon'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
# We need to remove pairs that are unknown
|
# We need to remove pairs that are unknown
|
||||||
final_list = [x for x in sanitized_whitelist if x in known_pairs]
|
final_list = [x for x in sanitized_whitelist if x in known_pairs]
|
||||||
|
Loading…
Reference in New Issue
Block a user