diff --git a/.env b/.env index 6c8e5355d8..971e63785c 100644 --- a/.env +++ b/.env @@ -1,5 +1,4 @@ TESTFAIRY_ENABLED=0 -NOTIFICATIONS_WIP_ENABLED=1 STUB_STATUS_GO=0 ETHEREUM_DEV_CLUSTER=1 MAINNET_NETWORKS_ENABLED=1 diff --git a/.env.jenkins b/.env.jenkins index ebc9069546..38fa94b86e 100644 --- a/.env.jenkins +++ b/.env.jenkins @@ -1,5 +1,4 @@ TESTFAIRY_ENABLED=1 -NOTIFICATIONS_WIP_ENABLED=1 STUB_STATUS_GO=0 ETHEREUM_DEV_CLUSTER=1 MAINNET_NETWORKS_ENABLED=1 diff --git a/.env.prod b/.env.prod index 6f717ddd0e..18f4650c3f 100644 --- a/.env.prod +++ b/.env.prod @@ -1,5 +1,4 @@ TESTFAIRY_ENABLED=0 -NOTIFICATIONS_WIP_ENABLED=1 STUB_STATUS_GO=0 ETHEREUM_DEV_CLUSTER=0 MAINNET_NETWORKS_ENABLED=0 diff --git a/Jenkinsfile.parameters b/Jenkinsfile.parameters index 7194bdc326..0db0f24724 100644 --- a/Jenkinsfile.parameters +++ b/Jenkinsfile.parameters @@ -38,7 +38,6 @@ node ('macos1') { // TODO(oskarth): Consider read/write from .env to avoid having to specify in Jenkins again // sh 'cp .env.jenkins .env' sh 'echo TESTFAIRY_ENABLED=' + TESTFAIRY_ENABLED + '>>' + '.env' - sh 'echo NOTIFICATIONS_WIP_ENABLED=' + NOTIFICATIONS_WIP_ENABLED + '>>' + '.env' sh 'echo STUB_STATUS_GO=' + STUB_STATUS_GO + '>>' + '.env' sh 'echo ETHEREUM_DEV_CLUSTER=' + ETHEREUM_DEV_CLUSTER + '>>' + '.env' sh 'echo MAINNET_NETWORKS_ENABLED=' + MAINNET_NETWORKS_ENABLED + '>>' + '.env' diff --git a/src/status_im/android/core.cljs b/src/status_im/android/core.cljs index d407e2c293..444dd6dace 100644 --- a/src/status_im/android/core.cljs +++ b/src/status_im/android/core.cljs @@ -68,10 +68,9 @@ (.addEventListener react/app-state "change" app-state-change-handler)) :component-did-mount (fn [] - (when config/notifications-wip-enabled? - (notifications/on-refresh-fcm-token) - ;; TODO(oskarth): Background click_action handler - (notifications/on-notification))) + (notifications/on-refresh-fcm-token) + ;; TODO(oskarth): Background click_action handler + (notifications/on-notification)) :component-will-unmount (fn [] (.stop react/http-bridge) diff --git a/src/status_im/chat/events/send_message.cljs b/src/status_im/chat/events/send_message.cljs index bcd03fc7e5..8bf065a713 100644 --- a/src/status_im/chat/events/send_message.cljs +++ b/src/status_im/chat/events/send_message.cljs @@ -68,8 +68,7 @@ :user-message (cond-> {::send-message (assoc-in message-to-send [:message :to] to)} - (and fcm-token config/notifications-wip-enabled?) - (assoc ::send-notification fcm-token)))))))) + fcm-token (assoc ::send-notification fcm-token)))))))) (defn prepare-message [{:keys [db now random-id get-last-clock-value] :as cofx} diff --git a/src/status_im/ios/core.cljs b/src/status_im/ios/core.cljs index 010dee360f..975a2733b1 100644 --- a/src/status_im/ios/core.cljs +++ b/src/status_im/ios/core.cljs @@ -43,10 +43,9 @@ (.hide react/splash-screen)) :component-did-mount (fn [] - (when config/notifications-wip-enabled? - (notifications/request-permissions) - (notifications/on-refresh-fcm-token) - (notifications/on-notification))) + (notifications/request-permissions) + (notifications/on-refresh-fcm-token) + (notifications/on-notification)) :component-will-unmount (fn [] (.stop react/http-bridge)) diff --git a/src/status_im/utils/config.cljs b/src/status_im/utils/config.cljs index 15dc5c150d..8d9f5d6d2e 100644 --- a/src/status_im/utils/config.cljs +++ b/src/status_im/utils/config.cljs @@ -16,12 +16,10 @@ ;; ;; TESTFAIRY_ENABLED - indefinite ;; STUB_STATUS_GO - indefinite -;; NOTIFICATIONS_WIP_ENABLED - in 0.9.12 release, remove in develop if all goes well ;; ERC20_ENABLED - until idea #3 is merged, remove in develop when ready ;; OFFLINE_INBOX_ENABLED - TBD, tenatively until #idea 1 is merged (def testfairy-enabled? (enabled? (get-config :TESTFAIRY_ENABLED))) -(def notifications-wip-enabled? (enabled? (get-config :NOTIFICATIONS_WIP_ENABLED 0))) (def stub-status-go? (enabled? (get-config :STUB_STATUS_GO 0))) (def mainnet-networks-enabled? (enabled? (get-config :MAINNET_NETWORKS_ENABLED 0))) (def erc20-enabled? (enabled? (get-config :ERC20_ENABLED 0))) diff --git a/src/status_im/utils/notifications.cljs b/src/status_im/utils/notifications.cljs index 22bbee41a0..fd9efb025e 100644 --- a/src/status_im/utils/notifications.cljs +++ b/src/status_im/utils/notifications.cljs @@ -22,9 +22,8 @@ (defn get-fcm-token [] (-> (.getFCMToken (aget rn/react-native-fcm "default")) (.then (fn [x] - (when config/notifications-wip-enabled? - (log/debug "get-fcm-token: " x) - (dispatch [:update-fcm-token x])))))) + (log/debug "get-fcm-token: " x) + (dispatch [:update-fcm-token x]))))) (defn on-refresh-fcm-token [] (.on (.-default rn/react-native-fcm)