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

Fix password_asker missing when changing account

parent 4d20281c
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ from .wot_tab import WotTabWidget
from .identities_tab import IdentitiesTabWidget
from .transactions_tab import TransactionsTabWidget
from .network_tab import NetworkTabWidget
from .password_asker import PasswordAskerDialog
from . import toast
import asyncio
from ..tools.exceptions import MembershipNotFoundError, LookupFailureError
......@@ -70,10 +71,11 @@ class CommunityWidget(QWidget, Ui_CommunityWidget):
QIcon(":/icons/network_icon"),
self.tr("Network"))
def change_account(self, account):
def change_account(self, account, password_asker):
self.account = account
self.tab_wot.change_account(account)
self.tab_identities.change_account(account)
self.password_asker = password_asker
self.tab_wot.change_account(account, self.password_asker)
self.tab_identities.change_account(account, self.password_asker)
def change_community(self, community):
self.tab_network.change_community(community)
......
......@@ -60,8 +60,9 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab):
self.button_search.addAction(direct_connections)
self.button_search.clicked.connect(self.search_text)
def change_account(self, account):
def change_account(self, account, password_asker):
self.account = account
self.password_asker = password_asker
if self.account is None:
self.community = None
......@@ -160,7 +161,7 @@ class IdentitiesTabWidget(QWidget, Ui_IdentitiesTab):
currency_tab.tab_history.table_history.model().sourceModel().refresh_transfers()
def certify_identity(self, identity):
dialog = CertificationDialog(self.account, self.app, self.password_asker)
dialog = CertificationDialog(self.app, self.account, self.password_asker)
dialog.combo_community.setCurrentText(self.community.name)
dialog.edit_pubkey.setText(identity.pubkey)
dialog.radio_pubkey.setChecked(True)
......
......@@ -89,7 +89,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
else:
self.show()
if self.app.current_account:
self.community_view.change_account(self.app.current_account)
self.password_asker = PasswordAskerDialog(self.app.current_account)
self.community_view.change_account(self.app.current_account, self.password_asker)
self.refresh()
def open_add_account_dialog(self):
......@@ -139,7 +140,8 @@ class MainWindow(QMainWindow, Ui_MainWindow):
def action_change_account(self, account_name):
self.app.change_current_account(self.app.get_account(account_name))
self.community_view.change_account(self.app.current_account)
self.password_asker = PasswordAskerDialog(self.app.current_account)
self.community_view.change_account(self.app.current_account, self.password_asker)
self.refresh()
@pyqtSlot()
......
......@@ -48,8 +48,9 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
# create node metadata from account
self._current_identity = None
def change_account(self, account):
def change_account(self, account, password_asker):
self.account = account
self.password_asker = password_asker
def change_community(self, community):
if self.community:
......
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