Attempt to fix "Undefined is not a function" when declining connection request

This commit is contained in:
alwx 2024-07-24 10:32:50 +02:00
parent cef1308b3a
commit 823a683dab
No known key found for this signature in database
GPG Key ID: D9E51F0C88DB4E2A
2 changed files with 3 additions and 3 deletions

View File

@ -131,12 +131,13 @@
(fn [{:keys [db]} _]
(let [web3-wallet (get db :wallet-connect/web3-wallet)
current-proposal (get-in db [:wallet-connect/current-proposal :request])]
{:fx [[:effects.wallet-connect/reject-session-proposal
{:db (dissoc db :wallet-connect/current-proposal)
:fx [[:effects.wallet-connect/reject-session-proposal
{:web3-wallet web3-wallet
:proposal current-proposal
:on-success #(log/info "Wallet Connect session proposal rejected")
:on-error #(log/error "Wallet Connect unable to reject session proposal")}]
[:dispatch [:wallet-connect/reset-current-session-proposal]]]})))
[:dispatch [:dismiss-modal :screen/wallet.wallet-connect-session-proposal]]]})))
;; NOTE: Currently we only reject a session if the user rejected it
;; But this needs to be solidified to ensure other cases:

View File

@ -149,7 +149,6 @@
:button-two-props {:type :grey
:accessibility-label :wc-deny-connection
:on-press (fn []
(rf/dispatch [:navigate-back])
(rf/dispatch
[:wallet-connect/reject-session-proposal]))}
:button-one-label (i18n/label :t/connect)