|
27 | 27 | {:events [:onboarding/profile-data-set]}
|
28 | 28 | [{:keys [db]} onboarding-data]
|
29 | 29 | {:db (update db :onboarding/profile merge onboarding-data)
|
30 |
| - :dispatch [:navigate-to-within-stack [:create-profile-password :new-to-status]]}) |
| 30 | + :dispatch [:navigate-to-within-stack |
| 31 | + [:screen/onboarding.create-profile-password :screen/onboarding.new-to-status]]}) |
31 | 32 |
|
32 | 33 | (rf/defn enable-biometrics
|
33 | 34 | {:events [:onboarding/enable-biometrics]}
|
|
42 | 43 | [{:keys [db]}]
|
43 | 44 | (let [key-uid (get-in db [:profile/profile :key-uid])]
|
44 | 45 | {:db (dissoc db :onboarding/profile)
|
45 |
| - :dispatch [:navigate-to-within-stack [:enable-notifications :enable-biometrics]]})) |
| 46 | + :dispatch [:navigate-to-within-stack |
| 47 | + [:screen/onboarding.enable-notifications :screen/onboarding.enable-biometrics]]})) |
46 | 48 |
|
47 | 49 | (rf/defn biometrics-done
|
48 | 50 | {:events [:onboarding/biometrics-done]}
|
|
64 | 66 | (let [{:keys [display-name seed-phrase password image-path color] :as profile}
|
65 | 67 | (:onboarding/profile db)]
|
66 | 68 | (rf/merge cofx
|
67 |
| - {:dispatch [:navigate-to-within-stack [:generating-keys :new-to-status]] |
| 69 | + {:dispatch [:navigate-to-within-stack |
| 70 | + [:screen/onboarding.generating-keys :screen/onboarding.new-to-status]] |
68 | 71 | :dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms
|
69 | 72 | :dispatch [:onboarding/navigate-to-identifiers]}]
|
70 | 73 | :db (-> db
|
|
82 | 85 | (merge
|
83 | 86 | {:db (assoc db :profile/profiles-overview multiaccounts)}
|
84 | 87 | (when-not (seq multiaccounts)
|
85 |
| - {:set-root :intro})))) |
| 88 | + {:set-root :screen/onboarding.intro})))) |
86 | 89 |
|
87 | 90 | (rf/defn password-set
|
88 | 91 | {:events [:onboarding/password-set]}
|
|
92 | 95 | (assoc-in [:onboarding/profile :password] password)
|
93 | 96 | (assoc-in [:onboarding/profile :auth-method] constants/auth-method-password))
|
94 | 97 | :dispatch (if supported-type
|
95 |
| - [:navigate-to-within-stack [:enable-biometrics :new-to-status]] |
| 98 | + [:navigate-to-within-stack |
| 99 | + [:screen/onboarding.enable-biometrics :screen/onboarding.new-to-status]] |
96 | 100 | [:onboarding/create-account-and-login])}))
|
97 | 101 |
|
98 | 102 | (rf/defn navigate-to-enable-biometrics
|
99 | 103 | {:events [:onboarding/navigate-to-enable-biometrics]}
|
100 | 104 | [{:keys [db]}]
|
101 | 105 | (let [supported-type (get-in db [:biometrics :supported-type])]
|
102 | 106 | {:dispatch (if supported-type
|
103 |
| - [:open-modal :enable-biometrics] |
104 |
| - [:open-modal :enable-notifications])})) |
| 107 | + [:open-modal :screen/onboarding.enable-biometrics] |
| 108 | + [:open-modal :screen/onboarding.enable-notifications])})) |
105 | 109 |
|
106 | 110 | (rf/defn seed-phrase-entered
|
107 | 111 | {:events [:onboarding/seed-phrase-entered]}
|
|
121 | 125 | :content (i18n/label :t/multiaccount-exists-content)
|
122 | 126 | :confirm-button-text (i18n/label :t/unlock)
|
123 | 127 | :on-accept (fn []
|
124 |
| - (re-frame/dispatch [:pop-to-root :profiles]) |
| 128 | + (re-frame/dispatch [:pop-to-root :screen/profile.profiles]) |
125 | 129 | (re-frame/dispatch
|
126 | 130 | [:profile/profile-selected key-uid]))
|
127 | 131 | :on-cancel #(re-frame/dispatch [:pop-to-root :multiaccounts])}}
|
128 | 132 | {:db (assoc-in db [:onboarding/profile :seed-phrase] seed-phrase)
|
129 |
| - :dispatch [:navigate-to-within-stack [:create-profile :new-to-status]]})) |
| 133 | + :dispatch [:navigate-to-within-stack |
| 134 | + [:screen/onboarding.create-profile :screen/onboarding.new-to-status]]})) |
130 | 135 |
|
131 | 136 | (rf/defn navigate-to-create-profile
|
132 | 137 | {:events [:onboarding/navigate-to-create-profile]}
|
133 | 138 | [{:keys [db]}]
|
134 | 139 | ;; Restart the flow
|
135 | 140 | {:db (dissoc db :onboarding/profile)
|
136 |
| - :dispatch [:navigate-to-within-stack [:create-profile :new-to-status]]}) |
| 141 | + :dispatch [:navigate-to-within-stack |
| 142 | + [:screen/onboarding.create-profile :screen/onboarding.new-to-status]]}) |
137 | 143 |
|
138 | 144 | (rf/reg-event-fx :onboarding/set-auth-method
|
139 | 145 | (fn [{:keys [db]} [auth-method]]
|
|
167 | 173 | {:events [:onboarding/navigate-to-identifiers]}
|
168 | 174 | [{:keys [db]}]
|
169 | 175 | (if (:onboarding/generated-keys? db)
|
170 |
| - {:dispatch [:navigate-to-within-stack [:identifiers :new-to-status]]} |
| 176 | + {:dispatch [:navigate-to-within-stack |
| 177 | + [:screen/onboarding.identifiers :screen/onboarding.new-to-status]]} |
171 | 178 | {:dispatch-later [{:ms constants/onboarding-generating-keys-navigation-retry-ms
|
172 | 179 | :dispatch [:onboarding/navigate-to-identifiers]}]}))
|
0 commit comments