mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-24 21:39:24 +00:00
ccd8c5b65f
Implement a prototype of integrating [WalletConnect Web SDK]() - integrate WalletConnect Web SDK using Node.js and packing it using [webpack](https://webpack.js.org/guides/getting-started/) - this way, we achieve the same versioning strategy for the SDK - add WalletConnectSDK view - it is used to load the web SDK via a WebView (validated working on Mac and Windows) - add new app dependency of WebView QT - also update vendor packages `Dotherside` and `nimqml` to add required WebView::initialize API used to initialize the WebView integration at the app start - add WalletConnectPage to Storybook for quick prototyping - Also add dependency for WebView Qt lib - index.js is the wrapper used to provide a simple stateful interface with the WC SDK - Entry in ui/generate-rcc.go ensures the node_modules cache is excluded from the resource file Notes: - Added `com.apple.security.cs.allow-jit` entitlement when signing the app package. This allows Execution of JIT-compiled Code Entitlement required by the fast-path of the JavaScriptCore framework on MacOS platforms. - Keep some debugging entries expected to help debugging Linux package - Removed outdated `DerivationPathInputRegressionTests` qml test Closes #12301
Wallet Connect Integration
WalletConnect SDK management
Install dependencies steps by executing commands in this directory:
- update the
package.json
versions and runnpm install
- alternatively
- use the command
npm install <package-name>@<version/latest> --save
for individual packages - or to update to the latest run
npm update
in here
- use the command
- these commands will also create or update a
package-lock.json
file and populate thenode_modules
directory
- alternatively
- update the
bundle.js
file by runningnpm run build
- the result will be embedded with the app and loaded by
WalletConnectSDK.qml
component
- the result will be embedded with the app and loaded by
- add the newly generated files to index
git add --update .
to include in the commit
Testing
Use the web demo test client https://react-app.walletconnect.com/ for wallet pairing and https://react-auth-dapp.walletconnect.com/ for authentication
TODO
- test namespaces implementation https://se-sdk-dapp.vercel.app/
Log
Initial setup
npm init -y
npm install --save-dev webpack webpack-cli webpack-dev-server
npm install --save @walletconnect/web3wallet
npm run build
Dev - to be removed
To test SDK loading add the following to ui/app/mainui/AppMain.qml
import AppLayouts.Wallet.views.walletconnect 1.0
// ...
StatusDialog {
id: wcHelperDialog
visible: true
WalletConnect {
SplitView.preferredWidth: 400
SplitView.preferredHeight: 600
projectId: "<Project ID>"
backgroundColor: wcHelperDialog.backgroundColor
}
clip: true
}