Skip to content

Commit 635273a

Browse files
authored
Merge branch 'develop' into 19188
2 parents 8ffe514 + 1d44472 commit 635273a

File tree

30 files changed

+115
-88
lines changed

30 files changed

+115
-88
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ STICKERS_TEST_ENABLED=1
3434
LOCAL_PAIRING_ENABLED=1
3535
TEST_STATEOFUS=1
3636
FAST_CREATE_COMMUNITY_ENABLED=1
37+
TEST_NETWORKS_ENABLED=1

.env.e2e

+1
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,4 @@ TWO_MINUTES_SYNCING=1
3333
STICKERS_TEST_ENABLED=1
3434
LOCAL_PAIRING_ENABLED=1
3535
FAST_CREATE_COMMUNITY_ENABLED=1
36+
TEST_NETWORKS_ENABLED=1

.env.jenkins

+1
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,4 @@ ENABLE_QUO_PREVIEW=1
3535
STICKERS_TEST_ENABLED=1
3636
LOCAL_PAIRING_ENABLED=1
3737
FAST_CREATE_COMMUNITY_ENABLED=1
38+
TEST_NETWORKS_ENABLED=1

.env.nightly

+1
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ COMMUNITIES_ENABLED=1
2222
DATABASE_MANAGEMENT_ENABLED=1
2323
DELETE_MESSAGE_ENABLED=1
2424
FAST_CREATE_COMMUNITY_ENABLED=0
25+
TEST_NETWORKS_ENABLED=0

.env.release

+1
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ MAX_IMAGES_BATCH=1
2020
DELETE_MESSAGE_ENABLED=1
2121
COLLECTIBLES_ENABLED=1
2222
FAST_CREATE_COMMUNITY_ENABLED=0
23+
TEST_NETWORKS_ENABLED=0

src/legacy/status_im/keycard/login.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
[{:keys [db] :as cofx}]
1919
(rf/merge cofx
2020
{:db db}
21-
(navigation/pop-to-root :profiles)))
21+
(navigation/pop-to-root :screen/profile.profiles)))
2222

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

src/legacy/status_im/keycard/recovery.cljs

+3-2
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
(assoc :recovered-account? true))
7575
:keycard/check-nfc-enabled nil}
7676
(bottom-sheet/hide-bottom-sheet-old)
77-
(navigation/navigate-to-within-stack [:keycard-recovery-intro :new-to-status])))
77+
(navigation/navigate-to-within-stack [:keycard-recovery-intro
78+
:screen/onboarding.new-to-status])))
7879

7980
(rf/defn access-key-pressed
8081
{:events [:multiaccounts.recover.ui/recover-multiaccount-button-pressed]}
@@ -127,7 +128,7 @@
127128
:multiaccount-whisper-public-key)}
128129
(navigation/navigate-to (if platform/android?
129130
:notifications-settings
130-
:welcome)
131+
:screen/onboarding.welcome)
131132
nil)))
132133

133134
(rf/defn intro-wizard

src/status_im/common/pairing/events.cljs

+7-6
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
multiaccount-data (when received-account?
3333
(merge account {:password password}))
3434
navigate-to-syncing-devices? (and (or connection-success? connection-error?) receiver?)
35-
user-in-syncing-devices-screen? (or (= (:view-id db) :syncing-progress)
36-
(= (:view-id db) :profiles)
37-
(= (:view-id db) :syncing-progress-intro))
38-
user-in-sign-in-intro-screen? (= (:view-id db) :sign-in-intro)]
35+
user-in-syncing-devices-screen? (or (= (:view-id db) :screen/onboarding.syncing-progress)
36+
(= (:view-id db) :screen/profile.profiles)
37+
(= (:view-id db) :screen/onboarding.syncing-progress-intro))
38+
user-in-sign-in-intro-screen? (= (:view-id db) :screen/onboarding.sign-in-intro)]
3939
(merge {:db (cond-> db
4040
connection-success?
4141
(assoc-in [:syncing :pairing-status] :connected)
@@ -51,8 +51,9 @@
5151
(cond
5252
(and navigate-to-syncing-devices? (not user-in-syncing-devices-screen?))
5353
{:dispatch (if user-in-sign-in-intro-screen?
54-
[:navigate-to-within-stack [:syncing-progress-intro :sign-in-intro]]
55-
[:navigate-to :syncing-progress])}
54+
[:navigate-to-within-stack
55+
[:screen/onboarding.syncing-progress-intro :screen/onboarding.sign-in-intro]]
56+
[:navigate-to :screen/onboarding.syncing-progress])}
5657

5758
(and completed-pairing? sender?)
5859
{:dispatch [:syncing/clear-states]}

src/status_im/common/universal_links.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
(and public-key (own-public-key? db public-key))
7676
(rf/merge cofx
7777
{:pop-to-root-fx :shell-stack}
78-
(navigation/navigate-to :my-profile nil))
78+
(navigation/navigate-to :settings nil))
7979

8080
public-key
8181
{:dispatch [:chat.ui/show-profile public-key ens-name]}))

src/status_im/config.cljs

+1
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,4 @@
169169

170170
(def community-accounts-selection-enabled? true)
171171
(def fetch-messages-enabled? (enabled? (get-config :FETCH_MESSAGES_ENABLED "1")))
172+
(def test-networks-enabled? (enabled? (get-config :TEST_NETWORKS_ENABLED "0")))

src/status_im/contexts/onboarding/common/background/view.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969

7070
(rn/use-effect
7171
(fn []
72-
(reanimated/set-shared-value @paused? (not= view-id :intro))
72+
(reanimated/set-shared-value @paused? (not= view-id :screen/onboarding.intro))
7373
(fn []
74-
(when (= view-id :generating-keys)
74+
(when (= view-id :screen/onboarding.generating-keys)
7575
(carousel.animation/cleanup-animation progress paused?))))
7676
[view-id])
7777

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

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
bio-type-label (biometric/get-label-by-type supported-biometric-type)
2929
profile-color (or (:color (rf/sub [:onboarding/profile]))
3030
(rf/sub [:profile/customization-color]))
31-
syncing-results? (= :syncing-results @state/root-id)]
31+
syncing-results? (= :screen/onboarding.syncing-results @state/root-id)]
3232
[rn/view {:style (style/buttons insets)}
3333
[quo/button
3434
{:size 40
@@ -43,7 +43,8 @@
4343
:type :grey
4444
:on-press #(rf/dispatch (if syncing-results?
4545
[:navigate-to-within-stack
46-
[:enable-notifications :enable-biometrics]]
46+
[:screen/onboarding.enable-notifications
47+
:screen/onboarding.enable-biometrics]]
4748
[:onboarding/create-account-and-login]))
4849
:container-style {:margin-top 12}}
4950
(i18n/label :t/maybe-later)]]))

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
:on-denied #(log/error "user denied push notification permissions")}])
3737
(rf/dispatch [:push-notifications/switch true platform/ios?])
3838
(rf/dispatch [:navigate-to-within-stack
39-
[:welcome :enable-notifications]]))
39+
[:screen/onboarding.welcome
40+
:screen/onboarding.enable-notifications]]))
4041
:type :primary
4142
:icon-left :i/notifications
4243
:accessibility-label :enable-notifications-button
@@ -46,7 +47,8 @@
4647
{:on-press (fn []
4748
(shell.utils/change-selected-stack-id :communities-stack true nil)
4849
(rf/dispatch [:navigate-to-within-stack
49-
[:welcome :enable-notifications]]))
50+
[:screen/onboarding.welcome
51+
:screen/onboarding.enable-notifications]]))
5052
:accessibility-label :enable-notifications-later-button
5153
:type :grey
5254
:background :blur

src/status_im/contexts/onboarding/events.cljs

+18-11
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
{:events [:onboarding/profile-data-set]}
2828
[{:keys [db]} onboarding-data]
2929
{: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]]})
3132

3233
(rf/defn enable-biometrics
3334
{:events [:onboarding/enable-biometrics]}
@@ -42,7 +43,8 @@
4243
[{:keys [db]}]
4344
(let [key-uid (get-in db [:profile/profile :key-uid])]
4445
{: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]]}))
4648

4749
(rf/defn biometrics-done
4850
{:events [:onboarding/biometrics-done]}
@@ -64,7 +66,8 @@
6466
(let [{:keys [display-name seed-phrase password image-path color] :as profile}
6567
(:onboarding/profile db)]
6668
(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]]
6871
:dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms
6972
:dispatch [:onboarding/navigate-to-identifiers]}]
7073
:db (-> db
@@ -82,7 +85,7 @@
8285
(merge
8386
{:db (assoc db :profile/profiles-overview multiaccounts)}
8487
(when-not (seq multiaccounts)
85-
{:set-root :intro}))))
88+
{:set-root :screen/onboarding.intro}))))
8689

8790
(rf/defn password-set
8891
{:events [:onboarding/password-set]}
@@ -92,16 +95,17 @@
9295
(assoc-in [:onboarding/profile :password] password)
9396
(assoc-in [:onboarding/profile :auth-method] constants/auth-method-password))
9497
: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]]
96100
[:onboarding/create-account-and-login])}))
97101

98102
(rf/defn navigate-to-enable-biometrics
99103
{:events [:onboarding/navigate-to-enable-biometrics]}
100104
[{:keys [db]}]
101105
(let [supported-type (get-in db [:biometrics :supported-type])]
102106
{: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])}))
105109

106110
(rf/defn seed-phrase-entered
107111
{:events [:onboarding/seed-phrase-entered]}
@@ -121,19 +125,21 @@
121125
:content (i18n/label :t/multiaccount-exists-content)
122126
:confirm-button-text (i18n/label :t/unlock)
123127
:on-accept (fn []
124-
(re-frame/dispatch [:pop-to-root :profiles])
128+
(re-frame/dispatch [:pop-to-root :screen/profile.profiles])
125129
(re-frame/dispatch
126130
[:profile/profile-selected key-uid]))
127131
:on-cancel #(re-frame/dispatch [:pop-to-root :multiaccounts])}}
128132
{: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]]}))
130135

131136
(rf/defn navigate-to-create-profile
132137
{:events [:onboarding/navigate-to-create-profile]}
133138
[{:keys [db]}]
134139
;; Restart the flow
135140
{: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]]})
137143

138144
(rf/reg-event-fx :onboarding/set-auth-method
139145
(fn [{:keys [db]} [auth-method]]
@@ -167,6 +173,7 @@
167173
{:events [:onboarding/navigate-to-identifiers]}
168174
[{:keys [db]}]
169175
(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]]}
171178
{:dispatch-later [{:ms constants/onboarding-generating-keys-navigation-retry-ms
172179
:dispatch [:onboarding/navigate-to-identifiers]}]}))

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@
6363
:type :grey
6464
:background :blur
6565
:on-press #(rf/dispatch [:navigate-to-within-stack
66-
[:enable-notifications :new-to-status]])
66+
[:screen/onboarding.enable-notifications
67+
:screen/onboarding.new-to-status]])
6768
:container-style style/button}
6869
(i18n/label :t/continue)]]]]))
6970

src/status_im/contexts/onboarding/intro/view.cljs

+5-4
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,18 @@
1919
(reset! scan-sync-code/dismiss-animations reset-top-animation-fn))
2020
:animations-duration constants/onboarding-modal-animation-duration
2121
:animations-delay constants/onboarding-modal-animation-delay
22-
:top-card {:on-press #(debounce/throttle-and-dispatch [:open-modal
23-
:sign-in-intro]
24-
2000)
22+
:top-card {:on-press #(debounce/throttle-and-dispatch
23+
[:open-modal
24+
:screen/onboarding.sign-in-intro]
25+
2000)
2526
:heading (i18n/label :t/sign-in)
2627
:animated-heading (i18n/label :t/sign-in-by-syncing)
2728
:accessibility-label :already-use-status-button}
2829
:bottom-card {:on-press (fn []
2930
(when-let [blur-show-fn @overlay/blur-show-fn-atom]
3031
(blur-show-fn))
3132
(debounce/throttle-and-dispatch
32-
[:open-modal :new-to-status]
33+
[:open-modal :screen/onboarding.new-to-status]
3334
1000))
3435
:heading (i18n/label :t/new-to-status)
3536
:accessibility-label :new-to-status-button}}

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@
4545
:title (i18n/label :t/use-recovery-phrase)
4646
:subtitle (i18n/label :t/use-recovery-phrase-subtitle)
4747
:image (resources/get-image :ethereum-address)
48-
:on-press #(rf/dispatch [:navigate-to-within-stack [:enter-seed-phrase :new-to-status]])}]
48+
:on-press #(rf/dispatch [:navigate-to-within-stack
49+
[:screen/onboarding.enter-seed-phrase
50+
:screen/onboarding.new-to-status]])}]
4951
[rn/view {:style style/space-between-suboptions}]
5052
[quo/small-option-card
5153
{:variant :icon

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,14 @@
3232
(rf/dispatch [:syncing/clear-states])
3333
(cond
3434
logged-in? (rf/dispatch [:navigate-back])
35-
in-onboarding? (rf/dispatch [:navigate-back-to :sign-in-intro])
35+
in-onboarding? (rf/dispatch [:navigate-back-to
36+
:screen/onboarding.sign-in-intro])
3637
:else (do
3738
(rf/dispatch [:navigate-back])
38-
(debounce/throttle-and-dispatch [:open-modal :sign-in]
39-
1000))))
39+
(debounce/throttle-and-dispatch
40+
[:open-modal
41+
:screen/onboarding.sign-in]
42+
1000))))
4043
:accessibility-label :try-again-later-button
4144
:customization-color profile-color
4245
:container-style style/try-again-button}

src/status_im/contexts/preview/quo/common.cljs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[{:keys [theme title]}]
1010
(let [logged-in? (rf/sub [:multiaccount/logged-in?])
1111
has-profiles? (boolean (rf/sub [:profile/profiles-overview]))
12-
root (if has-profiles? :profiles :intro)
12+
root (if has-profiles? :screen/profile.profiles :screen/onboarding.intro)
1313
light? (= theme :light)]
1414
[quo/page-nav
1515
{:type :title

src/status_im/contexts/profile/config.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@
4444
:networkId config/default-network-id
4545
:currentNetwork config/default-network
4646
:wakuV2LightClient false
47-
:previewPrivacy config/blank-preview?})))
47+
:previewPrivacy config/blank-preview?
48+
:testNetworksEnabled config/test-networks-enabled?})))
4849

4950
(defn strip-file-prefix
5051
[path]

src/status_im/contexts/profile/events.cljs

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@
4545
(assoc :profile/profiles-overview profiles)
4646
(update :profile/login #(select-profile % key-uid)))
4747
db)
48-
:fx [[:set-root :profiles]
48+
:fx [[:set-root :screen/profile.profiles]
4949
(when key-uid
5050
[:effects.biometric/check-if-available
5151
{:key-uid key-uid
5252
:on-success (fn [auth-method]
5353
(rf/dispatch [:profile.login/check-biometric-success key-uid
5454
auth-method]))}])]})
55-
{:fx [[:set-root :intro]]})))
55+
{:fx [[:set-root :screen/onboarding.intro]]})))
5656

5757
(rf/reg-event-fx
5858
:profile/update-setting-from-backup

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171

7272
(cond
7373
pairing-completed?
74-
[[:set-root :syncing-results]]
74+
[[:set-root :screen/onboarding.syncing-results]]
7575

7676
(get db :onboarding/new-account?)
7777
[[:dispatch [:onboarding/finalize-setup]]]

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,13 @@
5050
(when @push-animation-fn-atom
5151
(@push-animation-fn-atom))
5252
(debounce/throttle-and-dispatch
53-
[:open-modal :new-to-status]
53+
[:open-modal :screen/onboarding.new-to-status]
5454
1000))
5555
:accessibility-label :create-new-profile}
5656
{:icon :i/multi-profile
5757
:label (i18n/label :t/add-existing-status-profile)
5858
:on-press #(debounce/throttle-and-dispatch
59-
[:open-modal :sign-in]
59+
[:open-modal :screen/onboarding.sign-in]
6060
1000)
6161
:accessibility-label :multi-profile}]]])
6262

src/status_im/contexts/profile/settings/view.cljs

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@
5353
{:background :blur
5454
:icon-name :i/close
5555
:on-press #(rf/dispatch [:navigate-back])
56-
:right-side [{:icon-name :i/multi-profile :on-press #(rf/dispatch [:open-modal :sign-in])}
56+
:right-side [{:icon-name :i/multi-profile
57+
:on-press #(rf/dispatch [:open-modal :screen/onboarding.sign-in])}
5758
{:icon-name :i/qr-code
5859
:on-press #(debounce/throttle-and-dispatch [:open-modal :share-shell] 1000)}
5960
{:icon-name :i/share :on-press not-implemented/alert}]}]]

src/status_im/contexts/syncing/scan_sync_code/view.cljs

+3-3
Original file line numberDiff line numberDiff line change
@@ -301,8 +301,8 @@
301301
@camera-permission-granted?
302302
@preflight-check-passed?
303303
(some #{view-id}
304-
[:sign-in-intro
305-
:sign-in
304+
[:screen/onboarding.sign-in-intro
305+
:screen/onboarding.sign-in
306306
:scan-sync-code-page])
307307
(boolean (not-empty @qr-view-finder)))
308308
camera-ready-to-scan? (and (or (not animated?) @render-camera?)
@@ -326,7 +326,7 @@
326326
(when animated?
327327
(rn/use-effect
328328
(fn []
329-
(when (= view-id :sign-in-intro)
329+
(when (= view-id :screen/onboarding.sign-in-intro)
330330
(rn/hw-back-add-listener reset-animations-fn)
331331
#(rn/hw-back-remove-listener reset-animations-fn)))
332332
[view-id])

0 commit comments

Comments
 (0)