-
Notifications
You must be signed in to change notification settings - Fork 44
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
Web support #108
Comments
i will push PR when tests are ok or perhaps you prefer to have a PR now. Tell me |
Hello @redDwarf03! This is awesome, thanks, I'll take a look at WalletConnectFlutterV2 PR ASAP but just for you to know I have a PR for web support ready to be merged WalletConnect/WalletConnectFlutterV2#281 Regarding your |
Tests have been broken for a while and had not time to fix them honestly. If you want to add tests for your new code or whatever you feel relevant that would be awesome, otherwise I can try to take care of them when the time comes! 💪 |
my commit is from your web_support branch for info for WalletConnectFlutterV2 project |
Ah wonderful! Then I'll just merge it and continue my work from there. But for WalllectConnectFlutterV2 the work is almost done, only test are missing. For Web3Modal is a bit more trickier. Thanks for the help! |
can we exchange on discord or TG to facilitate the exchange or we exchange here? my goal is to be autonomous by i need some infos first :) |
Let's do it here, please, we like to be open by default. In any case I was planning to work on Web3Modal web support soon, so maybe you want to wait my PR and review it? As you please |
i can review it but i confess i would like to have it soon.. that's for it i'm trying to help you. |
Oh yeah, I thought you were talking about Web3Modal tests. Sorry my confusion. Yes, WalletConnectFlutterV2 tests are fine.
It's a priority for us but it's not going to be easy. We have a few dependencies on Web3Modal that are not supported on Web (like CoinbaseWalletSDK and some other more) and conditional importing these will be tricky. I honestly don't know the exact lift on this but the more I think of it the more I realize we will end up having a lightweight version of Web3Modal on web. Also, if all you need for now is simply stuff you could try support web on https://github.com/WalletConnect/WalletConnectModalFlutter. This is a lightweight modal from us |
@quetool @redDwarf03 - I am using the [WalletConnectModalFlutter] and so far it works well with the web , it just you need to some changes for redirecting the app to wallet in for the mobile browser |
@gvbinarybard Can you explain your solution in detail here? It would be very helpful. While usig on mobile browser - it opens a popup to redirect and open the wallet app. Once the wallet is opened and the trasaction is done - The wallet app redirects to the browser itself but on the popup tab instead of the main tab. You found any workaround to make this work perfectly? |
@kaumudpa - Sure In a Flutter PWA, when attempting to connect to a wallet using the Regarding your issue, yes even I faced the same issue and you can fix it by adding extra && condition Let me know if this helps |
Your solution for |
@kaumudpa - |
@gvbinarybard Redirecting works perfectly from the browser on mobile devices with But if we install this as an PWA - It stops working specially on ios. Your implementation of this part will be really helpful.
|
@gvbinarybard i will try to check https://github.com/WalletConnect/WalletConnectModalFlutter but my need is not with mobile browser. I create a DApp with flutter web and i would like to use with desktop and EVM Wallet extension chrome |
@redDwarf03 - Ah I see , I dont think so WalletConnectModal will be able to serve the Wallet extension |
@gvbinarybard do you know a solution for that please? |
@redDwarf03 - Well I haven't tried it but What I can think of ihacky way s to have a react app loaded inside a Flutter webview iframe |
FYI you can also try using this fork for Web: https://github.com/asmodeoux/Web3ModalFlutter/tree/ptal
I made it show the mobile QR code on the Web so you can scan it with your phone and approve the transactions there. Hope it might help the official development as well 👀 |
@quetool Now that walletconnect V2 is fully web supported. Can we expect this plugin to be web supported any time soon? |
hello @asmodeoux , i'm trying to execute example app in web mode with a project id filled, but i have an error when i launch the webapp
Should i do anything to test the example please |
@redDwarf03 I use it this way and works pretty well:
Basically, you init the service once the page is opened, after that you use the initialized instance |
I've tested @asmodeoux's version with this code and works fine.
|
Thank you @matteoberla and @asmodeoux . It works with your example. @quetool , is it possible to build a version on pub.dev for web please |
The @asmodeoux solution works only to generate the QR code tested using the example provided by @asmodeoux - but it does not open the installed wallet for connection request directly which [WalletConnectModalFlutter] does. Is there something i am missing? |
Hello guys! I would need to go through the code/changes, make lot of tests, check if anything breaks in other platforms and after that I could think about building a version but there's currently a lot in the bucket list. I assure you Web support is a priority to me (WalletConnectFlutterV2 is already done, also WalletConnectModalFlutter should be done soon enough) but right now is not possible for me to look at this for Web3Modal. Email Wallets is about to go out and there's so many other things to do. |
We are working on flutter web compatibility actually. |
@redDwarf03 The community will owe you big one if this actually sails through! All the best. Cant wait. |
Devil's advocate since this is taking forever. Why remain beholden to walletconnect's technical decisions and not write our own modal? The modal connects to injected providers in browsers and uses deeplinks on mobile. Browser extension support is the most important use case, not walletconnect with QR codes. The latter can be easily supported by integrating the SDK. |
Hello! We are prioritizing performance and reliability over Web support but that doesn't mean we are not going full cross-platform on Flutter. It is just not a priority right now for AppKit. On the other hand, and more interestingly, as a temporary workaround, nothings stops you to use the AppKit Javascript SDK in your Flutter project, it's easy enough, here a simple example project that I just wrote: https://github.com/quetool/web3modal_flutter_web That being said, for Flutter platform currently you have available walletconnect_flutter_v2 (that is full cross-platform) which is the fundamental and core SDK which you can use to create both Dapps and Wallets and then you also have walletconnect_modal_flutter which is the protocol-focused modal. It is true indeed, as @rollchad mentions, that even if these SDKs that I just mentioned runs and compiles on Web platforms they don't interact with injected wallets and that is something we plan to do in the future. Will update as soon as I have news... |
Just to be clear, AppKit Javascript SDK does interact with injected wallets, of course, I was referring to the Flutter SDKS that runs on web.... |
This is a very interesting approach. |
Hello @redDwarf03! I have merged it but I hope it's clear that this is just a quick example project that I opened on my personal profile to just explain the idea, it's nothing official... However, with a bit of love it could work great. And also, remember that this solution would cover only web platform, for mobile platforms you will need to go with the official approach, so, unless some complex interoperability is made, you will end up having two implementations of the modal. Again, In the future we are going to explorer this and more ideas to support web platforms properly on AppKit (Web3Modal) Thanks! |
Hehe... yes, I know, but we are trying to help you move in the right direction, step by step, even if my proposed change is just a small one |
New PR proposed quetool/web3modal_flutter_web#2 Enregistrement.de.l.ecran.2024-08-19.a.23.26.30.movNext step: try to call approval method from ERC20 contract |
Web compatibility requires a lot of debugging. Considering this, @quetool & @redDwarf03 solution seems more straightforward. |
@redDwarf03 This is a good approach - Your implementation runs seamlessly in desktop envs. Tried the same in mobile (WEB) env's but No Luck. You think we can implement it for mobile (WEB) env's as well? |
@kaumudpa We started a package to wrap Wagmi to Dart (Web target only) : https://github.com/archethic-foundation/wagmi_flutter_web This is WIP for now. We will probably focus on the few features we need right now. |
🙏🏼 To the community: If you have some idea about these 2 issues: |
Will contribute few hours every week as soon as you release RC. hopefully @gvbinarybard will also contribute. |
Just for info. We want to be compatible with WASM and last JS interoperability classes like described here: https://dart.dev/interop/js-interop |
i find a solution to solve JSBigint conversion I create this dart class based on dart test classes but i think dart core team should expose a method to manipulate Bigint and JSBigInt
and for example, i use |
Well... it's complicated... but we hope we'll get there, even if it's a long way. |
@redDwarf03 We have successfully implemented, |
With another project or with a fork ? |
We have forked the project - Sending you a temp PR shortly. |
@redDwarf03 Opened a PR - Please feel free to run the example & do let us know . |
@redDwarf03 Found the issue which you might be facing.
we need to use |
Good job from @kaumudpa |
@kaumudpa I forgot. To avoid double work, can you tell me which actions you're going to implement? |
@redDwarf03 We will be working on - |
Some news from wagmi_flutter_web lib to use Web3ModalFlutter with flutter_web Here is a status Status 🔴 Not Implemented Yet. For more details, refer to the API documentation.
And the error management is in progress |
Video_wagmi.mp4Flutter web + wagmi flutter web + wallet connect :) |
wagmi_flutter_web 1.0.0-rc.2 is available |
Hello @quetool
i'm trying to help you to support Flutter Web.
First, i've updated
WalletConnectFlutterV2
project:Work was well underway. The only change was to give priority to the
kIsWeb
control to prevent thePlatform
conditions from crashing in web mode.See: redDwarf03/WalletConnectFlutterV2@cc39bcf
After that, i've updated
Web3ModalFlutter
project with the same updates likeWalletConnectFlutterV2
about the order of the controls (kIsWeb
first)See: redDwarf03@19830a1
My current issue is about this message.
I think perhaps
api.web3modal
doesn't acceptplatform=platformtype.web
.Could you help me or confirm it to try go continue to test and update the lib to support web platform.
Thx!
The text was updated successfully, but these errors were encountered: