Skip to content

Commit

Permalink
[#10418] Can login to account just via tap upon it from Your keys view
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
  • Loading branch information
flexsurfer committed Apr 28, 2020
1 parent f73754a commit 0a4547e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/status_im/init/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
(fx/defn initialize-views
{:events [::initialize-view]}
[cofx {:keys [logout?]}]
(let [{{:multiaccounts/keys [multiaccounts] :as db} :db} cofx]
(let [{{:multiaccounts/keys [multiaccounts]} :db} cofx]
(when (and (seq multiaccounts) (not logout?))
(let [{:keys [key-uid public-key photo-path name]} (first (#(sort-by :last-sign-in > %) (vals multiaccounts)))]
(let [{:keys [key-uid public-key photo-path name]}
(first (sort-by :timestamp > (vals multiaccounts)))]
(multiaccounts.login/open-login cofx key-uid photo-path name public-key)))))

(fx/defn initialize-multiaccounts
Expand Down

0 comments on commit 0a4547e

Please sign in to comment.