Skip to content

Commit 21b1920

Browse files
committed
bugfixing
1 parent 3a80501 commit 21b1920

File tree

8 files changed

+38
-10
lines changed

8 files changed

+38
-10
lines changed

src/status_im/keycard/login.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
[{:keys [db] :as cofx}]
1818
(fx/merge cofx
1919
{:db db}
20-
(navigation/navigate-to-cofx :multiaccounts nil)))
20+
(navigation/pop-to-root-tab :multiaccounts-stack)))
2121

2222
(fx/defn login-pin-more-icon-pressed
2323
{:events [:keycard.login.pin.ui/more-icon-pressed]}

src/status_im/multiaccounts/login/core.cljs

+4-3
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@
435435
(assoc-in [:keycard :pin :status] nil)
436436
(assoc-in [:keycard :pin :login] []))})
437437
#(if keycard-account?
438-
{:rnn-navigate-to-fx :keycard-login-pin}
438+
{:init-root-with-component-fx [:multiaccounts-keycard :multiaccounts]}
439439
{:init-root-fx :multiaccounts})))))
440440

441441
(fx/defn get-credentials
@@ -532,11 +532,12 @@
532532
[{:keys [db] :as cofx} key-uid]
533533
;; We specifically pass a bunch of fields instead of the whole multiaccount
534534
;; as we want store some fields in multiaccount that are not here
535-
(let [multiaccount (get-in db [:multiaccounts/multiaccounts key-uid])]
535+
(let [multiaccount (get-in db [:multiaccounts/multiaccounts key-uid])
536+
keycard-multiaccount? (boolean (:keycard-pairing multiaccount))]
536537
(fx/merge
537538
cofx
538539
{:db (update db :keycard dissoc :application-info)
539-
:rnn-navigate-to-fx :login}
540+
:rnn-navigate-to-fx (if keycard-multiaccount? :keycard-login-pin :login)}
540541
(open-login (select-keys multiaccount [:key-uid :name :public-key :identicon :images])))))
541542

542543
(fx/defn hide-keycard-banner

src/status_im/navigation.cljs

+5
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@
6666
[_ root-id]
6767
{:init-root-fx root-id})
6868

69+
(fx/defn init-root-with-component
70+
{:events [:init-root-with-component]}
71+
[_ root-id comp-id]
72+
{:init-root-with-component-fx [root-id comp-id]})
73+
6974
(fx/defn rnn-navigate-to
7075
{:events [:rnn-navigate-to]}
7176
[_ key]

src/status_im/navigation/core.cljs

+8-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,14 @@
149149
:init-root-fx
150150
(fn [new-root-id]
151151
(reset! root-comp-id new-root-id)
152-
(reset! root-id new-root-id)
152+
(reset! root-id @root-comp-id)
153+
(.setRoot Navigation (clj->js (get (roots/roots) new-root-id)))))
154+
155+
(re-frame/reg-fx
156+
:init-root-with-component-fx
157+
(fn [[new-root-id new-root-comp-id]]
158+
(reset! root-comp-id new-root-comp-id)
159+
(reset! root-id @root-comp-id)
153160
(.setRoot Navigation (clj->js (get (roots/roots) new-root-id)))))
154161

155162
(defonce rset-app-launched

src/status_im/navigation/roots.cljs

+12-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
(defn bottom-tab-general [icon accessibility]
2424
(merge
25-
{:accessibilityLabel accessibility
25+
{:testID accessibility
2626
:fontSize 11
2727
:icon (icons/icon-source icon)
2828
:badgeColor colors/blue
@@ -142,6 +142,17 @@
142142
:options (merge (default-root)
143143
{:topBar (topbar-options)})}}}
144144

145+
:multiaccounts-keycard
146+
{:root {:stack {:id :multiaccounts-stack
147+
:children [{:component {:name :multiaccounts
148+
:id :multiaccounts
149+
:options (get-screen-options :multiaccounts)}}
150+
{:component {:name :keycard-login-pin
151+
:id :keycard-login-pin
152+
:options (get-screen-options :keycard-login-pin)}}]
153+
:options (merge (default-root)
154+
{:topBar (topbar-options)})}}}
155+
145156
;;WELCOME
146157
:welcome
147158
{:root {:stack {:children [{:component {:name :welcome

src/status_im/popover/core.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
(fx/defn show-popover
55
{:events [:show-popover]}
6-
[{:keys [db]} value]
6+
[_ value]
77
{:rnn-show-popover nil
88
;;TODO refactor popover just start animation on mount
9-
:dispatch-later [{:ms 50 :dispatch [:show-popover-db value]}]
9+
:dispatch-later [{:ms 250 :dispatch [:show-popover-db value]}]
1010
:dismiss-keyboard nil})
1111

1212
(fx/defn show-popover-db

src/status_im/ui/screens/screens.cljs

+3
Original file line numberDiff line numberDiff line change
@@ -775,17 +775,20 @@
775775
;;KEYSTORAGE
776776
{:name :actions-not-logged-in
777777
;;TODO: topbar
778+
:insets {:bottom true}
778779
:options {:topBar {:visible false}}
779780
;;TODO move to popover?
780781
:component key-storage.views/actions-not-logged-in}
781782
{:name :actions-logged-in
782783
;;TODO: topbar
783784
:options {:topBar {:visible false}}
785+
:insets {:bottom true}
784786
;;TODO move to popover?
785787
:component key-storage.views/actions-logged-in}
786788
{:name :storage
787789
;;TODO: topbar
788790
:options {:topBar {:visible false}}
791+
:insets {:bottom true}
789792
;;TODO move to popover?
790793
:component key-storage.views/storage}]
791794

src/status_im/ui/screens/wallet/send/views.cljs

+3-2
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,16 @@
249249
:after :main-icon/next
250250
:disabled (not sign-enabled?)
251251
:on-press #(do
252+
(re-frame/dispatch [:navigate-back])
252253
(re-frame/dispatch
253254
[(cond
254255
request?
255256
:wallet.ui/sign-transaction-button-clicked-from-request
256257
from-chat?
257258
:wallet.ui/sign-transaction-button-clicked-from-chat
258259
:else
259-
:wallet.ui/sign-transaction-button-clicked) tx])
260-
(re-frame/dispatch [:navigate-back]))}
260+
:wallet.ui/sign-transaction-button-clicked) tx]))}
261+
261262
(if (and (not request?) from-chat? (not to-norm))
262263
(i18n/label :t/wallet-send)
263264
(i18n/label :t/next))]}]]])))

0 commit comments

Comments
 (0)