diff --git a/src/app/chat/view.nim b/src/app/chat/view.nim index 0a5b2b8faf..0f514d9595 100644 --- a/src/app/chat/view.nim +++ b/src/app/chat/view.nim @@ -433,9 +433,6 @@ QtObject: proc formatENSUsername*(self: ChatsView, username: string): string {.slot.} = result = status_ens.addDomain(username) - proc generateIdenticon*(self: ChatsView, pk: string): string {.slot.} = - result = status_accounts.generateIdenticon(pk) - # Resolving a ENS name proc resolveENS*(self: ChatsView, ens: string) {.slot.} = spawnAndSend(self, "ensResolved") do: # Call self.ensResolved(string) when ens is resolved diff --git a/src/app/utilsView/view.nim b/src/app/utilsView/view.nim index fa36718215..a169c465fc 100644 --- a/src/app/utilsView/view.nim +++ b/src/app/utilsView/view.nim @@ -1,6 +1,7 @@ import NimQml, os, strformat, strutils, parseUtils, chronicles import stint import ../../status/status +import ../../status/accounts as status_accounts import ../../status/stickers import ../../status/libstatus/accounts/constants as accountConstants import ../../status/libstatus/tokens @@ -88,3 +89,5 @@ QtObject: weiValue = fromHex(Stuint[256], weiValue).toString() return status_utils.wei2Eth(weiValue, decimals) + proc generateIdenticon*(self: UtilsView, pk: string): string {.slot.} = + result = status_accounts.generateIdenticon(pk) diff --git a/ui/app/AppLayouts/Browser/BrowserLayout.qml b/ui/app/AppLayouts/Browser/BrowserLayout.qml index a09120b9ee..675b7e961e 100644 --- a/ui/app/AppLayouts/Browser/BrowserLayout.qml +++ b/ui/app/AppLayouts/Browser/BrowserLayout.qml @@ -173,7 +173,7 @@ Rectangle { }, selectedRecipient: { address: request.payload.params[0].to, - identicon: chatsModel.generateIdenticon(request.payload.params[0].to), + identicon: utilsModel.generateIdenticon(request.payload.params[0].to), name: chatsModel.activeChannel.name, type: RecipientSelector.Type.Address }, diff --git a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml index 843bd4c6b5..1f73774ea2 100644 --- a/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml +++ b/ui/app/AppLayouts/Chat/ChatColumn/MessageComponents/ChatText.qml @@ -50,7 +50,7 @@ Item { if (link.startsWith('//')) { let pk = link.replace("//", ""); - openProfilePopup(chatsModel.userNameOrAlias(pk), pk, chatsModel.generateIdenticon(pk)) + openProfilePopup(chatsModel.userNameOrAlias(pk), pk, utilsModel.generateIdenticon(pk)) return; }