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