-
Notifications
You must be signed in to change notification settings - Fork 984
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Wallet Connect structure (#20042)
* fix: wallet-connect structure & small bugs * fix: formatting issue with sorting wc dependency
- Loading branch information
Showing
6 changed files
with
49 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(ns react-native.wallet-connect | ||
(:require | ||
["@walletconnect/core" :refer [Core]] | ||
["@walletconnect/utils" :refer [buildApprovedNamespaces]] | ||
["@walletconnect/web3wallet" :refer [Web3Wallet]])) | ||
|
||
(defn- wallet-connect-core | ||
[project-id] | ||
(Core. #js {:projectId project-id})) | ||
|
||
(defn init | ||
[project-id metadata] | ||
(let [core (wallet-connect-core project-id)] | ||
(Web3Wallet.init | ||
(clj->js {:core core | ||
:metadata metadata})))) | ||
|
||
(defn build-approved-namespaces | ||
[proposal supported-namespaces] | ||
(buildApprovedNamespaces | ||
(clj->js {:proposal proposal | ||
:supportedNamespaces supported-namespaces}))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters