Skip to content

Commit

Permalink
[#21336] feat: upgrade wallet connect (#21833)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohsen-ghafouri authored Dec 24, 2024
1 parent 23d3a2d commit 07ea097
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 202 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@react-native-community/netinfo": "^4.4.0",
"@react-native-community/push-notification-ios": "^1.4.1",
"@react-native-community/slider": "^3.0.0",
"@walletconnect/react-native-compat": "2.11.2",
"@walletconnect/web3wallet": "1.10.2",
"@walletconnect/react-native-compat": "2.17.3",
"@reown/walletkit": "^1.0.0",
"base-64": "^1.0.0",
"big-integer": "1.6.51",
"bignumber.js": "git+https://github.com/status-im/bignumber.js.git#refs/tags/v4.0.2-status",
Expand Down
4 changes: 2 additions & 2 deletions src/react_native/wallet_connect.cljs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
(ns react-native.wallet-connect
(:require
["@reown/walletkit$default" :as WalletKit]
["@walletconnect/core" :as wc-core]
["@walletconnect/utils" :as wc-utils]
["@walletconnect/web3wallet$default" :as Web3Wallet]
[cljs-bean.core :as bean]
[oops.core :as oops]))

Expand All @@ -13,7 +13,7 @@
(defn init
[project-id metadata]
(let [core (wallet-connect-core project-id)]
(oops/ocall Web3Wallet
(oops/ocall WalletKit
"init"
(bean/->js {:core core
:metadata metadata}))))
Expand Down
1 change: 1 addition & 0 deletions src/status_im/constants.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
(def ^:const wallet-connect-metadata-icon
"https://res.cloudinary.com/dhgck7ebz/image/upload/f_auto,c_limit,w_1080,q_auto/Brand/Logo%20Section/Mark/Mark_01")
(def ^:const wallet-connect-metadata-url "https://status.app")
(def ^:const wallet-connect-metadata-redirect-native "status-app://")

(def ^:const wallet-connect-personal-sign-method "personal_sign")
(def ^:const wallet-connect-eth-sign-method "eth_sign")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
metadata {:name (i18n/label :t/status)
:description (i18n/label :t/status-is-a-secure-messaging-app)
:url constants/wallet-connect-metadata-url
:icons [constants/wallet-connect-metadata-icon]}]
:icons [constants/wallet-connect-metadata-icon]
:redirect {:native constants/wallet-connect-metadata-redirect-native}}]
(-> (wallet-connect/init project-id metadata)
(promesa/then on-success)
(promesa/catch on-fail)))))
Expand Down
Loading

0 comments on commit 07ea097

Please sign in to comment.