show testfairy warning on startup (#1569)
This commit is contained in:
parent
1fe17305af
commit
a93cb0b1d1
|
@ -4,6 +4,7 @@
|
|||
(def android-sms-listener (js/require "react-native-android-sms-listener"))
|
||||
(def autolink (js/require "react-native-autolink"))
|
||||
(def camera (js/require "react-native-camera"))
|
||||
(def config (js/require "react-native-config"))
|
||||
;; TODO see https://github.com/rt2zz/react-native-contacts/issues/45
|
||||
(def contacts (js/require "react-native-contacts"))
|
||||
(def dialogs (js/require "react-native-dialogs"))
|
||||
|
|
|
@ -322,4 +322,8 @@
|
|||
:contract-creation "Contract Creation"
|
||||
|
||||
;:webview
|
||||
:web-view-error "oops, error"})
|
||||
:web-view-error "oops, error"
|
||||
|
||||
;;testfairy warning
|
||||
:testfairy-title "Warning!"
|
||||
:testfairy-message "You are using app installed from a nightly build. For testing purposes this build includes session recording if wifi connection is used, so all your interaction with app is saved (as video and log) and might be used by development team to investigate possible issues. Saved video/log do not include your passwords. Recording is done only if app is installed from a nightly build. Nothing is recorded if app is installed from PlayStore or TestFlight."})
|
||||
|
|
|
@ -30,7 +30,10 @@
|
|||
[status-im.constants :refer [console-chat-id]]
|
||||
[status-im.utils.instabug :as inst]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.js-dependencies :as dependencies]))
|
||||
[status-im.js-dependencies :as dependencies]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.i18n :as i18n]))
|
||||
|
||||
;;;; COFX
|
||||
|
||||
|
@ -93,6 +96,14 @@
|
|||
(fn [[permissions then else]]
|
||||
(permissions/request-permissions permissions then else)))
|
||||
|
||||
(reg-fx
|
||||
::testfairy-alert
|
||||
(fn []
|
||||
(when config/testfairy-enabled?
|
||||
(utils/show-popup
|
||||
(i18n/label :testfairy-title)
|
||||
(i18n/label :testfairy-message)))))
|
||||
|
||||
;;;; Handlers
|
||||
|
||||
(register-handler-db
|
||||
|
@ -108,12 +119,13 @@
|
|||
(register-handler-fx
|
||||
:initialize-app
|
||||
(fn [_ _]
|
||||
{:dispatch-n [[:initialize-db]
|
||||
[:load-accounts]
|
||||
[:check-console-chat]
|
||||
[:listen-to-network-status!]
|
||||
[:initialize-crypt]
|
||||
[:initialize-geth]]}))
|
||||
{::testfairy-alert nil
|
||||
:dispatch-n [[:initialize-db]
|
||||
[:load-accounts]
|
||||
[:check-console-chat]
|
||||
[:listen-to-network-status!]
|
||||
[:initialize-crypt]
|
||||
[:initialize-geth]]}))
|
||||
|
||||
(register-handler-fx
|
||||
:initialize-db
|
||||
|
@ -252,4 +264,4 @@
|
|||
(register-handler-db
|
||||
:update-geolocation
|
||||
(fn [db [_ geolocation]]
|
||||
(assoc db :geolocation geolocation)))
|
||||
(assoc db :geolocation geolocation)))
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
(ns status-im.utils.config
|
||||
(:require [status-im.react-native.js-dependencies :as rn-dependencies]))
|
||||
|
||||
(def config (js->clj (.-default rn-dependencies/config) :keywordize-keys true))
|
||||
|
||||
(defn get-config [k]
|
||||
(get config k))
|
||||
|
||||
(def testfairy-enabled? (= "1" (get-config :TESTFAIRY_ENABLED)))
|
|
@ -3,6 +3,7 @@
|
|||
(def action-button #js {})
|
||||
(def android-sms-listener #js {})
|
||||
(def autolink #js {:default #js {}})
|
||||
(def config #js {:default #js {}})
|
||||
(def camera #js {:constants #js {}})
|
||||
(def circle-checkbox #js {})
|
||||
(def contacts #js {})
|
||||
|
|
Loading…
Reference in New Issue