Skip to content
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

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

saledjenic
Copy link
Contributor

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.

…nd loaded wallet connect sdk is made via web channel
@status-im-auto
Copy link
Member

status-im-auto commented Nov 16, 2023

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 46e94d3 #1 2023-11-16 15:32:13 ~7 min tests/nim 📄log
✔️ 46e94d3 #1 2023-11-16 15:33:15 ~8 min macos/aarch64 🍎dmg
✔️ 46e94d3 #1 2023-11-16 15:36:49 ~12 min tests/ui 📄log
✔️ 46e94d3 #1 2023-11-16 15:39:41 ~14 min macos/x86_64 🍎dmg
✔️ 46e94d3 #1 2023-11-16 15:43:01 ~18 min linux/x86_64 📦tgz
✔️ 46e94d3 #1 2023-11-16 15:53:34 ~28 min windows/x86_64 💿exe
✖️ 46e94d3 #1 2023-11-16 16:02:05 ~37 min tests/e2e 📄log
✖️ 46e94d3 #2 2023-11-17 09:05:19 ~31 min tests/e2e 📄log
✔️ 46e94d3 #3 2023-11-17 09:44:07 ~29 min tests/e2e 📄log

Copy link
Contributor

@stefandunca stefandunca left a 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)"
Copy link
Collaborator

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it should be.

Copy link
Member

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

@saledjenic saledjenic merged commit 48c9e37 into master Nov 17, 2023
8 of 9 checks passed
@saledjenic saledjenic deleted the wc_sdk_communication_improvements branch November 17, 2023 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants