Skip to content

Commit

Permalink
🔧 Rename event and move dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
shivekkhurana committed Jun 4, 2024
1 parent 8179762 commit 7f12425
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/status_im/contexts/shell/qr_reader/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
(defn- handle-wallet-connect
[scanned-text]
(debounce/debounce-and-dispatch
[:wallet-connect/potential-connection-uri-scanned scanned-text]
[:wallet-connect/on-scan-connection scanned-text]
300))

(defn on-qr-code-scanned
Expand Down
8 changes: 4 additions & 4 deletions src/status_im/contexts/wallet/wallet_connect/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,11 @@
(log/error "Wallet Connect session approval failed"
{:error error
:event :wallet-connect/approve-session})
(rf/dispatch [:wallet-connect/reset-current-session]))}]]})))
(rf/dispatch [:wallet-connect/reset-current-session]))}]
[:dispatch [:dismiss-modal :screen/wallet.wallet-connect-session-proposal]]]})))

(rf/reg-event-fx
:wallet-connect/potential-connection-uri-scanned
:wallet-connect/on-scan-connection
(fn [_ [scanned-text]]
(let [parsed-uri (wallet-connect/parse-uri scanned-text)
version (:version parsed-uri)
Expand All @@ -156,5 +157,4 @@
{:version version})}]]]}

:else
{:fx [[:dispatch [:wallet-connect/pair scanned-text]]
[:dispatch [:dismiss-modal :screen/wallet.wallet-connect-session-proposal]]]}))))
{:fx [[:dispatch [:wallet-connect/pair scanned-text]]]}))))

0 comments on commit 7f12425

Please sign in to comment.