Skip to content

Commit

Permalink
Add wallet-connect call on reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil committed Sep 14, 2022
1 parent d275181 commit be8f7d9
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/status_im/network/net_info.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,20 @@
(let [old-network-status (:network-status db)
old-network-type (:network/type db)
connectivity-status (if isConnected :online :offline)
status-changed? (= connectivity-status old-network-status)
type-changed? (= type old-network-type)]
status-changed? (not= connectivity-status old-network-status)
type-changed? (= type old-network-type)
online? (= connectivity-status :online)]
(log/debug "[net-info]"
"old-network-status" old-network-status
"old-network-type" old-network-type
"old-network-status" old-network-status
"old-network-type" old-network-type
"connectivity-status" connectivity-status
"type" type
"details" details)
"type" type
"details" details)
(fx/merge cofx
(when connectivity-status
(when (and status-changed?
online?)
(wallet-connect-legacy/get-connector-session-from-db))
(when-not status-changed?
(when status-changed?
(change-network-status isConnected))
(when-not type-changed?
(change-network-type old-network-type type (:is-connection-expensive details))))))
Expand Down

0 comments on commit be8f7d9

Please sign in to comment.