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

Fixed bug in add_contact actions

parent e7501093
No related branches found
No related tags found
No related merge requests found
......@@ -100,7 +100,8 @@ class CommunityTabWidget(QWidget, Ui_CommunityTabWidget):
def menu_add_as_contact(self):
person = self.sender().data()
self.add_member_as_contact(person)
self.add_member_as_contact({'name': person.uid,
'pubkey': person.pubkey})
def menu_send_money(self):
person = self.sender().data()
......
......@@ -166,10 +166,11 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
def add_node_as_contact(self, metadata):
# check if contact already exists...
if metadata['id'] == self.account.pubkey or metadata['id'] in [contact.pubkey for contact in self.account.contacts]:
if metadata['id'] == self.account.pubkey \
or metadata['id'] in [contact['pubkey'] for contact in self.account.contacts]:
return False
person = Person.from_metadata(metadata)
self.parent.add_member_as_contact(person)
self.parent.add_member_as_contact({'name': metadata['text'],
'pubkey': metadata['id']})
def get_block_mediantime(self, number):
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment