From c34ee4197178a8a7f230bd47c7aa85efb8eaa19d Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 23 Jun 2022 11:08:38 +0200 Subject: [PATCH] fix(@wallet): address input keep loading In case of a public key, the loader was always visible and an ephemeral notification was display but it should not Also, the show not found is disabled if there is no contact list being displayed --- src/app/modules/main/module.nim | 2 +- ui/imports/shared/controls/ContactsListAndSearch.qml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/modules/main/module.nim b/src/app/modules/main/module.nim index f8560cee4a..2989cbb9d3 100644 --- a/src/app/modules/main/module.nim +++ b/src/app/modules/main/module.nim @@ -707,7 +707,7 @@ method resolveENS*[T](self: Module[T], ensName: string, uuid: string, reason: st self.controller.resolveENS(ensName, uuid, reason) method resolvedENS*[T](self: Module[T], publicKey: string, address: string, uuid: string, reason: string) = - if(publicKey.len == 0): + if(reason.len > 0 and publicKey.len == 0): self.displayEphemeralNotification("Unexisting contact", "Wrong public key or ens name", "", false, EphemeralNotificationType.Default.int, "") return diff --git a/ui/imports/shared/controls/ContactsListAndSearch.qml b/ui/imports/shared/controls/ContactsListAndSearch.qml index abb5f210e9..4bf68a38e3 100644 --- a/ui/imports/shared/controls/ContactsListAndSearch.qml +++ b/ui/imports/shared/controls/ContactsListAndSearch.qml @@ -114,7 +114,7 @@ Item { ensUsername.text = ""; searchResults.pubKey = pubKey = ""; searchResults.address = ""; - searchResults.showProfileNotFoundMessage = true + searchResults.showProfileNotFoundMessage = root.showContactList } else { if (userProfile.pubKey === resolvedPubKey) { //% "Can't chat with yourself"