From 536ebf56cb33abcf1c03271fbf0153c4013911f6 Mon Sep 17 00:00:00 2001 From: flexsurfer Date: Thu, 7 Dec 2023 11:40:23 +0100 Subject: [PATCH] remove obsolete code (#18094) --- src/status_im/commands/core.cljs | 46 --- src/status_im/contact/chat.cljs | 18 -- src/status_im/contact/core.cljs | 13 - src/status_im/contact/db.cljs | 9 - src/status_im/events.cljs | 3 - src/status_im/keycard/recovery.cljs | 3 +- src/status_im/transport/core.cljs | 0 .../ui/screens/wallet/send/views.cljs | 45 +-- src/status_im/utils/keychain/core.cljs | 4 - src/status_im/utils/pairing.cljs | 11 - src/status_im/utils/snoopy.cljs | 120 -------- src/status_im/utils/wallet_connect.cljs | 31 -- .../wallet/choose_recipient/core.cljs | 7 +- src/status_im/wallet_connect/core.cljs | 288 ------------------ src/status_im2/navigation/core.cljs | 7 +- src/status_im2/navigation/effects.cljs | 6 - src/status_im2/navigation/view.cljs | 11 - 17 files changed, 4 insertions(+), 618 deletions(-) delete mode 100644 src/status_im/commands/core.cljs delete mode 100644 src/status_im/contact/chat.cljs delete mode 100644 src/status_im/contact/core.cljs delete mode 100644 src/status_im/transport/core.cljs delete mode 100644 src/status_im/utils/pairing.cljs delete mode 100644 src/status_im/utils/snoopy.cljs delete mode 100644 src/status_im/utils/wallet_connect.cljs delete mode 100644 src/status_im/wallet_connect/core.cljs diff --git a/src/status_im/commands/core.cljs b/src/status_im/commands/core.cljs deleted file mode 100644 index 2d9ee4e499..0000000000 --- a/src/status_im/commands/core.cljs +++ /dev/null @@ -1,46 +0,0 @@ -(ns status-im.commands.core - (:require - [re-frame.core :as re-frame] - [status-im.wallet.utils :as wallet.utils] - [utils.re-frame :as rf])) - -(rf/defn handle-prepare-accept-request-address-for-transaction - {:events [::prepare-accept-request-address-for-transaction]} - [{:keys [db]} message] - {:db (assoc db - :commands/select-account - {:message message - :from (wallet.utils/get-default-account (:profile/wallet-accounts - db))}) - :show-select-acc-sheet nil}) - -(rf/defn set-selected-account - {:events [::set-selected-account]} - [{:keys [db]} _ account] - {:db (-> (assoc-in db [:commands/select-account :from] account) - (assoc :bottom-sheet/show? false))}) - -(rf/defn handle-accept-request-address-for-transaction - {:events [::accept-request-address-for-transaction]} - [{:keys [db]} message-id address] - {:db (dissoc db :commands/select-account) - :json-rpc/call [{:method "wakuext_acceptRequestAddressForTransaction" - :params [message-id address] - :js-response true - :on-success #(re-frame/dispatch [:transport/message-sent %])}]}) - -(rf/defn handle-decline-request-address-for-transaction - {:events [::decline-request-address-for-transaction]} - [_ message-id] - {:json-rpc/call [{:method "wakuext_declineRequestAddressForTransaction" - :params [message-id] - :js-response true - :on-success #(re-frame/dispatch [:transport/message-sent %])}]}) - -(rf/defn handle-decline-request-transaction - {:events [::decline-request-transaction]} - [cofx message-id] - {:json-rpc/call [{:method "wakuext_declineRequestTransaction" - :params [message-id] - :js-response true - :on-success #(re-frame/dispatch [:transport/message-sent %])}]}) diff --git a/src/status_im/contact/chat.cljs b/src/status_im/contact/chat.cljs deleted file mode 100644 index 79121260fd..0000000000 --- a/src/status_im/contact/chat.cljs +++ /dev/null @@ -1,18 +0,0 @@ -(ns status-im.contact.chat - (:require - [re-frame.core :as re-frame] - [status-im2.contexts.contacts.events :as contact] - [status-im2.navigation.events :as navigation] - [utils.re-frame :as rf])) - -(rf/defn contact-code-submitted - {:events [:contact.ui/contact-code-submitted] - :interceptors [(re-frame/inject-cofx :random-id-generator)]} - [{{:contacts/keys [new-identity]} :db :as cofx} new-contact? nickname] - (let [{:keys [public-key ens-name]} new-identity] - (rf/merge cofx - #(if new-contact? - (contact/send-contact-request % public-key) - {:dispatch [:chat.ui/start-chat public-key ens-name]}) - #(when new-contact? - (navigation/navigate-back %))))) diff --git a/src/status_im/contact/core.cljs b/src/status_im/contact/core.cljs deleted file mode 100644 index fa775fe3ee..0000000000 --- a/src/status_im/contact/core.cljs +++ /dev/null @@ -1,13 +0,0 @@ -(ns status-im.contact.core - (:require - [status-im2.navigation.events :as navigation] - [utils.re-frame :as rf])) - -(rf/defn open-contact-toggle-list - {:events [:contact.ui/start-group-chat-pressed]} - [{:keys [db] :as cofx}] - (rf/merge cofx - {:db (assoc db - :group/selected-contacts #{} - :new-chat-name "")} - (navigation/navigate-to :contact-toggle-list nil))) diff --git a/src/status_im/contact/db.cljs b/src/status_im/contact/db.cljs index 22dd05394b..3f652f4435 100644 --- a/src/status_im/contact/db.cljs +++ b/src/status_im/contact/db.cljs @@ -85,12 +85,3 @@ (assoc acc public-key (enrich-contact contact profile-pictures-visibility own-public-key))) {} contacts)) - -(defn get-blocked-contacts - [contacts] - (reduce (fn [acc {:keys [public-key] :as contact}] - (if (:blocked? contact) - (conj acc public-key) - acc)) - #{} - contacts)) diff --git a/src/status_im/events.cljs b/src/status_im/events.cljs index 92f2019033..0da1201df6 100644 --- a/src/status_im/events.cljs +++ b/src/status_im/events.cljs @@ -15,8 +15,6 @@ status-im.chat.models.input status-im.chat.models.loading status-im.contact.block - status-im.contact.chat - status-im.contact.core status-im.currency.core status-im.ethereum.subscriptions status-im.fleet.core @@ -43,7 +41,6 @@ status-im.visibility-status-popover.core status-im.visibility-status-updates.core status-im.waku.core - status-im.wallet-connect.core status-im.wallet.accounts.core status-im.wallet.choose-recipient.core [status-im.wallet.core :as wallet] diff --git a/src/status_im/keycard/recovery.cljs b/src/status_im/keycard/recovery.cljs index 36c8fdf10c..1e828ff3a7 100644 --- a/src/status_im/keycard/recovery.cljs +++ b/src/status_im/keycard/recovery.cljs @@ -11,7 +11,6 @@ [status-im.multiaccounts.model :as multiaccounts.model] [status-im.popover.core :as popover] [status-im.utils.deprecated-types :as types] - [status-im.utils.keychain.core :as keychain] [status-im2.constants :as constants] [status-im2.navigation.events :as navigation] [taoensso.timbre :as log] @@ -278,7 +277,7 @@ {:db (-> db (assoc-in [:profile/profiles-overview key-uid :keycard-pairing] pairing) (assoc :profile/login account) - (assoc :auth-method keychain/auth-method-none) + (assoc :auth-method "none") (update :keycard dissoc :flow :migration-password) (dissoc :recovered-account?)) ::finish-migration [account settings password encryption-pass login-params]})) diff --git a/src/status_im/transport/core.cljs b/src/status_im/transport/core.cljs deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/src/status_im/ui/screens/wallet/send/views.cljs b/src/status_im/ui/screens/wallet/send/views.cljs index 35d58360d2..7f3ea51aaf 100644 --- a/src/status_im/ui/screens/wallet/send/views.cljs +++ b/src/status_im/ui/screens/wallet/send/views.cljs @@ -1,10 +1,8 @@ (ns status-im.ui.screens.wallet.send.views - (:require-macros [status-im.utils.views :refer [defview letsubs] :as views]) + (:require-macros [status-im.utils.views :as views]) (:require [quo.core :as quo] [re-frame.core :as re-frame] - [status-im.commands.core :as commands] - [status-im.ui.components.bottom-panel.views :as bottom-panel] [status-im.ui.components.chat-icon.screen :as chat-icon] [status-im.ui.components.colors :as colors] [status-im.ui.components.core :as components.core] @@ -129,47 +127,6 @@ " " (:code wallet-currency))]))) -(defn select-account-sheet - [{:keys [from message]}] - [react/view {:style (styles/acc-sheet)} - [header - {:small-screen? false - :label :t/select-account}] - [react/view - {:flex-direction :row - :padding-horizontal 24 - :align-items :center - :margin-vertical 16}] - [components.core/list-header - (i18n/label :t/from-capitalized)] - [react/view {:flex-direction :row :flex 1 :align-items :center} - [react/view {:flex 1} - [render-account from nil ::commands/set-selected-account]]] - [toolbar/toolbar - {:left - [react/view {:padding-horizontal 8} - [components.core/button - {:type :secondary - :on-press #(re-frame/dispatch [:set :commands/select-account nil])} - (i18n/label :t/cancel)]] - :right - [components.core/button - {:accessibility-label :select-account-bottom-sheet - :disabled (nil? from) - :on-press #(re-frame/dispatch - [::commands/accept-request-address-for-transaction - (:message-id message) - (:address from)])} - (i18n/label :t/share)]}]]) - -(defview select-account - [] - (letsubs [data [:commands/select-account]] - [bottom-panel/animated-bottom-panel - data - select-account-sheet - #(re-frame/dispatch [:hide-select-acc-sheet])])) - (views/defview request-transaction [_] (views/letsubs [{:keys [amount-error amount-text from token sign-enabled?] :as tx} diff --git a/src/status_im/utils/keychain/core.cljs b/src/status_im/utils/keychain/core.cljs index 19a326b96e..b22d2913fd 100644 --- a/src/status_im/utils/keychain/core.cljs +++ b/src/status_im/utils/keychain/core.cljs @@ -6,10 +6,6 @@ [taoensso.timbre :as log] [utils.re-frame :as rf])) -(def auth-method-biometric "biometric") -(def auth-method-biometric-prepare "biometric-prepare") -(def auth-method-none "none") - (defn- whisper-key-name [address] (str address "-whisper")) diff --git a/src/status_im/utils/pairing.cljs b/src/status_im/utils/pairing.cljs deleted file mode 100644 index 994beb2dca..0000000000 --- a/src/status_im/utils/pairing.cljs +++ /dev/null @@ -1,11 +0,0 @@ -(ns ^{:doc "Pairing utils"} status-im.utils.pairing) - -(defn has-paired-installations? - [cofx] - (let [our-installation-id (get-in cofx [:db :profile/profile :installation-id])] - (->> - (get-in cofx [:db :pairing/installations]) - vals - (some (fn [{:keys [enabled? installation-id]}] - (and (not= installation-id our-installation-id) - enabled?)))))) diff --git a/src/status_im/utils/snoopy.cljs b/src/status_im/utils/snoopy.cljs deleted file mode 100644 index da79838a98..0000000000 --- a/src/status_im/utils/snoopy.cljs +++ /dev/null @@ -1,120 +0,0 @@ -(ns status-im.utils.snoopy - (:require - ["react-native/Libraries/vendor/emitter/EventEmitter" :refer [EventEmitter]] - ["rn-snoopy" :default snoopy] - ["rn-snoopy/stream/bars" :default bars] - ["rn-snoopy/stream/buffer" :default buffer] - ["rn-snoopy/stream/filter" :default sn-filter] - [clojure.string :as string] - [status-im2.config :as config])) - -(defn create-filter - [f] - (fn [^js message] - (let [method (.-method message) - module (.-module message) - ^js args (.-args message) - first-arg (when (pos? (.-length args)) - (aget args 0))] - (f {:method method - :module module - :first-arg first-arg})))) - -(defn status-module-filter - [{:keys [method module first-arg]}] - (or (= module "Status") - (and (= module "RCTNativeAppEventEmitter") - (= method "emit") - (= first-arg "gethEvent")) - (and - (string? method) - (string/starts-with? method " ^js WalletConnectClient - (.init (clj->js {:controller true - :projectId config/wallet-connect-project-id - :logger "debug" - :metadata config/default-wallet-connect-metadata - :storageOptions {:asyncStorage ^js AsyncStorage}})) - (.then on-success) - (.catch on-error))) - -(defn session-request-event [] (.-request (.-session CLIENT_EVENTS))) - -(defn session-created-event [] (.-created (.-session CLIENT_EVENTS))) - -(defn session-deleted-event [] (.-deleted (.-session CLIENT_EVENTS))) - -(defn session-proposal-event [] (.-proposal (.-session CLIENT_EVENTS))) - -(defn session-updated-event [] (.-updated (.-session CLIENT_EVENTS))) - -(defn url? - [url] - (string/starts-with? url "wc:")) diff --git a/src/status_im/wallet/choose_recipient/core.cljs b/src/status_im/wallet/choose_recipient/core.cljs index 618561d4d1..0b84645f27 100644 --- a/src/status_im/wallet/choose_recipient/core.cljs +++ b/src/status_im/wallet/choose_recipient/core.cljs @@ -7,7 +7,6 @@ [status-im.ethereum.ens :as ens] [status-im.ethereum.tokens :as tokens] [status-im.qr-scanner.core :as qr-scaner] - [status-im.utils.wallet-connect :as wallet-connect] [status-im.wallet.utils :as wallet.utils] [status-im2.common.router :as router] [status-im2.navigation.events :as navigation] @@ -173,11 +172,7 @@ (if (links/universal-link? uri) {:dispatch [:universal-links/handle-url uri]} {:browser/show-browser-selection uri}) - (if (wallet-connect/url? uri) - {:ui/show-error "Wallet Connect not implemented"} - ;; Re-enable with https://github.com/status-im/status-mobile/issues/13429 - ;; {:dispatch [::qr-scaner/handle-wallet-connect-uri {:data uri}]} - {:ui/show-error (i18n/label :t/wallet-invalid-address {:data uri})})))) + {:ui/show-error (i18n/label :t/wallet-invalid-address {:data uri})}))) (rf/defn qr-scanner-result {:events [:wallet-legacy.send/qr-scanner-result]} diff --git a/src/status_im/wallet_connect/core.cljs b/src/status_im/wallet_connect/core.cljs deleted file mode 100644 index 065eb51dbe..0000000000 --- a/src/status_im/wallet_connect/core.cljs +++ /dev/null @@ -1,288 +0,0 @@ -(ns status-im.wallet-connect.core - (:require - [clojure.string :as string] - [re-frame.core :as re-frame] - [status-im.browser.core :as browser] - [status-im.signing.core :as signing] - [status-im.utils.deprecated-types :as types] - [status-im.utils.wallet-connect :as wallet-connect] - [status-im2.config :as config] - [status-im2.constants :as constants] - [taoensso.timbre :as log] - [utils.address :as address] - [utils.re-frame :as rf])) - -(rf/defn proposal-handler - {:events [:wallet-connect/proposal]} - [{:keys [db] :as cofx} request-event] - (let [proposal (types/js->clj request-event) - proposer (:proposer proposal) - metadata (:metadata proposer)] - {:db (assoc db - :wallet-connect/proposal proposal - :wallet-connect/proposal-metadata metadata) - :show-wallet-connect-sheet nil})) - -(rf/defn session-connected - {:events [:wallet-connect/created]} - [{:keys [db]} session] - (let [session (merge (types/js->clj session) {:wc-version 2}) - client (get db :wallet-connect/client)] - (log/debug "[wallet connect] session created - " session) - {:show-wallet-connect-success-sheet nil - :db (assoc db - :wallet-connect/session-connected session - :wallet-connect/sessions (types/js->clj - (.-values - (.-session - client))))})) - -(rf/defn manage-app - {:events [:wallet-connect/manage-app]} - [{:keys [db]} session] - (let [session (types/js->clj session)] - {:db (assoc db - :wallet-connect/session-managed session - :wallet-connect/showing-app-management-sheet? true) - :show-wallet-connect-app-management-sheet nil})) - -(rf/defn request-handler - {:events [:wallet-connect/request]} - [{:keys [db] :as cofx} request-event] - (let [request (types/js->clj request-event) - params (:request request) - pending-requests (or (:wallet-connect/pending-requests db) []) - new-pending-requests (conj pending-requests request) - client (get db :wallet-connect/client) - topic (:topic request)] - {:db (assoc db :wallet-connect/pending-requests new-pending-requests) - :dispatch [:wallet-connect/request-received request]})) - -(rf/defn request-handler-test - {:events [:wallet-connect/request-test]} - [{:keys [db] :as cofx}] - {:show-wallet-connect-sheet nil}) - -(defn subscribe-to-events - [^js wallet-connect-client] - (.on wallet-connect-client - (wallet-connect/session-request-event) - #(re-frame/dispatch [:wallet-connect/request %])) - (.on wallet-connect-client - (wallet-connect/session-created-event) - #(re-frame/dispatch [:wallet-connect/created %])) - (.on wallet-connect-client - (wallet-connect/session-deleted-event) - #(re-frame/dispatch [:wallet-connect/update-sessions])) - (.on wallet-connect-client - (wallet-connect/session-updated-event) - #(re-frame/dispatch [:wallet-connect/update-sessions])) - (.on wallet-connect-client - (wallet-connect/session-proposal-event) - #(re-frame/dispatch [:wallet-connect/proposal %]))) - -(re-frame/reg-fx - :wc-2-init - (fn [] - (wallet-connect/init - #(re-frame/dispatch [:wallet-connect/client-init %]) - #(log/error "[wallet-connect]" %)))) - -(re-frame/reg-fx - :wc-2-subscribe-to-events - (fn [client] - (subscribe-to-events client))) - -(re-frame/reg-fx - :wc-2-client-approve-proposal - (fn [[client proposal response]] - (-> ^js client - (.approve (clj->js {:proposal proposal :response response})) - (.then #(log/debug "[wallet-connect] session proposal approved")) - (.catch #(log/error "[wallet-connect] session proposal approval error:" %))))) - -(re-frame/reg-fx - :wc-2-client-reject-proposal - (fn [[client proposal]] - (-> ^js client - (.reject (clj->js {:proposal proposal})) - (.then #(log/debug "[wallet-connect] session proposal rejected")) - (.catch #(log/error "[wallet-connect] " %))))) - -(re-frame/reg-fx - :wc-2-client-disconnect - (fn [[client topic]] - (-> ^js client - (.disconnect (clj->js {:topic topic})) - (.then #(log/debug "[wallet-connect] session disconnected - topic " topic)) - (.catch #(log/error "[wallet-connect] " %))))) - -(re-frame/reg-fx - :wc-2-change-session - (fn [[client topic accounts]] - (-> ^js client - (.update (clj->js {:topic topic - :state {:accounts accounts}})) - (.then #(log/debug "[wallet-connect] session topic " topic - " changed to account " (first accounts))) - (.catch #(log/error "[wallet-connect] " %))))) - -(re-frame/reg-fx - :wc-2-pair - (fn [[client uri]] - (.pair client (clj->js {:uri uri})))) - -(re-frame/reg-fx - :wc-2-respond - (fn [[client response]] - (.respond client (clj->js response)))) - -(rf/defn approve-proposal - {:events [:wallet-connect/approve-proposal]} - [{:keys [db]} account] - (let [client (get db :wallet-connect/client) - proposal (get db :wallet-connect/proposal) - topic (:topic proposal) - permissions (:permissions proposal) - blockchain (:blockchain permissions) - proposal-chain-ids (map #(last (string/split % #":")) (:chains blockchain)) - available-chain-ids (map #(get-in % [:config :NetworkId]) (vals (get db :networks/networks))) - supported-chain-ids (filter (fn [chain-id] #(boolean (some #{chain-id} available-chain-ids))) - proposal-chain-ids) - address (:address account) - accounts (map #(str "eip155:" % ":" (address/normalized-hex address)) - supported-chain-ids) - ;; TODO: Check for unsupported - metadata (get db :wallet-connect/proposal-metadata) - response {:state {:accounts accounts} - :metadata config/default-wallet-connect-metadata}] - {:hide-wallet-connect-sheet nil - :wc-2-client-approve-proposal [client proposal response]})) - -(rf/defn reject-proposal - {:events [:wallet-connect/reject-proposal]} - [{:keys [db]} account] - (let [client (get db :wallet-connect/client) - proposal (get db :wallet-connect/proposal)] - {:hide-wallet-connect-sheet nil - :wc-2-client-reject-proposal client})) - -(rf/defn change-session-account - {:events [:wallet-connect/change-session-account]} - [{:keys [db]} topic account] - (let [client (get db :wallet-connect/client) - sessions (get db :wallet-connect/sessions) - session (first (filter #(= (:topic %) topic) sessions)) - permissions (:permissions session) - blockchain (:blockchain permissions) - proposal-chain-ids (map #(last (string/split % #":")) (:chains blockchain)) - address (:address account) - available-chain-ids (map #(get-in % [:config :NetworkId]) (vals (get db :networks/networks))) - supported-chain-ids (filter (fn [chain-id] #(boolean (some #{chain-id} available-chain-ids))) - proposal-chain-ids) - accounts (map #(str "eip155:" % ":" (address/normalized-hex address)) - supported-chain-ids)] - {:db (assoc db - :wallet-connect/showing-app-management-sheet? - false) - :hide-wallet-connect-app-management-sheet nil - :wc-2-change-session [client topic accounts]})) - -(rf/defn disconnect-session - {:events [:wallet-connect/disconnect]} - [{:keys [db]} topic] - (let [client (get db :wallet-connect/client)] - {:hide-wallet-connect-app-management-sheet nil - :hide-wallet-connect-success-sheet nil - :wc-2-client-disconnect [client topic] - :db (-> db - (assoc :wallet-connect/sessions - (types/js->clj (.-values (.-session client)))) - (dissoc :wallet-connect/session-managed))})) - -(rf/defn pair-session - {:events [:wallet-connect/pair]} - [{:keys [db]} {:keys [data]}] - (let [client (get db :wallet-connect/client)] - {:db (assoc db :wallet-connect/scanned-uri data) - :dispatch [:navigate-back] - :wc-2-pair [client data]})) - -(rf/defn wallet-connect-client-initate - {:events [:wallet-connect/client-init]} - [{:keys [db] :as cofx} ^js client] - {:db (assoc db - :wallet-connect/client client - :wallet-connect/sessions (types/js->clj (.-values (.-session - client)))) - :wc-2-subscribe-to-events client}) - -(rf/defn update-sessions - {:events [:wallet-connect/update-sessions]} - [{:keys [db] :as cofx}] - (let [client (get db :wallet-connect/client)] - {:db (-> db - (assoc :wallet-connect/sessions (types/js->clj (.-values (.-session client)))) - (dissoc :wallet-connect/session-managed))})) - -(rf/defn wallet-connect-complete-transaction - {:events [:wallet-connect.dapp/transaction-on-result]} - [{:keys [db]} message-id topic result] - (let [client (get db :wallet-connect/client) - response {:topic topic - :response {:jsonrpc "2.0" - :id message-id - :result result}}] - {:db (assoc db :wallet-connect/response response) - :wc-2-respond [client response]})) - -(rf/defn wallet-connect-send-async - [cofx {:keys [method params id] :as payload} message-id topic] - (let [message? (browser/web3-sign-message? method) - dapps-address (get-in cofx [:db :profile/profile :dapps-address]) - accounts (get-in cofx [:db :multiaccount/visible-accounts]) - typed? (and (not= constants/web3-personal-sign method) - (not= constants/web3-eth-sign method))] - (if (or message? (= constants/web3-send-transaction method)) - (let [[address data] (cond (and (= method constants/web3-keycard-sign-typed-data) - (not (vector? params))) - ;; We don't use signer argument for keycard sign-typed-data - ["0x0" params] - message? (browser/normalize-sign-message-params - params - typed?) - :else [nil nil])] - (when (or (not message?) (and address data)) - (signing/sign cofx - (merge - (if message? - {:message {:address address - :data data - :v4 (= constants/web3-sign-typed-data-v4 method) - :typed? typed? - :pinless? (= method constants/web3-keycard-sign-typed-data) - :from address}} - {:tx-obj (-> params - first - (update :from #(or % dapps-address)) - (dissoc :gasPrice))}) - {:on-result [:wallet-connect.dapp/transaction-on-result message-id topic] - :on-error [:wallet-connect.dapp/transaction-on-error message-id topic]})))) - (when (#{"eth_accounts" "eth_coinbase"} method) - (wallet-connect-complete-transaction - cofx - message-id - topic - (if (= method "eth_coinbase") dapps-address [dapps-address])))))) - -(rf/defn wallet-connect-send-async-read-only - [{:keys [db] :as cofx} {:keys [method] :as payload} message-id topic] - (wallet-connect-send-async cofx payload message-id topic)) - -(rf/defn process-request - {:events [:wallet-connect/request-received]} - [{:keys [db] :as cofx} session-request] - (let [pending-requests (get db :wallet-connect/pending-requests) - {:keys [topic request]} session-request - {:keys [id]} request] - (wallet-connect-send-async-read-only cofx request id topic))) diff --git a/src/status_im2/navigation/core.cljs b/src/status_im2/navigation/core.cljs index 2623e961ea..3f89c5958a 100644 --- a/src/status_im2/navigation/core.cljs +++ b/src/status_im2/navigation/core.cljs @@ -129,9 +129,4 @@ (navigation/register-component "signing-sheet" (fn [] (gesture/gesture-handler-root-hoc views/signing-comp)) - (fn [] views/signing-comp)) - - (navigation/register-component - "select-acc-sheet" - (fn [] (gesture/gesture-handler-root-hoc views/select-acc-comp)) - (fn [] views/select-acc-comp))]) + (fn [] views/signing-comp))]) diff --git a/src/status_im2/navigation/effects.cljs b/src/status_im2/navigation/effects.cljs index 29a4290296..cd0f35ff89 100644 --- a/src/status_im2/navigation/effects.cljs +++ b/src/status_im2/navigation/effects.cljs @@ -240,9 +240,3 @@ (rf/reg-fx :hide-signing-sheet (fn [] (navigation/dissmiss-overlay "signing-sheet"))) - -(rf/reg-fx :show-select-acc-sheet - (fn [] (show-overlay "select-acc-sheet"))) - -(rf/reg-fx :hide-select-acc-sheet - (fn [] (navigation/dissmiss-overlay "select-acc-sheet"))) diff --git a/src/status_im2/navigation/view.cljs b/src/status_im2/navigation/view.cljs index d008cd4685..6f532f4178 100644 --- a/src/status_im2/navigation/view.cljs +++ b/src/status_im2/navigation/view.cljs @@ -11,7 +11,6 @@ [status-im.ui.screens.profile.visibility-status.views :as visibility-status-views] [status-im.ui.screens.signing.views :as signing] [status-im.ui.screens.wallet-connect.session-proposal.views :as wallet-connect] - [status-im.ui.screens.wallet.send.views :as wallet.send.views] [status-im2.common.bottom-sheet-screen.view :as bottom-sheet-screen] [status-im2.common.bottom-sheet.view :as bottom-sheet] [status-im2.common.toasts.view :as toasts] @@ -135,16 +134,6 @@ (when js/goog.DEBUG [reloader/reload-view])]))) -(def select-acc-comp - (reagent/reactify-component - (fn [] - ^{:key (str "select-acc-sheet" @reloader/cnt)} - [:<> - [inactive] - [wallet.send.views/select-account] - (when js/goog.DEBUG - [reloader/reload-view])]))) - (def wallet-connect-comp (reagent/reactify-component (fn []