File tree 8 files changed +38
-10
lines changed
8 files changed +38
-10
lines changed Original file line number Diff line number Diff line change 17
17
[{:keys [db] :as cofx}]
18
18
(fx/merge cofx
19
19
{:db db}
20
- (navigation/navigate -to-cofx :multiaccounts nil )))
20
+ (navigation/pop -to-root-tab :multiaccounts-stack )))
21
21
22
22
(fx/defn login-pin-more-icon-pressed
23
23
{:events [:keycard.login.pin.ui/more-icon-pressed ]}
Original file line number Diff line number Diff line change 435
435
(assoc-in [:keycard :pin :status ] nil )
436
436
(assoc-in [:keycard :pin :login ] []))})
437
437
#(if keycard-account?
438
- {:rnn-navigate-to- fx :keycard-login-pin }
438
+ {:init-root-with-component- fx [ :multiaccounts-keycard :multiaccounts ] }
439
439
{:init-root-fx :multiaccounts })))))
440
440
441
441
(fx/defn get-credentials
532
532
[{:keys [db] :as cofx} key-uid]
533
533
; ; We specifically pass a bunch of fields instead of the whole multiaccount
534
534
; ; 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))]
536
537
(fx/merge
537
538
cofx
538
539
{: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 ) }
540
541
(open-login (select-keys multiaccount [:key-uid :name :public-key :identicon :images ])))))
541
542
542
543
(fx/defn hide-keycard-banner
Original file line number Diff line number Diff line change 66
66
[_ root-id]
67
67
{:init-root-fx root-id})
68
68
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
+
69
74
(fx/defn rnn-navigate-to
70
75
{:events [:rnn-navigate-to ]}
71
76
[_ key]
Original file line number Diff line number Diff line change 149
149
:init-root-fx
150
150
(fn [new-root-id]
151
151
(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)
153
160
(.setRoot Navigation (clj->js (get (roots/roots ) new-root-id)))))
154
161
155
162
(defonce rset-app-launched
Original file line number Diff line number Diff line change 22
22
23
23
(defn bottom-tab-general [icon accessibility]
24
24
(merge
25
- {:accessibilityLabel accessibility
25
+ {:testID accessibility
26
26
:fontSize 11
27
27
:icon (icons/icon-source icon)
28
28
:badgeColor colors/blue
142
142
:options (merge (default-root )
143
143
{:topBar (topbar-options )})}}}
144
144
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
+
145
156
; ;WELCOME
146
157
:welcome
147
158
{:root {:stack {:children [{:component {:name :welcome
Original file line number Diff line number Diff line change 3
3
4
4
(fx/defn show-popover
5
5
{:events [:show-popover ]}
6
- [{ :keys [db]} value]
6
+ [_ value]
7
7
{:rnn-show-popover nil
8
8
; ;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]}]
10
10
:dismiss-keyboard nil })
11
11
12
12
(fx/defn show-popover-db
Original file line number Diff line number Diff line change 775
775
; ;KEYSTORAGE
776
776
{:name :actions-not-logged-in
777
777
; ;TODO: topbar
778
+ :insets {:bottom true }
778
779
:options {:topBar {:visible false }}
779
780
; ;TODO move to popover?
780
781
:component key-storage.views/actions-not-logged-in}
781
782
{:name :actions-logged-in
782
783
; ;TODO: topbar
783
784
:options {:topBar {:visible false }}
785
+ :insets {:bottom true }
784
786
; ;TODO move to popover?
785
787
:component key-storage.views/actions-logged-in}
786
788
{:name :storage
787
789
; ;TODO: topbar
788
790
:options {:topBar {:visible false }}
791
+ :insets {:bottom true }
789
792
; ;TODO move to popover?
790
793
:component key-storage.views/storage}]
791
794
Original file line number Diff line number Diff line change 249
249
:after :main-icon/next
250
250
:disabled (not sign-enabled?)
251
251
:on-press #(do
252
+ (re-frame/dispatch [:navigate-back ])
252
253
(re-frame/dispatch
253
254
[(cond
254
255
request?
255
256
:wallet.ui/sign-transaction-button-clicked-from-request
256
257
from-chat?
257
258
:wallet.ui/sign-transaction-button-clicked-from-chat
258
259
:else
259
- :wallet.ui/sign-transaction-button-clicked ) tx])
260
- ( re-frame/dispatch [ :navigate-back ]))}
260
+ :wallet.ui/sign-transaction-button-clicked ) tx]))}
261
+
261
262
(if (and (not request?) from-chat? (not to-norm))
262
263
(i18n/label :t/wallet-send )
263
264
(i18n/label :t/next ))]}]]])))
You can’t perform that action at this time.
0 commit comments