Skip to content
Snippets Groups Projects
Commit 682aeb7f authored by inso's avatar inso
Browse files

Fix connecting to wallet

parent 91c60398
No related branches found
No related tags found
No related merge requests found
...@@ -202,6 +202,8 @@ class ConnectionConfigController(QObject): ...@@ -202,6 +202,8 @@ class ConnectionConfigController(QObject):
if self.model.node_connector: if self.model.node_connector:
await self.model.node_connector.session.close() await self.model.node_connector.session.close()
except (NoPeerAvailable, DuniterError, StopIteration) as e: except (NoPeerAvailable, DuniterError, StopIteration) as e:
if not isinstance(e, StopIteration):
self.view.show_error(self.model.notification(), str(e))
self._logger.debug(str(e)) self._logger.debug(str(e))
self.view.stacked_pages.setCurrentWidget(self.view.page_connection) self.view.stacked_pages.setCurrentWidget(self.view.page_connection)
self.step_node = asyncio.Future() self.step_node = asyncio.Future()
......
...@@ -193,13 +193,14 @@ Current database is storing {1} network.""".format(node_connector.node.currency, ...@@ -193,13 +193,14 @@ Current database is storing {1} network.""".format(node_connector.node.currency,
# cell 1 contains the uid/pubkey selected locally # cell 1 contains the uid/pubkey selected locally
# cell 2 contains the uid/pubkey found on the network # cell 2 contains the uid/pubkey found on the network
registered = (False, identity.uid, None) registered = (False, identity.uid, None)
# We execute search based on pubkey # We execute search based on pubkey
# And look for account UID # And look for account UID
await execute_requests(_parse_uid_lookup, identity.pubkey) await execute_requests(_parse_uid_lookup, identity.pubkey)
# If the uid wasn't found when looking for the pubkey # If the uid wasn't found when looking for the pubkey
# We look for the uid and check for the pubkey # We look for the uid and check for the pubkey
if not registered[0] and not registered[2]: if not registered[0] and not registered[2] and identity.uid:
await execute_requests(_parse_pubkey_lookup, identity.uid) await execute_requests(_parse_pubkey_lookup, identity.uid)
return registered, found_identity return registered, found_identity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment