mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-28 16:01:30 +00:00
fix --offline option for fx and trustedcoin
This commit is contained in:
parent
57e66324cb
commit
4a88ca1a3a
2 changed files with 7 additions and 3 deletions
|
@ -436,6 +436,7 @@ class FxThread(ThreadJob):
|
||||||
def __init__(self, config, network):
|
def __init__(self, config, network):
|
||||||
self.config = config
|
self.config = config
|
||||||
self.network = network
|
self.network = network
|
||||||
|
if self.network:
|
||||||
self.network.register_callback(self.set_proxy, ['proxy_set'])
|
self.network.register_callback(self.set_proxy, ['proxy_set'])
|
||||||
self.ccy = self.get_currency()
|
self.ccy = self.get_currency()
|
||||||
self.history_used_spot = False
|
self.history_used_spot = False
|
||||||
|
|
|
@ -104,8 +104,11 @@ class TrustedCoinCosignerClient(object):
|
||||||
self.user_agent = user_agent
|
self.user_agent = user_agent
|
||||||
|
|
||||||
def send_request(self, method, relative_url, data=None):
|
def send_request(self, method, relative_url, data=None):
|
||||||
print("send_req")
|
network = Network.get_instance()
|
||||||
return asyncio.run_coroutine_threadsafe(self._send_request(method, relative_url, data), Network.get_instance().asyncio_loop).result()
|
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):
|
async def handle_response(self, resp):
|
||||||
if resp.status != 200:
|
if resp.status != 200:
|
||||||
|
|
Loading…
Add table
Reference in a new issue