parent
779eadd787
commit
3ae500ff68
|
@ -50,7 +50,9 @@
|
||||||
|
|
||||||
(defn get-session-dapp-metadata
|
(defn get-session-dapp-metadata
|
||||||
[proposal]
|
[proposal]
|
||||||
(get-in proposal [:params :proposer :metadata]))
|
(let [metadata (get-in proposal [:params :proposer :metadata])
|
||||||
|
origin (get-in proposal [:verifyContext :verified :origin])]
|
||||||
|
(or metadata {:url origin})))
|
||||||
|
|
||||||
(defn get-current-request-dapp
|
(defn get-current-request-dapp
|
||||||
[request sessions]
|
[request sessions]
|
||||||
|
|
|
@ -109,8 +109,11 @@
|
||||||
(if (wallet-connect-core/event-should-be-handled? db event)
|
(if (wallet-connect-core/event-should-be-handled? db event)
|
||||||
{:fx [[:dispatch [:wallet-connect/process-session-request event]]]}
|
{:fx [[:dispatch [:wallet-connect/process-session-request event]]]}
|
||||||
{:fx [[:dispatch
|
{:fx [[:dispatch
|
||||||
|
[:wallet-connect/show-session-networks-unsupported-toast event]]
|
||||||
|
[:dispatch
|
||||||
[:wallet-connect/send-response
|
[:wallet-connect/send-response
|
||||||
{:error (wallet-connect/get-sdk-error
|
{:request event
|
||||||
|
:error (wallet-connect/get-sdk-error
|
||||||
constants/wallet-connect-user-rejected-chains-error-key)}]]]})))
|
constants/wallet-connect-user-rejected-chains-error-key)}]]]})))
|
||||||
|
|
||||||
(rf/reg-event-fx
|
(rf/reg-event-fx
|
||||||
|
|
|
@ -115,8 +115,9 @@
|
||||||
|
|
||||||
(rf/reg-event-fx
|
(rf/reg-event-fx
|
||||||
:wallet-connect/send-response
|
:wallet-connect/send-response
|
||||||
(fn [{:keys [db]} [{:keys [result error]}]]
|
(fn [{:keys [db]} [{:keys [request result error]}]]
|
||||||
(when-let [{:keys [id topic] :as event} (get-in db [:wallet-connect/current-request :event])]
|
(when-let [{:keys [id topic] :as event} (or request
|
||||||
|
(get-in db [:wallet-connect/current-request :event]))]
|
||||||
(let [method (wallet-connect-core/get-request-method event)
|
(let [method (wallet-connect-core/get-request-method event)
|
||||||
web3-wallet (get db :wallet-connect/web3-wallet)]
|
web3-wallet (get db :wallet-connect/web3-wallet)]
|
||||||
{:db (assoc-in db [:wallet-connect/current-request :response-sent?] true)
|
{:db (assoc-in db [:wallet-connect/current-request :response-sent?] true)
|
||||||
|
|
Loading…
Reference in New Issue