-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(@desktop/walletconnect): communication between qt desktop app and loaded wallet connect sdk is made via web channel #12764
Conversation
…nd loaded wallet connect sdk is made via web channel
Jenkins Builds
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The QWebChannel
is a great idea, making the bidirectional communication much easier without a workaround. Is the WebEngine a requirement for using it or we can use it with WebView
which is the official way of using embedded web content in a more secure and light environment.
I'm also wondering if we can load the qwebchannel.js
directly form Qt SDK?
I also think keeping the option to sideload the bundle.js
is a great feature to have in development.
@@ -186,7 +186,7 @@ ifneq ($(detected_OS),Windows) | |||
endif | |||
DOTHERSIDE_LIBFILE := vendor/DOtherSide/build/lib/libDOtherSideStatic.a | |||
# order matters here, due to "-Wl,-as-needed" | |||
NIM_PARAMS += --passL:"$(DOTHERSIDE_LIBFILE)" --passL:"$(shell PKG_CONFIG_PATH="$(QT5_PCFILEDIR)" pkg-config --libs Qt5Core Qt5Qml Qt5Gui Qt5Quick Qt5QuickControls2 Qt5Widgets Qt5Svg Qt5Multimedia Qt5WebView)" | |||
NIM_PARAMS += --passL:"$(DOTHERSIDE_LIBFILE)" --passL:"$(shell PKG_CONFIG_PATH="$(QT5_PCFILEDIR)" pkg-config --libs Qt5Core Qt5Qml Qt5Gui Qt5Quick Qt5QuickControls2 Qt5Widgets Qt5Svg Qt5Multimedia Qt5WebView Qt5WebChannel)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do adding stuff here is enough? do we need to change the build code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it should be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you plan to add it to storybook, you'll also have to adjust the StatusQ/storybook cmake files
This PR establishes communication between the Qt desktop app and the loaded wallet connect SDK via WebChannel.
More details on that topic can be found here:
https://doc.qt.io/qt-5/qtwebchannel-javascript.html
I see that as more Qt prone way of communication than dealing with timers.
I've tried to change as little as possible in comparison to the current code, therefore the UI remained the same and all changes within this PR relate to the bi-directional communication layer QtApp <==> WalletConnectSDK.
@stefandunca please have a look and let me know your opinion.