parent
67aa733736
commit
aa28678188
|
@ -222,7 +222,8 @@
|
||||||
:device-type (:deviceType metadata))})
|
:device-type (:deviceType metadata))})
|
||||||
|
|
||||||
|
|
||||||
(defn should-show-syncing-pop-up? [db installations]
|
(defn should-show-syncing-pop-up?
|
||||||
|
[db installations]
|
||||||
(and (:syncing/pairing-process-initiated? db)
|
(and (:syncing/pairing-process-initiated? db)
|
||||||
(first (filter #(not (get-in db [:pairing/installations (:id %)])) installations))))
|
(first (filter #(not (get-in db [:pairing/installations (:id %)])) installations))))
|
||||||
|
|
||||||
|
@ -236,7 +237,8 @@
|
||||||
%
|
%
|
||||||
installations))
|
installations))
|
||||||
:fx [(when-let [new-installation (should-show-syncing-pop-up? db installations)]
|
:fx [(when-let [new-installation (should-show-syncing-pop-up? db installations)]
|
||||||
[:dispatch [:show-bottom-sheet {:content (fn [] [new-device-sheet/view (:id new-installation)])}]])]})
|
[:dispatch
|
||||||
|
[:show-bottom-sheet {:content (fn [] [new-device-sheet/view (:id new-installation)])}]])]})
|
||||||
|
|
||||||
(rf/defn load-installations
|
(rf/defn load-installations
|
||||||
{:events [:pairing.callback/get-our-installations-success]}
|
{:events [:pairing.callback/get-our-installations-success]}
|
||||||
|
@ -255,17 +257,19 @@
|
||||||
{:events [:pairing/finish-seed-phrase-fallback-syncing]}
|
{:events [:pairing/finish-seed-phrase-fallback-syncing]}
|
||||||
[{:keys [db]}]
|
[{:keys [db]}]
|
||||||
{:fx [[:dispatch [:show-bottom-sheet {:content (fn [] [new-device-sheet/view-2])}]]
|
{:fx [[:dispatch [:show-bottom-sheet {:content (fn [] [new-device-sheet/view-2])}]]
|
||||||
[:json-rpc/call [{:method "wakuext_finishPairingThroughSeedPhraseProcess"
|
[:json-rpc/call
|
||||||
:params [{:installationId (:syncing/installation-id db)}]
|
[{:method "wakuext_finishPairingThroughSeedPhraseProcess"
|
||||||
:js-response true
|
:params [{:installationId (:syncing/installation-id db)}]
|
||||||
:on-success #(rf/dispatch [:sanitize-messages-and-process-response %])}]]]})
|
:js-response true
|
||||||
|
:on-success #(rf/dispatch [:sanitize-messages-and-process-response %])}]]]})
|
||||||
|
|
||||||
(rf/defn pair-and-sync
|
(rf/defn pair-and-sync
|
||||||
{:events [:pairing/pair-and-sync]}
|
{:events [:pairing/pair-and-sync]}
|
||||||
[cofx installation-id]
|
[cofx installation-id]
|
||||||
{:fx [[:json-rpc/call [{:method "wakuext_enableAndSyncInstallation"
|
{:fx [[:json-rpc/call
|
||||||
:params [{:installationId installation-id}]
|
[{:method "wakuext_enableAndSyncInstallation"
|
||||||
:on-success #(log/debug "successfully synced devices")}]]]})
|
:params [{:installationId installation-id}]
|
||||||
|
:on-success #(log/debug "successfully synced devices")}]]]})
|
||||||
|
|
||||||
(rf/defn enable-installation-success
|
(rf/defn enable-installation-success
|
||||||
{:events [:pairing.callback/enable-installation-success]}
|
{:events [:pairing.callback/enable-installation-success]}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
(ns status-im.common.new-device-sheet.view
|
(ns status-im.common.new-device-sheet.view
|
||||||
(:require
|
(:require
|
||||||
[quo.core :as quo]
|
[quo.core :as quo]
|
||||||
[react-native.core :as rn]
|
|
||||||
[status-im.common.new-device-sheet.style :as style]
|
[status-im.common.new-device-sheet.style :as style]
|
||||||
[utils.i18n :as i18n]
|
[utils.i18n :as i18n]
|
||||||
[utils.re-frame :as rf]))
|
[utils.re-frame :as rf]))
|
||||||
|
@ -14,7 +13,8 @@
|
||||||
[]
|
[]
|
||||||
(rf/dispatch [:hide-bottom-sheet]))
|
(rf/dispatch [:hide-bottom-sheet]))
|
||||||
|
|
||||||
(defn- pair-and-sync [installation-id]
|
(defn- pair-and-sync
|
||||||
|
[installation-id]
|
||||||
(rf/dispatch [:pairing/pair-and-sync installation-id])
|
(rf/dispatch [:pairing/pair-and-sync installation-id])
|
||||||
(hide-bottom-sheet))
|
(hide-bottom-sheet))
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
:blur? true
|
:blur? true
|
||||||
:container-style {:margin-top 12}
|
:container-style {:margin-top 12}
|
||||||
:button-two-label (i18n/label :t/cancel)
|
:button-two-label (i18n/label :t/cancel)
|
||||||
:button-two-props {:type :grey
|
:button-two-props {:type :grey
|
||||||
:on-press hide-bottom-sheet}
|
:on-press hide-bottom-sheet}
|
||||||
:button-one-label (i18n/label :t/pair-and-sync)
|
:button-one-label (i18n/label :t/pair-and-sync)
|
||||||
:button-one-props {:on-press #(pair-and-sync installation-id)}}]])
|
:button-one-props {:on-press #(pair-and-sync installation-id)}}]])
|
||||||
|
@ -78,5 +78,5 @@
|
||||||
:blur? true
|
:blur? true
|
||||||
:container-style {:margin-top 12}
|
:container-style {:margin-top 12}
|
||||||
:button-one-label (i18n/label :t/close)
|
:button-one-label (i18n/label :t/close)
|
||||||
:button-one-props {:type :grey
|
:button-one-props {:type :grey
|
||||||
:on-press hide-bottom-sheet}}]]))
|
:on-press hide-bottom-sheet}}]]))
|
||||||
|
|
|
@ -47,7 +47,7 @@
|
||||||
[rn/view
|
[rn/view
|
||||||
(when-not logged-in?
|
(when-not logged-in?
|
||||||
[quo/button
|
[quo/button
|
||||||
{:on-press #(navigate-to-enter-seed-phrase view-id)
|
{:on-press #(navigate-to-enter-seed-phrase view-id)
|
||||||
:accessibility-label :try-seed-phrase-button
|
:accessibility-label :try-seed-phrase-button
|
||||||
:customization-color profile-color
|
:customization-color profile-color
|
||||||
:container-style style/try-again-button}
|
:container-style style/try-again-button}
|
||||||
|
@ -58,15 +58,15 @@
|
||||||
{:on-press (fn []
|
{:on-press (fn []
|
||||||
(rf/dispatch [:syncing/clear-states])
|
(rf/dispatch [:syncing/clear-states])
|
||||||
(cond
|
(cond
|
||||||
logged-in? (rf/dispatch [:navigate-back])
|
logged-in? (rf/dispatch [:navigate-back])
|
||||||
in-onboarding? (rf/dispatch [:navigate-back-to
|
in-onboarding? (rf/dispatch [:navigate-back-to
|
||||||
:screen/onboarding.sign-in-intro])
|
:screen/onboarding.sign-in-intro])
|
||||||
:else (do
|
:else (do
|
||||||
(rf/dispatch [:navigate-back])
|
(rf/dispatch [:navigate-back])
|
||||||
(debounce/throttle-and-dispatch
|
(debounce/throttle-and-dispatch
|
||||||
[:open-modal
|
[:open-modal
|
||||||
:screen/onboarding.sign-in]
|
:screen/onboarding.sign-in]
|
||||||
1000))))
|
1000))))
|
||||||
:accessibility-label :try-again-later-button
|
:accessibility-label :try-again-later-button
|
||||||
:customization-color profile-color
|
:customization-color profile-color
|
||||||
:container-style style/try-again-button}
|
:container-style style/try-again-button}
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
(:require
|
(:require
|
||||||
[native-module.core :as native-module]
|
[native-module.core :as native-module]
|
||||||
[status-im.common.emoji-picker.utils :as emoji-picker.utils]
|
[status-im.common.emoji-picker.utils :as emoji-picker.utils]
|
||||||
[status-im.contexts.profile.config :as profile.config]
|
|
||||||
[status-im.constants :as constants]
|
[status-im.constants :as constants]
|
||||||
|
[status-im.contexts.profile.config :as profile.config]
|
||||||
status-im.contexts.profile.recover.effects
|
status-im.contexts.profile.recover.effects
|
||||||
[utils.re-frame :as rf]
|
[utils.re-frame :as rf]
|
||||||
[utils.security.core :as security]))
|
[utils.security.core :as security]))
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
{:events [:syncing/set-syncing-installation-id]}
|
{:events [:syncing/set-syncing-installation-id]}
|
||||||
[{:keys [db]} installation-id key-uid]
|
[{:keys [db]} installation-id key-uid]
|
||||||
{:db (assoc db
|
{:db (assoc db
|
||||||
:syncing/key-uid key-uid
|
:syncing/key-uid key-uid
|
||||||
:syncing/installation-id installation-id)})
|
:syncing/installation-id installation-id)})
|
||||||
|
|
||||||
(rf/defn preflight-outbound-check-for-local-pairing
|
(rf/defn preflight-outbound-check-for-local-pairing
|
||||||
|
|
|
@ -6,15 +6,14 @@
|
||||||
prefer to use it for more general purpose concepts, such as the re-frame event
|
prefer to use it for more general purpose concepts, such as the re-frame event
|
||||||
layer."
|
layer."
|
||||||
(:require-macros test-helpers.unit)
|
(:require-macros test-helpers.unit)
|
||||||
(:require
|
(:require ;; We must require this namespace to register the custom cljs.test
|
||||||
|
;; directive `match-strict?`.
|
||||||
[re-frame.core :as rf]
|
[re-frame.core :as rf]
|
||||||
[re-frame.db :as rf-db]
|
[re-frame.db :as rf-db]
|
||||||
[re-frame.events :as rf-events]
|
[re-frame.events :as rf-events]
|
||||||
[re-frame.registrar :as rf-registrar]
|
[re-frame.registrar :as rf-registrar]
|
||||||
[re-frame.subs :as rf-subs]
|
[re-frame.subs :as rf-subs]
|
||||||
[taoensso.timbre :as log]
|
[taoensso.timbre :as log] ;; We must require this namespace to register the custom cljs.test
|
||||||
|
|
||||||
;; We must require this namespace to register the custom cljs.test directive `match-strict?`.
|
|
||||||
test-helpers.matchers))
|
test-helpers.matchers))
|
||||||
|
|
||||||
(defn db
|
(defn db
|
||||||
|
|
|
@ -4,6 +4,6 @@
|
||||||
"owner": "status-im",
|
"owner": "status-im",
|
||||||
"repo": "status-go",
|
"repo": "status-go",
|
||||||
"version": "feature/fallback-pairing-seed",
|
"version": "feature/fallback-pairing-seed",
|
||||||
"commit-sha1": "4207c5fdeb37c37f5d9e64c19531d1eac1a8786a",
|
"commit-sha1": "c39d9dc2d5cefccf594d66729fcb0bc3d4b51321",
|
||||||
"src-sha256": "17igj7ck8g4znm1gdw1afb7zkjskw95i2wmabayrdfakl1i17cwr"
|
"src-sha256": "1sq62qrbvr1v0skd6s15ja2k6165li60kc5gk3n0afa2a1dwzasm"
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,6 +357,7 @@
|
||||||
"check-before-syncing-doc-checkbox-2": "Make sure you are logged in on the other device",
|
"check-before-syncing-doc-checkbox-2": "Make sure you are logged in on the other device",
|
||||||
"check-before-syncing-doc-checkbox-3": "Disable the firewall and VPN on your devices",
|
"check-before-syncing-doc-checkbox-3": "Disable the firewall and VPN on your devices",
|
||||||
"check-before-syncing-doc-description": "To sync your devices successfully, make sure to check and complete these steps:",
|
"check-before-syncing-doc-description": "To sync your devices successfully, make sure to check and complete these steps:",
|
||||||
|
"check-new-device": "A new device has been detected. You can see device ID below and on your other device. Only confirm the request if device ID matches.",
|
||||||
"check-on-block-explorer": "Check on block explorer",
|
"check-on-block-explorer": "Check on block explorer",
|
||||||
"check-on-opensea": "Check on opensea",
|
"check-on-opensea": "Check on opensea",
|
||||||
"check-your-account-balance-and-activity": "Check your account balance and activity",
|
"check-your-account-balance-and-activity": "Check your account balance and activity",
|
||||||
|
@ -1626,6 +1627,7 @@
|
||||||
"new-community-title": "New community",
|
"new-community-title": "New community",
|
||||||
"new-contact": "New contact",
|
"new-contact": "New contact",
|
||||||
"new-contract": "New Contract",
|
"new-contract": "New Contract",
|
||||||
|
"new-device-detected": "A new device has been detected. You can see device ID below and on your other device. Only confirm the request if device ID matches.",
|
||||||
"new-favourite": "New favourite",
|
"new-favourite": "New favourite",
|
||||||
"new-group": "New group",
|
"new-group": "New group",
|
||||||
"new-group-chat": "New group chat",
|
"new-group-chat": "New group chat",
|
||||||
|
@ -1790,12 +1792,14 @@
|
||||||
"page-camera-request-blocked": "camera requests blocked. To enable camera requests go to Settings",
|
"page-camera-request-blocked": "camera requests blocked. To enable camera requests go to Settings",
|
||||||
"page-would-like-to-use-camera": "would like to use your camera",
|
"page-would-like-to-use-camera": "would like to use your camera",
|
||||||
"pair": "Pair",
|
"pair": "Pair",
|
||||||
|
"pair-and-sync": "Pair and Sync",
|
||||||
"pair-card": "Pair to this device",
|
"pair-card": "Pair to this device",
|
||||||
"pair-code": "Pair code",
|
"pair-code": "Pair code",
|
||||||
"pair-code-explanation": "Pairs card to a different device (up to 5) to unlock keys and sign transactions with the same Keycard",
|
"pair-code-explanation": "Pairs card to a different device (up to 5) to unlock keys and sign transactions with the same Keycard",
|
||||||
"pair-code-placeholder": "Pair code...",
|
"pair-code-placeholder": "Pair code...",
|
||||||
"pair-device-toast": "Device successfully paired",
|
"pair-device-toast": "Device successfully paired",
|
||||||
"pair-devices": "Pair devices",
|
"pair-devices": "Pair devices",
|
||||||
|
"pair-new-device-and-sync": "Pair new device and sync profile",
|
||||||
"pair-this-card": "Pair this card",
|
"pair-this-card": "Pair this card",
|
||||||
"pair-this-device": "Advertise device",
|
"pair-this-device": "Advertise device",
|
||||||
"pair-this-device-description": "Pair your devices to sync contacts and chats between them",
|
"pair-this-device-description": "Pair your devices to sync contacts and chats between them",
|
||||||
|
@ -2775,8 +2779,5 @@
|
||||||
"your-recovery-phrase": "Your seed phrase",
|
"your-recovery-phrase": "Your seed phrase",
|
||||||
"your-recovery-phrase-description": "This is your seed phrase. You use it to prove that this is your wallet. You only get to see it once! Write it on paper and keep it in a secure place. You will need it if you lose or reinstall your wallet.",
|
"your-recovery-phrase-description": "This is your seed phrase. You use it to prove that this is your wallet. You only get to see it once! Write it on paper and keep it in a secure place. You will need it if you lose or reinstall your wallet.",
|
||||||
"your-tip-limit": "Your tip limit",
|
"your-tip-limit": "Your tip limit",
|
||||||
"youre-on-mobile-network": "You’re on mobile network",
|
"youre-on-mobile-network": "You’re on mobile network"
|
||||||
"pair-and-sync": "Pair and Sync",
|
|
||||||
"new-device-detected": "A new device has been detected. You can see device ID below and on your other device. Only confirm the request if device ID matches.",
|
|
||||||
"pair-new-device-and-sync": "Pair new device and sync profile"
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue