From 093f7de1aada6e4be06637acf2654bdbdc2a0049 Mon Sep 17 00:00:00 2001 From: Andrea Maria Piana Date: Wed, 30 Jan 2019 14:12:37 +0100 Subject: [PATCH] Disable pairing pop-up in e2e Signed-off-by: Anton Danchenko --- .env | 1 - .env.e2e | 2 +- .env.jenkins | 1 - .env.nightly | 1 - .env.nightly.staging.fleet | 1 - .env.prod | 1 - src/status_im/pairing/core.cljs | 15 ++++++++------- src/status_im/utils/config.cljs | 1 + 8 files changed, 10 insertions(+), 13 deletions(-) diff --git a/.env b/.env index 6bf5abf8f8..b5a6fc9a93 100644 --- a/.env +++ b/.env @@ -11,7 +11,6 @@ HARDWALLET_ENABLED=0 LOG_LEVEL_STATUS_GO=info LOG_LEVEL=debug MAILSERVER_CONFIRMATIONS_ENABLED=0 -PAIRING_ENABLED=1 PFS_ENCRYPTION_ENABLED=1 POW_TARGET=0.002 POW_TIME=1 diff --git a/.env.e2e b/.env.e2e index ee8619cf27..2f356dc683 100644 --- a/.env.e2e +++ b/.env.e2e @@ -8,7 +8,7 @@ GROUP_CHATS_ENABLED=1 LOG_LEVEL_STATUS_GO=info LOG_LEVEL=debug MAILSERVER_CONFIRMATIONS_ENABLED=0 -PAIRING_ENABLED=1 +PAIRING_POPUP_DISABLED=1 PFS_ENCRYPTION_ENABLED=1 POW_TARGET=0.002 POW_TIME=1 diff --git a/.env.jenkins b/.env.jenkins index 97c4d77f5c..bd755df1f6 100644 --- a/.env.jenkins +++ b/.env.jenkins @@ -11,7 +11,6 @@ LOG_LEVEL_STATUS_GO=info LOG_LEVEL=debug MAILSERVER_CONFIRMATIONS_ENABLED=0 MAINNET_WARNING_ENABLED=1 -PAIRING_ENABLED=1 PFS_ENCRYPTION_ENABLED=1 POW_TARGET=0.002 POW_TIME=1 diff --git a/.env.nightly b/.env.nightly index bdffc383b8..2ee19109f4 100644 --- a/.env.nightly +++ b/.env.nightly @@ -9,7 +9,6 @@ LOG_LEVEL_STATUS_GO=info LOG_LEVEL=debug MAILSERVER_CONFIRMATIONS_ENABLED=0 MAINNET_WARNING_ENABLED=1 -PAIRING_ENABLED=1 PFS_ENCRYPTION_ENABLED=1 POW_TARGET=0.002 POW_TIME=1 diff --git a/.env.nightly.staging.fleet b/.env.nightly.staging.fleet index 654d13a409..be7211b965 100644 --- a/.env.nightly.staging.fleet +++ b/.env.nightly.staging.fleet @@ -9,7 +9,6 @@ LOG_LEVEL_STATUS_GO=info LOG_LEVEL=debug MAILSERVER_CONFIRMATIONS_ENABLED=0 MAINNET_WARNING_ENABLED=1 -PAIRING_ENABLED=1 PFS_ENCRYPTION_ENABLED=1 POW_TARGET=0.002 POW_TIME=1 diff --git a/.env.prod b/.env.prod index 71d6581125..4725b68e0a 100644 --- a/.env.prod +++ b/.env.prod @@ -8,7 +8,6 @@ GROUP_CHATS_ENABLED=1 LOG_LEVEL_STATUS_GO= LOG_LEVEL=info MAINNET_WARNING_ENABLED=1 -PAIRING_ENABLED=1 PFS_ENCRYPTION_ENABLED=1 POW_TARGET=0.002 POW_TIME=1 diff --git a/src/status_im/pairing/core.cljs b/src/status_im/pairing/core.cljs index d25087127a..91012c272a 100644 --- a/src/status_im/pairing/core.cljs +++ b/src/status_im/pairing/core.cljs @@ -69,13 +69,14 @@ (navigation/navigate-to-cofx :installations nil))) (fx/defn prompt-user-on-new-installation [{:keys [db]}] - {:db (assoc-in db [:pairing/prompt-user-pop-up] true) - :ui/show-confirmation {:title (i18n/label :t/pairing-new-installation-detected-title) - :content (i18n/label :t/pairing-new-installation-detected-content) - :confirm-button-text (i18n/label :t/pairing-go-to-installation) - :cancel-button-text (i18n/label :t/cancel) - :on-cancel #(re-frame/dispatch [:pairing.ui/prompt-dismissed]) - :on-accept #(re-frame/dispatch [:pairing.ui/prompt-accepted])}}) + (when-not config/pairing-popup-disabled? + {:db (assoc-in db [:pairing/prompt-user-pop-up] true) + :ui/show-confirmation {:title (i18n/label :t/pairing-new-installation-detected-title) + :content (i18n/label :t/pairing-new-installation-detected-content) + :confirm-button-text (i18n/label :t/pairing-go-to-installation) + :cancel-button-text (i18n/label :t/cancel) + :on-cancel #(re-frame/dispatch [:pairing.ui/prompt-dismissed]) + :on-accept #(re-frame/dispatch [:pairing.ui/prompt-accepted])}})) (fx/defn upsert-installation [{:keys [db]} {:keys [installation-id] :as new-installation}] (let [old-installation (get-in db [:pairing/installations installation-id]) diff --git a/src/status_im/utils/config.cljs b/src/status_im/utils/config.cljs index 6cfd3488cf..bd99de77de 100644 --- a/src/status_im/utils/config.cljs +++ b/src/status_im/utils/config.cljs @@ -22,6 +22,7 @@ (def mailserver-confirmations-enabled? (enabled? (get-config :MAILSERVER_CONFIRMATIONS_ENABLED))) (def mainnet-warning-enabled? (enabled? (get-config :MAINNET_WARNING_ENABLED 0))) (def pfs-encryption-enabled? (enabled? (get-config :PFS_ENCRYPTION_ENABLED "0"))) +(def pairing-popup-disabled? (enabled? (get-config :PAIRING_POPUP_DISABLED "0"))) (def cached-webviews-enabled? (enabled? (get-config :CACHED_WEBVIEWS_ENABLED 0))) (def rn-bridge-threshold-warnings-enabled? (enabled? (get-config :RN_BRIDGE_THRESHOLD_WARNINGS 0))) (def extensions-enabled? (enabled? (get-config :EXTENSIONS 0)))