Fix rpc messages

This commit is contained in:
Matthias
2018-12-03 20:31:25 +01:00
parent 1b3ecb8343
commit ef1208b366
13 changed files with 59 additions and 36 deletions

View File

@@ -19,15 +19,37 @@ class StaticPairList(object):
self._blacklist = self._config['exchange'].get('pair_blacklist', [])
# self.refresh_whitelist()
@property
def name(self) -> str:
"""
Gets name of the class
-> no need to overwrite in subclasses
"""
return self.__class__.__name__
@property
def whitelist(self) -> List[str]:
""" Contains the current whitelist """
"""
Has the current whitelist
-> no need to overwrite in subclasses
"""
return self._whitelist
@property
def blacklist(self) -> List[str]:
"""
Has the current blacklist
-> no need to overwrite in subclasses
"""
return self._blacklist
def short_desc(self) -> str:
"""
Short whitelist method description - used for startup-messages
-> Please overwrite in subclasses
"""
return f"{self.name}: {self.whitelist}"
def refresh_whitelist(self) -> None:
"""
Refreshes whitelist and assigns it to self._whitelist