Skip to content
Snippets Groups Projects
Commit 94412310 authored by Vincent Texier's avatar Vincent Texier
Browse files

Wot can now display non member searched in the combo box, to certify them

Fix bug community combo in certification dialog not on current community
parent 2d989fa6
No related branches found
No related tags found
No related merge requests found
......@@ -54,14 +54,32 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
:param public_key: Public key of the identity
"""
# reset graph
graph = dict()
try:
certifiers = self.community.request(bma.wot.CertifiersOf, {'search': public_key})
except ValueError as e:
logging.debug('bma.wot.CertifiersOf request error : ' + str(e))
return False
try:
results = self.community.request(bma.wot.Lookup, {'search': public_key})
except ValueError as e:
logging.debug('bma.wot.CertifiersOf request error : ' + str(e))
return False
# show only node of this non member (to certify him)
node_status = 0
if public_key == self.account.pubkey:
node_status += NODE_STATUS_HIGHLIGHTED
node_status += NODE_STATUS_OUT
node_status += NODE_STATUS_SELECTED
# reset graph
graph = dict()
# selected node
graph[public_key] = {'id': public_key, 'arcs': list(), 'text': results['results'][0]['uids'][0]['uid'], 'tooltip': public_key, 'status': node_status}
# draw graph in qt scene
self.graphicsView.scene().update_wot(graph)
return False
# add wallet node
node_status = 0
......@@ -215,6 +233,7 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
def sign_node(self, metadata):
# open certify dialog
dialog = CertificationDialog(self.account, self.password_asker)
dialog.combo_community.setCurrentText(self.community.name())
dialog.edit_pubkey.setText(metadata['id'])
dialog.radio_pubkey.setChecked(True)
dialog.exec_()
......
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