fix --offline option for fx and trustedcoin
This commit is contained in:
parent
57e66324cb
commit
4a88ca1a3a
@ -436,7 +436,8 @@ class FxThread(ThreadJob):
|
||||
def __init__(self, config, network):
|
||||
self.config = config
|
||||
self.network = network
|
||||
self.network.register_callback(self.set_proxy, ['proxy_set'])
|
||||
if self.network:
|
||||
self.network.register_callback(self.set_proxy, ['proxy_set'])
|
||||
self.ccy = self.get_currency()
|
||||
self.history_used_spot = False
|
||||
self.ccy_combo = None
|
||||
|
||||
@ -104,8 +104,11 @@ class TrustedCoinCosignerClient(object):
|
||||
self.user_agent = user_agent
|
||||
|
||||
def send_request(self, method, relative_url, data=None):
|
||||
print("send_req")
|
||||
return asyncio.run_coroutine_threadsafe(self._send_request(method, relative_url, data), Network.get_instance().asyncio_loop).result()
|
||||
network = Network.get_instance()
|
||||
if network:
|
||||
return asyncio.run_coroutine_threadsafe(self._send_request(method, relative_url, data), network.asyncio_loop).result()
|
||||
else:
|
||||
raise ErrorConnectingServer('You are offline.')
|
||||
|
||||
async def handle_response(self, resp):
|
||||
if resp.status != 200:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user