Skip to content
Snippets Groups Projects
Commit 32f44334 authored by crokkon's avatar crokkon
Browse files

use list of APIs for known API check

parent e444224a
No related branches found
No related tags found
No related merge requests found
...@@ -146,34 +146,16 @@ class SteemNodeRPC(GrapheneRPC): ...@@ -146,34 +146,16 @@ class SteemNodeRPC(GrapheneRPC):
def _check_api_name(self, msg): def _check_api_name(self, msg):
error_start = "Could not find API " error_start = "Could not find API "
if re.search(error_start + "account_history_api", msg): known_apis = ['account_history_api', 'tags_api',
return True 'database_api', 'market_history_api',
elif re.search(error_start + "tags_api", msg): 'block_api', 'account_by_key_api', 'chain_api',
return True 'follow_api', 'condenser_api', 'debug_node_api',
elif re.search(error_start + "database_api", msg): 'witness_api', 'test_api',
return True 'network_broadcast_api']
elif re.search(error_start + "market_history_api", msg): for api in known_apis:
return True if re.search(error_start + api, msg):
elif re.search(error_start + "block_api", msg): return True
return True return False
elif re.search(error_start + "account_by_key_api", msg):
return True
elif re.search(error_start + "chain_api", msg):
return True
elif re.search(error_start + "follow_api", msg):
return True
elif re.search(error_start + "condenser_api", msg):
return True
elif re.search(error_start + "debug_node_api", msg):
return True
elif re.search(error_start + "witness_api", msg):
return True
elif re.search(error_start + "test_api", msg):
return True
elif re.search(error_start + "network_broadcast_api", msg):
return True
else:
return False
def get_account(self, name, **kwargs): def get_account(self, name, **kwargs):
""" Get full account details from account name """ Get full account details from account name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment