Skip to content

Commit

Permalink
issue1 and issue2
Browse files Browse the repository at this point in the history
  • Loading branch information
flexsurfer committed Jun 8, 2021
1 parent f4d1ef4 commit 73b9140
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 16 deletions.
7 changes: 3 additions & 4 deletions src/status_im/keycard/recovery.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@
(fx/merge cofx
{:db (-> db
(assoc-in [:keycard :setup-step] nil)
(dissoc :intro-wizard))}
(dissoc :intro-wizard))
:init-root-fx :onboarding-notification}
(multiaccounts.create/on-multiaccount-created
{:recovered (or recovered (get-in db [:intro-wizard :recovering?]))
:derived {constants/path-wallet-root-keyword
Expand All @@ -202,9 +203,7 @@
:keycard-paired-on paired-on
:chat-key whisper-private-key}
encryption-public-key
{})
;;TODO change this
(navigation/navigate-to-cofx :onboarding-notification nil)))))
{})))))

(fx/defn return-to-keycard-login
[{:keys [db] :as cofx}]
Expand Down
11 changes: 6 additions & 5 deletions src/status_im/multiaccounts/login/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@
(assoc-in [:multiaccount :multiaccounts/first-account] first-account?))
:init-root-fx :onboarding-notification
:dispatch-later [{:ms 2000 :dispatch [::initialize-wallet
accounts nil nil (:recovered multiaccount) true]}]}
accounts nil nil
(or (get db :recovered-account?) (:recovered multiaccount))
true]}]}
(finish-keycard-setup)
(transport/start-messenger)
(chat.loading/initialize-chats)
Expand Down Expand Up @@ -521,10 +523,9 @@
(fx/merge cofx
{:init-root-fx :chat-stack}
(when first-account?
(acquisition/create)))))
;(if config/metrics-enabled?))))
;(navigation/navigate-to :anon-metrics-opt-in {})))))
;(navigation/init-tabs)))))
(acquisition/create))
#(when config/metrics-enabled?
{:dispatch [:navigate-to :anon-metrics-opt-in]}))))

(fx/defn multiaccount-selected
{:events [:multiaccounts.login.ui/multiaccount-selected]}
Expand Down
5 changes: 2 additions & 3 deletions src/status_im/multiaccounts/recover/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@
;;TODO: fix circular dependency to remove dispatch here
{:dispatch [:recovery.ui/keycard-option-pressed]}
(fx/merge cofx
{:db (update db :intro-wizard assoc :step :create-code
:forward-action :multiaccounts.recover/enter-password-next-pressed)}
{:db (update db :intro-wizard assoc :step :create-code)}
(navigation/navigate-to-cofx :create-password nil)))))

(fx/defn re-encrypt-pressed
Expand All @@ -240,7 +239,7 @@
(fx/defn confirm-password-next-button-pressed
{:events [:multiaccounts.recover/enter-password-next-pressed]
:interceptors [(re-frame/inject-cofx :random-guid-generator)]}
[{:keys [db] :as cofx} {:keys [key-code]}]
[cofx key-code]
(store-multiaccount cofx key-code))

(fx/defn count-words
Expand Down
2 changes: 1 addition & 1 deletion src/status_im/ui/screens/multiaccounts/recover/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@
(re-frame/dispatch [:multiaccounts.recover/select-storage-next-pressed])

;; Enter password (need to wait for a moment for this to finish)
(re-frame/dispatch [:multiaccounts.recover/enter-password-next-pressed {:key-code "111111"}])))
(re-frame/dispatch [:multiaccounts.recover/enter-password-next-pressed "111111"])))
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
keep-keys-on-keycard? @(re-frame/subscribe [:delete-profile/keep-keys-on-keycard?])]
(when (and @text-input-ref error (not @password))
(.clear ^js @text-input-ref))
[react/view
{:style {:flex 1
:justify-content :space-between}}
[react/keyboard-avoiding-view {:style {:flex 1}}
[react/scroll-view {:style {:flex 1}}
[react/view {:style {:align-items :center}}
[quo/text {:weight :bold
Expand Down

0 comments on commit 73b9140

Please sign in to comment.