From aa4bf1f26bce8d26ee445e677d21d297be519e62 Mon Sep 17 00:00:00 2001 From: Vitaliy Vlasov Date: Fri, 30 Aug 2019 12:05:29 +0300 Subject: [PATCH] Use :multiaccount instead of :multiaccounts/multiaccounts when looking through candidate public keys Signed-off-by: Vitaliy Vlasov --- src/status_im/notifications/core.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/status_im/notifications/core.cljs b/src/status_im/notifications/core.cljs index 1c55efe493..b8ea082aac 100644 --- a/src/status_im/notifications/core.cljs +++ b/src/status_im/notifications/core.cljs @@ -91,12 +91,13 @@ (defn lookup-contact-pubkey-from-hash [{:keys [db] :as cofx} contact-pubkey-or-hash] "Tries to deanonymize a given contact pubkey hash by looking up the - full pubkey (if db is unlocked) in :contacts/contacts. + full pubkey (if db is unlocked) in :multiaccount and, if not found, + in :contacts/contacts. Returns original value if not a hash (e.g. already a public key)." (if (and contact-pubkey-or-hash (= (count contact-pubkey-or-hash) pn-pubkey-hash-length)) (if-let [multiaccount-pubkey (hash->pubkey contact-pubkey-or-hash - (-> db :multiaccounts/multiaccounts vals))] + [(:multiaccount db)])] multiaccount-pubkey (if (multiaccounts.model/logged-in? cofx) ;; TODO: for simplicity we're doing a linear lookup of the contacts,