From cebe20a1526de2a60f085616e06fd086d5e68b88 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Thu, 9 Dec 2021 11:59:28 -0400 Subject: [PATCH] fix: ensure the contact name contains an ens name Fixes 4271 --- src/app_service/service/contacts/service.nim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app_service/service/contacts/service.nim b/src/app_service/service/contacts/service.nim index 568703da63..4c32255bac 100644 --- a/src/app_service/service/contacts/service.nim +++ b/src/app_service/service/contacts/service.nim @@ -121,7 +121,12 @@ QtObject: contact.blocked = false self.saveContact(contact) - status_contacts.addContact(contact.id, contact.name) + + var ensName = "" + if contact.name.endsWith(".eth"): + ensName = contact.name + + status_contacts.addContact(contact.id, ensName) self.events.emit(SIGNAL_CONTACT_ADDED, ContactAddedArgs(contact: contact)) proc rejectContactRequest*(self: Service, publicKey: string) =