Skip to content

Commit a72ba25

Browse files
committed
rename onboarding 2
1 parent 3cd302b commit a72ba25

File tree

19 files changed

+69
-69
lines changed

19 files changed

+69
-69
lines changed

src/status_im/events.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136

137137
(rf/defn on-return-from-background
138138
[{:keys [db now] :as cofx}]
139-
(let [new-account? (get db :onboarding-2/new-account?)
139+
(let [new-account? (get db :onboarding/new-account?)
140140
app-in-background-since (get db :app-in-background-since)
141141
signed-up? (get-in db [:profile/profile :signed-up?])
142142
requires-bio-auth (and

src/status_im/transport/core.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
{:events [::messenger-started]}
4747
[{:keys [db] :as cofx} {:keys [mailservers] :as response}]
4848
(log/info "Messenger started")
49-
(let [new-account? (get db :onboarding-2/new-account?)]
49+
(let [new-account? (get db :onboarding/new-account?)]
5050
(rf/merge cofx
5151
{:db (-> db
5252
(assoc :messenger/started? true)

src/status_im/ui/screens/profile/user/views.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
key-uid]
208208
:as profile}
209209
@(re-frame/subscribe [:profile/profile-with-image])
210-
customization-color (or (:color @(re-frame/subscribe [:onboarding-2/profile]))
210+
customization-color (or (:color @(re-frame/subscribe [:onboarding/profile]))
211211
@(re-frame/subscribe [:profile/customization-color key-uid]))
212212
on-share #(re-frame/dispatch [:show-popover
213213
{:view :share-chat-key

src/status_im2/contexts/onboarding/create_password/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
same-password-length? #(and (seq @password)
129129
(= (count @password) (count @repeat-password)))]
130130
(fn []
131-
(let [{user-color :color} (rf/sub [:onboarding-2/profile])
131+
(let [{user-color :color} (rf/sub [:onboarding/profile])
132132
{:keys [long-enough?]
133133
:as validations} (password-validations @password)
134134
password-strength (calc-password-strength validations)
@@ -177,7 +177,7 @@
177177
{:disabled? (not meet-requirements?)
178178
:customization-color user-color
179179
:on-press #(rf/dispatch
180-
[:onboarding-2/password-set
180+
[:onboarding/password-set
181181
(security/mask-data @password)])}
182182
(i18n/label :t/password-creation-confirm)]]]]))))
183183

src/status_im2/contexts/onboarding/create_profile/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@
218218
:type :primary
219219
:customization-color @custom-color
220220
:on-press (fn []
221-
(rf/dispatch [:onboarding-2/profile-data-set
221+
(rf/dispatch [:onboarding/profile-data-set
222222
{:image-path @profile-pic
223223
:display-name @full-name
224224
:color @custom-color}]))
@@ -232,7 +232,7 @@
232232
(defn create-profile
233233
[]
234234
(let [{:keys [top]} (safe-area/get-insets)
235-
onboarding-profile-data (rf/sub [:onboarding-2/profile])]
235+
onboarding-profile-data (rf/sub [:onboarding/profile])]
236236
[:<>
237237
[:f> f-page
238238
{:navigation-bar-top top

src/status_im2/contexts/onboarding/enable_biometrics/view.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
[insets]
2828
(let [supported-biometric-type (rf/sub [:biometric/supported-type])
2929
bio-type-label (biometric/get-label-by-type supported-biometric-type)
30-
profile-color (or (:color (rf/sub [:onboarding-2/profile]))
30+
profile-color (or (:color (rf/sub [:onboarding/profile]))
3131
(rf/sub [:profile/customization-color]))
3232
syncing-results? (= :syncing-results @state/root-id)]
3333
[rn/view {:style (style/buttons insets)}
@@ -36,7 +36,7 @@
3636
:accessibility-label :enable-biometrics-button
3737
:icon-left :i/face-id
3838
:customization-color profile-color
39-
:on-press #(rf/dispatch [:onboarding-2/enable-biometrics])
39+
:on-press #(rf/dispatch [:onboarding/enable-biometrics])
4040
:button-label (i18n/label :t/biometric-enable-button {:bio-type-label bio-type-label})}]
4141
[quo/button
4242
{:accessibility-label :maybe-later-button
@@ -45,7 +45,7 @@
4545
:on-press #(rf/dispatch (if syncing-results?
4646
[:navigate-to-within-stack
4747
[:enable-notifications :enable-biometrics]]
48-
[:onboarding-2/create-account-and-login]))
48+
[:onboarding/create-account-and-login]))
4949
:container-style {:margin-top 12}}
5050
(i18n/label :t/maybe-later)]]))
5151

src/status_im2/contexts/onboarding/enable_notifications/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
(defn enable-notification-buttons
2222
[{:keys [insets]}]
23-
(let [profile-color (rf/sub [:onboarding-2/customization-color])]
23+
(let [profile-color (rf/sub [:onboarding/customization-color])]
2424
[rn/view {:style (style/buttons insets)}
2525
[quo/button
2626
{:on-press (fn []

src/status_im2/contexts/onboarding/enter_seed_phrase/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
(reset! seed-phrase new-phrase))
104104
on-submit (fn []
105105
(swap! seed-phrase clean-seed-phrase)
106-
(rf/dispatch [:onboarding-2/seed-phrase-entered
106+
(rf/dispatch [:onboarding/seed-phrase-entered
107107
(security/mask-data @seed-phrase)
108108
set-invalid-seed-phrase]))]
109109
(let [words-coll (mnemonic/passphrase->words @seed-phrase)

src/status_im2/contexts/onboarding/events.cljs

+38-38
Original file line numberDiff line numberDiff line change
@@ -24,57 +24,57 @@
2424
(on-success mnemonic keyUID)))))))
2525

2626
(rf/defn profile-data-set
27-
{:events [:onboarding-2/profile-data-set]}
27+
{:events [:onboarding/profile-data-set]}
2828
[{:keys [db]} onboarding-data]
29-
{:db (update db :onboarding-2/profile merge onboarding-data)
29+
{:db (update db :onboarding/profile merge onboarding-data)
3030
:dispatch [:navigate-to-within-stack [:create-profile-password :new-to-status]]})
3131

3232
(rf/defn enable-biometrics
33-
{:events [:onboarding-2/enable-biometrics]}
33+
{:events [:onboarding/enable-biometrics]}
3434
[_]
35-
{:biometric/authenticate {:on-success #(rf/dispatch [:onboarding-2/biometrics-done])
36-
:on-fail #(rf/dispatch [:onboarding-2/biometrics-fail %])}})
35+
{:biometric/authenticate {:on-success #(rf/dispatch [:onboarding/biometrics-done])
36+
:on-fail #(rf/dispatch [:onboarding/biometrics-fail %])}})
3737

3838
(rf/defn navigate-to-enable-notifications
39-
{:events [:onboarding-2/navigate-to-enable-notifications]}
39+
{:events [:onboarding/navigate-to-enable-notifications]}
4040
[{:keys [db]}]
4141
(let [key-uid (get-in db [:profile/profile :key-uid])]
42-
{:db (dissoc db :onboarding-2/profile)
42+
{:db (dissoc db :onboarding/profile)
4343
:dispatch [:navigate-to-within-stack [:enable-notifications :enable-biometrics]]}))
4444

4545
(rf/defn biometrics-done
46-
{:events [:onboarding-2/biometrics-done]}
46+
{:events [:onboarding/biometrics-done]}
4747
[{:keys [db]}]
48-
(let [syncing? (get-in db [:onboarding-2/profile :syncing?])]
49-
{:db (assoc-in db [:onboarding-2/profile :auth-method] constants/auth-method-biometric)
48+
(let [syncing? (get-in db [:onboarding/profile :syncing?])]
49+
{:db (assoc-in db [:onboarding/profile :auth-method] constants/auth-method-biometric)
5050
:dispatch (if syncing?
51-
[:onboarding-2/finalize-setup]
52-
[:onboarding-2/create-account-and-login])}))
51+
[:onboarding/finalize-setup]
52+
[:onboarding/create-account-and-login])}))
5353

5454
(rf/defn biometrics-fail
55-
{:events [:onboarding-2/biometrics-fail]}
55+
{:events [:onboarding/biometrics-fail]}
5656
[cofx code]
5757
(biometric/show-message cofx code))
5858

5959
(rf/defn create-account-and-login
60-
{:events [:onboarding-2/create-account-and-login]}
60+
{:events [:onboarding/create-account-and-login]}
6161
[{:keys [db] :as cofx}]
6262
(let [{:keys [display-name seed-phrase password image-path color] :as profile}
63-
(:onboarding-2/profile db)]
63+
(:onboarding/profile db)]
6464
(rf/merge cofx
6565
{:dispatch [:navigate-to-within-stack [:generating-keys :new-to-status]]
6666
:dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms
67-
:dispatch [:onboarding-2/navigate-to-identifiers]}]
67+
:dispatch [:onboarding/navigate-to-identifiers]}]
6868
:db (-> db
6969
(dissoc :profile/login)
7070
(dissoc :auth-method)
71-
(assoc :onboarding-2/new-account? true))}
71+
(assoc :onboarding/new-account? true))}
7272
(if seed-phrase
7373
(profile.recover/recover-profile-and-login profile)
7474
(profile.create/create-profile-and-login profile)))))
7575

7676
(rf/defn on-delete-profile-success
77-
{:events [:onboarding-2/on-delete-profile-success]}
77+
{:events [:onboarding/on-delete-profile-success]}
7878
[{:keys [db]} key-uid]
7979
(let [multiaccounts (dissoc (:profile/profiles-overview db) key-uid)]
8080
(merge
@@ -83,35 +83,35 @@
8383
{:set-root :intro}))))
8484

8585
(rf/defn password-set
86-
{:events [:onboarding-2/password-set]}
86+
{:events [:onboarding/password-set]}
8787
[{:keys [db]} password]
8888
(let [supported-type (:biometric/supported-type db)]
8989
{:db (-> db
90-
(assoc-in [:onboarding-2/profile :password] password)
91-
(assoc-in [:onboarding-2/profile :auth-method] constants/auth-method-password))
90+
(assoc-in [:onboarding/profile :password] password)
91+
(assoc-in [:onboarding/profile :auth-method] constants/auth-method-password))
9292
:dispatch (if supported-type
9393
[:navigate-to-within-stack [:enable-biometrics :new-to-status]]
94-
[:onboarding-2/create-account-and-login])}))
94+
[:onboarding/create-account-and-login])}))
9595

9696
(rf/defn navigate-to-enable-biometrics
97-
{:events [:onboarding-2/navigate-to-enable-biometrics]}
97+
{:events [:onboarding/navigate-to-enable-biometrics]}
9898
[{:keys [db]}]
9999
(let [supported-type (:biometric/supported-type db)]
100100
{:dispatch (if supported-type
101101
[:open-modal :enable-biometrics]
102102
[:open-modal :enable-notifications])}))
103103

104104
(rf/defn seed-phrase-entered
105-
{:events [:onboarding-2/seed-phrase-entered]}
105+
{:events [:onboarding/seed-phrase-entered]}
106106
[_ seed-phrase on-error]
107107
{:multiaccount/validate-mnemonic [seed-phrase
108108
(fn [mnemonic key-uid]
109-
(re-frame/dispatch [:onboarding-2/seed-phrase-validated
109+
(re-frame/dispatch [:onboarding/seed-phrase-validated
110110
mnemonic key-uid]))
111111
on-error]})
112112

113113
(rf/defn seed-phrase-validated
114-
{:events [:onboarding-2/seed-phrase-validated]}
114+
{:events [:onboarding/seed-phrase-validated]}
115115
[{:keys [db]} seed-phrase key-uid]
116116
(if (contains? (:profile/profiles-overview db) key-uid)
117117
{:utils/show-confirmation
@@ -123,25 +123,25 @@
123123
(re-frame/dispatch
124124
[:profile/profile-selected key-uid]))
125125
:on-cancel #(re-frame/dispatch [:pop-to-root :multiaccounts])}}
126-
{:db (assoc-in db [:onboarding-2/profile :seed-phrase] seed-phrase)
126+
{:db (assoc-in db [:onboarding/profile :seed-phrase] seed-phrase)
127127
:dispatch [:navigate-to-within-stack [:create-profile :new-to-status]]}))
128128

129129
(rf/defn navigate-to-create-profile
130-
{:events [:onboarding-2/navigate-to-create-profile]}
130+
{:events [:onboarding/navigate-to-create-profile]}
131131
[{:keys [db]}]
132132
;; Restart the flow
133-
{:db (dissoc db :onboarding-2/profile)
133+
{:db (dissoc db :onboarding/profile)
134134
:dispatch [:navigate-to-within-stack [:create-profile :new-to-status]]})
135135

136136
(rf/defn onboarding-new-account-finalize-setup
137-
{:events [:onboarding-2/finalize-setup]}
137+
{:events [:onboarding/finalize-setup]}
138138
[{:keys [db]}]
139-
(let [masked-password (get-in db [:onboarding-2/profile :password])
139+
(let [masked-password (get-in db [:onboarding/profile :password])
140140
key-uid (get-in db [:profile/profile :key-uid])
141-
syncing? (get-in db [:onboarding-2/profile :syncing?])
142-
biometric-enabled? (= (get-in db [:onboarding-2/profile :auth-method])
141+
syncing? (get-in db [:onboarding/profile :syncing?])
142+
biometric-enabled? (= (get-in db [:onboarding/profile :auth-method])
143143
constants/auth-method-biometric)]
144-
(cond-> {:db (assoc db :onboarding-2/generated-keys? true)}
144+
(cond-> {:db (assoc db :onboarding/generated-keys? true)}
145145
biometric-enabled?
146146
(assoc :keychain/save-password-and-auth-method
147147
{:key-uid key-uid
@@ -150,16 +150,16 @@
150150
(security/hash-masked-password masked-password))
151151
:on-success (fn []
152152
(if syncing?
153-
(rf/dispatch [:onboarding-2/navigate-to-enable-notifications])
153+
(rf/dispatch [:onboarding/navigate-to-enable-notifications])
154154
(log/error "successfully saved biometrics")))
155155
:on-error #(log/error "failed to save biometrics"
156156
{:key-uid key-uid
157157
:error %})}))))
158158

159159
(rf/defn navigate-to-identifiers
160-
{:events [:onboarding-2/navigate-to-identifiers]}
160+
{:events [:onboarding/navigate-to-identifiers]}
161161
[{:keys [db]}]
162-
(if (:onboarding-2/generated-keys? db)
162+
(if (:onboarding/generated-keys? db)
163163
{:dispatch [:navigate-to-within-stack [:identifiers :new-to-status]]}
164164
{:dispatch-later [{:ms constants/onboarding-generating-keys-navigation-retry-ms
165-
:dispatch [:onboarding-2/navigate-to-identifiers]}]}))
165+
:dispatch [:onboarding/navigate-to-identifiers]}]}))

src/status_im2/contexts/onboarding/identifiers/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
drag-amount (atom nil)
2929
{:keys [emoji-hash display-name compressed-key
3030
public-key]} (rf/sub [:profile/profile])
31-
{:keys [color]} (rf/sub [:onboarding-2/profile])
31+
{:keys [color]} (rf/sub [:onboarding/profile])
3232
photo-path (rf/sub [:chats/photo-path public-key])
3333
emoji-string (string/join emoji-hash)]
3434
(carousel.animation/use-initialize-animation progress paused? true is-dragging? drag-amount)

src/status_im2/contexts/onboarding/new_to_status/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
(* 2 56) ;; two other list items
3131
(* 2 16) ;; spacing between items
3232
220) ;; extra spacing (top bar)
33-
:on-press #(rf/dispatch [:onboarding-2/navigate-to-create-profile])}]
33+
:on-press #(rf/dispatch [:onboarding/navigate-to-create-profile])}]
3434
[rn/view {:style style/subtitle-container}
3535
[quo/text
3636
{:style style/subtitle

src/status_im2/contexts/onboarding/syncing/progress/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
(defn view
4040
[in-onboarding?]
4141
(let [pairing-status (rf/sub [:pairing/pairing-status])
42-
profile-color (:color (rf/sub [:onboarding-2/profile]))]
42+
profile-color (:color (rf/sub [:onboarding/profile]))]
4343
[rn/view {:style (style/page-container in-onboarding?)}
4444
(when-not in-onboarding? [background/view true])
4545
[quo/page-nav {:type :no-title :background :blur}]

src/status_im2/contexts/onboarding/syncing/results/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
{:on-press (fn []
5555
(when on-press
5656
(on-press))
57-
(rf/dispatch [:onboarding-2/navigate-to-enable-biometrics]))
57+
(rf/dispatch [:onboarding/navigate-to-enable-biometrics]))
5858
:accessibility-label :continue-button
5959
:customization-color profile-color
6060
:container-style style/continue-button}

src/status_im2/contexts/onboarding/welcome/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
(defn page-title
1616
[]
17-
(let [new-account? (rf/sub [:onboarding-2/new-account?])]
17+
(let [new-account? (rf/sub [:onboarding/new-account?])]
1818
[quo/text-combinations
1919
{:container-style {:margin-top 12 :margin-horizontal 20}
2020
:title (i18n/label (if new-account?
@@ -31,7 +31,7 @@
3131

3232
(defn view
3333
[]
34-
(let [profile-color (rf/sub [:onboarding-2/customization-color])
34+
(let [profile-color (rf/sub [:onboarding/customization-color])
3535
{:keys [status-type]} (rf/sub [:multiaccount/current-user-visibility-status])
3636
window (rf/sub [:dimensions/window])
3737
insets (safe-area/get-insets)]

src/status_im2/contexts/profile/login/events.cljs

+5-5
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@
5454
(let [{:keys [key-uid password]} (get-in db [:syncing :profile])
5555
masked-password (security/mask-data password)]
5656
{:db (-> db
57-
(assoc-in [:onboarding-2/profile :password] masked-password)
58-
(assoc-in [:onboarding-2/profile :syncing?] true))
57+
(assoc-in [:onboarding/profile :password] masked-password)
58+
(assoc-in [:onboarding/profile :syncing?] true))
5959
::login [key-uid password]}))
6060

6161
(rf/defn redirect-to-root
@@ -66,8 +66,8 @@
6666
{:db (dissoc db :syncing)
6767
:dispatch [:init-root :syncing-results]}
6868

69-
(get db :onboarding-2/new-account?)
70-
{:dispatch [:onboarding-2/finalize-setup]}
69+
(get db :onboarding/new-account?)
70+
{:dispatch [:onboarding/finalize-setup]}
7171

7272
:else
7373
(rf/merge
@@ -140,7 +140,7 @@
140140
(switcher-cards-store/fetch-switcher-cards-rpc))))
141141

142142
(rf/defn login-node-signal
143-
[{{:onboarding-2/keys [recovered-account? new-account?] :as db} :db :as cofx}
143+
[{{:onboarding/keys [recovered-account? new-account?] :as db} :db :as cofx}
144144
{:keys [settings account ensUsernames error]}]
145145
(log/debug "[signals] node.login" "error" error)
146146
(if error

src/status_im2/contexts/profile/profiles/view.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
key-uid
7878
(fn [result]
7979
(let [{:keys [error]} (transforms/json->clj result)]
80-
(rf/dispatch [:onboarding-2/on-delete-profile-success key-uid])
80+
(rf/dispatch [:onboarding/on-delete-profile-success key-uid])
8181
(log/info "profile deleted: error" error)))))}])
8282

8383
(defn show-confirmation

src/status_im2/contexts/profile/recover/events.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
{:events [:profile.recover/recover-and-login]}
1717
[{:keys [db]} {:keys [display-name password image-path color seed-phrase]}]
1818
{:db
19-
(assoc db :onboarding-2/recovered-account? true)
19+
(assoc db :onboarding/recovered-account? true)
2020

2121
::restore-profile-and-login
2222
(merge (profile.config/create)

src/status_im2/subs/onboarding.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
[re-frame.core :as re-frame]))
44

55
(re-frame/reg-sub
6-
:onboarding-2/customization-color
7-
:<- [:onboarding-2/profile]
6+
:onboarding/customization-color
7+
:<- [:onboarding/profile]
88
:<- [:profile/customization-color]
9-
:<- [:onboarding-2/new-account?]
9+
:<- [:onboarding/new-account?]
1010
(fn [[{:keys [color]} customization-color new-account?]]
1111
(if new-account?
1212
color

0 commit comments

Comments
 (0)