File tree 5 files changed +30
-25
lines changed
5 files changed +30
-25
lines changed Original file line number Diff line number Diff line change
1
+ (ns status-im.common.parallax.blacklist
2
+ (:require
3
+ [native-module.core :as native-module]))
4
+
5
+ (def ^:private device-id (:device-id (native-module/get-device-model-info )))
6
+
7
+ (defn- get-model-code
8
+ [model]
9
+ (if-let [[_ code] (and model (re-find #"iPhone(\d +)" model))]
10
+ (js/parseInt code 10 )
11
+ 0 ))
12
+
13
+ (def ^:private minimum-device-code 11 )
14
+
15
+ (def blacklisted?
16
+ (-> device-id
17
+ get-model-code
18
+ (< minimum-device-code)))
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 4
4
[react-native.core :as rn]
5
5
[react-native.safe-area :as safe-area]
6
6
[status-im.common.biometric.events :as biometric]
7
+ [status-im.common.parallax.blacklist :as blacklist]
7
8
[status-im.common.parallax.view :as parallax]
8
- [status-im.common.parallax.whitelist :as whitelist]
9
9
[status-im.common.resources :as resources]
10
10
[status-im.contexts.onboarding.enable-biometrics.style :as style]
11
11
[status-im.navigation.state :as state]
71
71
(let [insets (safe-area/get-insets )]
72
72
[rn/view {:style (style/page-container insets)}
73
73
[page-title]
74
- (if whitelist/whitelisted ?
75
- [enable-biometrics-parallax ]
76
- [enable-biometrics-simple ])
74
+ (if blacklist/blacklisted ?
75
+ [enable-biometrics-simple ]
76
+ [enable-biometrics-parallax ])
77
77
[enable-biometrics-buttons insets]]))
78
78
79
79
(defn view
Original file line number Diff line number Diff line change 4
4
[react-native.core :as rn]
5
5
[react-native.platform :as platform]
6
6
[react-native.safe-area :as safe-area]
7
+ [status-im.common.parallax.blacklist :as blacklist]
7
8
[status-im.common.parallax.view :as parallax]
8
- [status-im.common.parallax.whitelist :as whitelist]
9
9
[status-im.common.resources :as resources]
10
10
[status-im.contexts.onboarding.enable-notifications.style :as style]
11
11
[status-im.contexts.shell.jump-to.utils :as shell.utils]
78
78
:icon-name :i/arrow-left
79
79
:on-press #(rf/dispatch [:navigate-back-within-stack :enable-biometrics ])}]
80
80
[page-title]]
81
- (if whitelist/whitelisted ?
82
- [enable-notifications-parallax ]
83
- [enable-notifications-simple ])
81
+ (if blacklist/blacklisted ?
82
+ [enable-notifications-simple ]
83
+ [enable-notifications-parallax ])
84
84
[enable-notification-buttons {:insets insets}]]))
85
85
86
86
(defn view
Original file line number Diff line number Diff line change 4
4
[react-native.core :as rn]
5
5
[react-native.reanimated :as reanimated]
6
6
[react-native.safe-area :as safe-area]
7
+ [status-im.common.parallax.blacklist :as blacklist]
7
8
[status-im.common.parallax.view :as parallax]
8
- [status-im.common.parallax.whitelist :as whitelist]
9
9
[status-im.common.resources :as resources]
10
10
[status-im.contexts.onboarding.generating-keys.style :as style]
11
11
[utils.i18n :as i18n]))
149
149
[]
150
150
(let [insets (safe-area/get-insets )]
151
151
[rn/view {:style (style/page-container insets)}
152
- (if whitelist/whitelisted ?
153
- [parallax -page insets]
154
- [:f> f-simple -page insets])]))
152
+ (if blacklist/blacklisted ?
153
+ [:f> f-simple -page insets]
154
+ [parallax -page insets])]))
155
155
156
156
(defn generating-keys
157
157
[]
You can’t perform that action at this time.
0 commit comments