diff --git a/src/legacy/status_im/ui/screens/advanced_settings/views.cljs b/src/legacy/status_im/ui/screens/advanced_settings/views.cljs index 8f44a38b26..93f295653d 100644 --- a/src/legacy/status_im/ui/screens/advanced_settings/views.cljs +++ b/src/legacy/status_im/ui/screens/advanced_settings/views.cljs @@ -18,6 +18,7 @@ [{:keys [current-log-level telemetry-enabled? light-client-enabled? + store-confirmations-enabled? current-fleet test-networks-enabled? is-goerli-enabled? @@ -77,6 +78,15 @@ [:wakuv2.ui/toggle-light-client (not light-client-enabled?)]) :accessory :switch :active light-client-enabled?} + {:size :small + :title (i18n/label :t/store-confirmations) + :accessibility-label :store-confirmations + :container-margin-bottom 8 + :on-press + #(re-frame/dispatch + [:wakuv2.ui/toggle-store-confirmations (not store-confirmations-enabled?)]) + :accessory :switch + :active store-confirmations-enabled?} {:size :small :title "Testnet mode" :accessibility-label :test-networks-enabled @@ -114,13 +124,14 @@ (views/defview advanced-settings [] - (views/letsubs [test-networks-enabled? [:profile/test-networks-enabled?] - is-goerli-enabled? [:profile/is-goerli-enabled?] - light-client-enabled? [:profile/light-client-enabled?] - telemetry-enabled? [:profile/telemetry-enabled?] - current-log-level [:log-level/current-log-level] - current-fleet [:fleets/current-fleet] - peer-syncing-enabled? [:profile/peer-syncing-enabled?]] + (views/letsubs [test-networks-enabled? [:profile/test-networks-enabled?] + is-goerli-enabled? [:profile/is-goerli-enabled?] + light-client-enabled? [:profile/light-client-enabled?] + store-confirmations-enabled? [:profile/store-confirmations-enabled?] + telemetry-enabled? [:profile/telemetry-enabled?] + current-log-level [:log-level/current-log-level] + current-fleet [:fleets/current-fleet] + peer-syncing-enabled? [:profile/peer-syncing-enabled?]] [:<> [quo/page-nav {:type :title @@ -130,13 +141,14 @@ :on-press #(rf/dispatch [:navigate-back])}] [list/flat-list {:data (flat-list-data - {:current-log-level current-log-level - :telemetry-enabled? telemetry-enabled? - :light-client-enabled? light-client-enabled? - :current-fleet current-fleet - :dev-mode? false - :test-networks-enabled? test-networks-enabled? - :is-goerli-enabled? is-goerli-enabled? - :peer-syncing-enabled? peer-syncing-enabled?}) + {:current-log-level current-log-level + :telemetry-enabled? telemetry-enabled? + :light-client-enabled? light-client-enabled? + :store-confirmations-enabled? store-confirmations-enabled? + :current-fleet current-fleet + :dev-mode? false + :test-networks-enabled? test-networks-enabled? + :is-goerli-enabled? is-goerli-enabled? + :peer-syncing-enabled? peer-syncing-enabled?}) :key-fn (fn [_ i] (str i)) :render-fn render-item}]])) diff --git a/src/legacy/status_im/waku/core.cljs b/src/legacy/status_im/waku/core.cljs index c43a5aea6e..abbcff1fae 100644 --- a/src/legacy/status_im/waku/core.cljs +++ b/src/legacy/status_im/waku/core.cljs @@ -137,3 +137,19 @@ :on-error #(log/error "failed to set light client" {:error % :enabled? enabled?})}]}) + +(rf/defn toggle-store-confirmations + {:events [:wakuv2.ui/toggle-store-confirmations]} + [{:keys [db]} enabled?] + {:db (assoc-in db + [:profile/profile :wakuv2-config :EnableStoreConfirmationForMessagesSent] + enabled?) + + :json-rpc/call [{:method "wakuext_setStoreConfirmationForMessagesSent" + :params [{:enabled enabled?}] + :on-success (fn [] + (log/info "store confirmation set successfully" enabled?) + (re-frame/dispatch [:logout])) + :on-error #(log/error "failed to set store confirmation" + {:error % + :enabled? enabled?})}]}) diff --git a/src/status_im/contexts/profile/config.cljs b/src/status_im/contexts/profile/config.cljs index f9e0c3409c..296ee5adfa 100644 --- a/src/status_im/contexts/profile/config.cljs +++ b/src/status_im/contexts/profile/config.cljs @@ -29,19 +29,20 @@ [] (let [log-enabled? (boolean (not-empty config/log-level))] (assoc (login) - :deviceName (native-module/get-installation-name) - :rootDataDir (native-module/backup-disabled-data-dir) - :rootKeystoreDir (native-module/keystore-dir) - :logLevel (when log-enabled? config/log-level) - :logEnabled log-enabled? - :logFilePath (native-module/log-file-directory) - :verifyTransactionURL config/verify-transaction-url - :verifyENSURL config/verify-ens-url - :verifyENSContractAddress config/verify-ens-contract-address - :verifyTransactionChainID config/verify-transaction-chain-id - :wakuV2LightClient true - :previewPrivacy config/blank-preview? - :testNetworksEnabled config/test-networks-enabled?))) + :deviceName (native-module/get-installation-name) + :rootDataDir (native-module/backup-disabled-data-dir) + :rootKeystoreDir (native-module/keystore-dir) + :logLevel (when log-enabled? config/log-level) + :logEnabled log-enabled? + :logFilePath (native-module/log-file-directory) + :verifyTransactionURL config/verify-transaction-url + :verifyENSURL config/verify-ens-url + :verifyENSContractAddress config/verify-ens-contract-address + :verifyTransactionChainID config/verify-transaction-chain-id + :wakuV2LightClient true + :wakuV2EnableStoreConfirmationForMessagesSent false + :previewPrivacy config/blank-preview? + :testNetworksEnabled config/test-networks-enabled?))) (defn strip-file-prefix [path] diff --git a/src/status_im/subs/profile.cljs b/src/status_im/subs/profile.cljs index 609a1641d5..283fb15911 100644 --- a/src/status_im/subs/profile.cljs +++ b/src/status_im/subs/profile.cljs @@ -87,6 +87,12 @@ (fn [profile] (get-in profile [:wakuv2-config :LightClient]))) +(re-frame/reg-sub + :profile/store-confirmations-enabled? + :<- [:profile/profile] + (fn [profile] + (get-in profile [:wakuv2-config :EnableStoreConfirmationForMessagesSent]))) + (re-frame/reg-sub :profile/telemetry-enabled? :<- [:profile/profile] diff --git a/status-go-version.json b/status-go-version.json index 24f27cd75a..fe7c00dd46 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.181.35", - "commit-sha1": "1ef2434b0644581e3c0404d767550cbfee8ad829", - "src-sha256": "1dfw4cff1blg063xxrh78dgivcar92k1fspcr84ra1fxw674kmfk" + "version": "feat/flag-sent-messages-check-2", + "commit-sha1": "0d1e5aaed9c26f1948cfb1661a76f52f6b7585bb", + "src-sha256": "0965vsnj1xxxwjiz1lnxfcp8kg6nbw2dqvcmcgayxccfgf6a377a" } diff --git a/translations/en.json b/translations/en.json index c01a5e1176..269d8ffdf3 100644 --- a/translations/en.json +++ b/translations/en.json @@ -2757,5 +2757,6 @@ "value-higher-than-send-amount": "This value is higher than entered amount to send", "swaps-powered-by": "Swaps powered by {{provider}}", "max-slippage": "Max slippage", - "pay": "Pay" + "pay": "Pay", + "store-confirmations": "Store confirmations" }