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

feat: add Venly connector to packages #1660

Merged
merged 21 commits into from
Jun 1, 2023

Conversation

davidzwfu
Copy link
Contributor

@davidzwfu davidzwfu commented Apr 24, 2023

Description

Hello, David from the Venly team here.
Opening this PR to get our Venly wallet connector added to the list of packages.

Checklist

  • Increment the version field in package.json of the package you have made changes in following semantic versioning and using alpha release tagging
  • Check the box that allows repo maintainers to update this PR
  • Test locally to make sure this feature/fix works
  • Run yarn check-all to confirm there are not any associated errors
  • Confirm this PR passes Circle CI checks
  • Add or update relevant information in the documentation

If this PR includes changes to add an injected wallet or SDK wallet module:

Please complete the following using the internal demo package.
To run this demo use the command yarn && yarn dev to get the project running at http://localhost:8080/

Tests with demo app (SDK)

  • send transaction
  • switch chains
  • sign message
  • sign typed message
  • disconnect

@vercel
Copy link

vercel bot commented Apr 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web3-onboard-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 1, 2023 3:21pm

@socket-security
Copy link

socket-security bot commented Apr 24, 2023

No dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

@leightkt
Copy link
Contributor

@davidzwfu Will you please also include a README for Venly for the docs site: https://github.com/blocknative/web3-onboard/tree/develop/docs/src/routes/docs/%5B...4%5Dwallets

@davidzwfu
Copy link
Contributor Author

@davidzwfu Will you please also include a README for Venly for the docs site: https://github.com/blocknative/web3-onboard/tree/develop/docs/src/routes/docs/%5B...4%5Dwallets

Added

packages/venly/README.md Outdated Show resolved Hide resolved
davidzwfu and others added 3 commits April 28, 2023 20:14
Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
packages/venly/README.md Outdated Show resolved Hide resolved
@Adamj1232
Copy link
Member

I get an error like this with my pin of 6 digits
Screenshot 2023-05-16 at 10 09 33 AM
Also, when my pin was set to 4 digits I got a similar error that said it needed to be 6 digits
Couldn't connect to the account I made through the main Venly page at all that had a wallet setup (maybe production)
Doesnt seem to be an issue with the web3-onboard wallet module but rather the Venly login.
Im on silicon macbook using chrome

@davidzwfu
Copy link
Contributor Author

I get an error like this with my pin of 6 digits Screenshot 2023-05-16 at 10 09 33 AM Also, when my pin was set to 4 digits I got a similar error that said it needed to be 6 digits Couldn't connect to the account I made through the main Venly page at all that had a wallet setup (maybe production) Doesnt seem to be an issue with the web3-onboard wallet module but rather the Venly login. Im on silicon macbook using chrome

It sounds like you might have mixed up the environments. You can tell the env you're on by looking at the url.

For example:
wallet.venly.io vs wallet-staging.venly.io
login.venly.io vs login-staging.venly.io

Can you verify which one the error is happening on?

@Adamj1232
Copy link
Member

This is happening on staging from the web3-onboard internal svelte demo app.
This occurs after I have setup an account through the modal that is popped from the demo. I havent altered anything within the internal demo from your fork/branch which is where I am testing from.

@Adamj1232
Copy link
Member

Adamj1232 commented May 16, 2023

@davidzwfu I just tried again with the exact same flow and was able to connect - maybe an issue with caching or race condition getting account setup...? 🤷🏼‍♂️
I can confirm I am still unable to sign a message as I get error incorrect pin (its a very simple pin)
And when I switch chains I get an Incorrect origin message in the Venly window + console errors
Screenshot 2023-05-16 at 10 54 36 AM

@davidzwfu
Copy link
Contributor Author

@davidzwfu I just tried again with the exact same flow and was able to connect - maybe an issue with caching or race condition getting account setup...? 🤷🏼‍♂️ I can confirm I am still unable to sign a message as I get error incorrect pin (its a very simple pin) And when I switch chains I get an Incorrect origin message in the Venly window + console errors Screenshot 2023-05-16 at 10 54 36 AM

Sorry forgot to mention, the way we have it setup is that mainnet chains use the production environment while testnet chains use staging (that clientId is only setup for staging). If you want to be able to switch between both I'll have to set up your blocknative clientId for production as well.

Also I'm a bit confused by the PIN error. The screenshot you showed was for creating a new wallet (each wallet has its own PIN). Could you help me understand that issue?

@Adamj1232
Copy link
Member

Ah gotcha, that info about the chains would be really helpful to add to the README and the docs.
When signing a message I get this error from the internal svelte demo:
Screenshot 2023-05-16 at 11 15 15 AM

@davidzwfu
Copy link
Contributor Author

@Adamj1232 I've updated the docs with information about networks/environments and modified the Venly provider to throw an error when attempting to switch between environments (support for switching between environments is in the works).

Regarding your issues, last week we had some data migration for our staging environment which was causing weird errors for newly created wallets. If you're still having issues please let me know the wallet addresses you are using so I can look into it.

Also your clientId is now enabled for use on production at the domains onboard.blocknative.com and reactdemo.blocknative.com

@Adamj1232
Copy link
Member

@davidzwfu sounds good and thank you! I will give it a run through some testing now and update here as that progresses.

@Adamj1232
Copy link
Member

@davidzwfu Can you give me write access on this fork?
When I pulled down this branch and ran the internal demo I noted

  • The Venly package isn't added to the packages/demo where the testing should take place by running yarn dev from the root of the project
  • Sepolia test network wasnt supported
  • When switching to a to mainnet or an L2 while on the venly staging env there is no feedback so it doesnt look like chain handling is correct
  • When switching to Polygon - Mumbai and signing a typed message I get a console error which is fine if its not supported but then the chain switches back to Goerli
  • Signing a message on Goerli gives me this error still:
Screenshot 2023-05-22 at 10 04 47 AM

@Adamj1232
Copy link
Member

@davidzwfu thank you for the access - I pushed some changes to the internal demo for testing. As stated above I am still seeing some errors on the wallet side - if they are expected thats fine just wanted to raise with you/your team in case they were an issue

@davidzwfu
Copy link
Contributor Author

@davidzwfu thank you for the access - I pushed some changes to the internal demo for testing. As stated above I am still seeing some errors on the wallet side - if they are expected thats fine just wanted to raise with you/your team in case they were an issue

Could you please copy for me the full address of the wallet you were having issues with? I'll have the back-end team look into it.

@Adamj1232
Copy link
Member

@davidzwfu thank you for the access - I pushed some changes to the internal demo for testing. As stated above I am still seeing some errors on the wallet side - if they are expected thats fine just wanted to raise with you/your team in case they were an issue

Could you please copy for me the full address of the wallet you were having issues with? I'll have the back-end team look into it.

@davidzwfu the staging address Im using for testing is 0xd36c45A1B04e8a6140f411D0FEF662F65Cc126F0

@davidzwfu
Copy link
Contributor Author

@Adamj1232 Updated to our latest release which supports switching between main and test networks (provided that your domain is configured for production use). Also updated the docs with our list of supported networks.

Regarding your previous issues:

  • I've gone ahead and reset your staging wallet so you should be able to properly sign messages now (turns out your wallet's metadata was corrupted in the previous migration)
  • At the moment we only support Goerli but have plans to migrate to Sepolia following deprecation
  • I can't seem to get any error feedback when switching to an unsupported chain, despite returning the appropriate RPC error on the provider side.
  • Still unknown to me why signing typed messages in Polygon reverts the chain back to Goerli. Logic for switching chains is technically only called when 'wallet_switchEthereumChain' method is requested.

Copy link
Member

@Adamj1232 Adamj1232 left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you for the collaborative effort getting Venly support through! If you would be interested in some co marketing please let me know and I can put you in touch with the BD leads here.

@Adamj1232 Adamj1232 merged commit 40898a9 into blocknative:develop Jun 1, 2023
@Adamj1232
Copy link
Member

@davidzwfu we are seeing an error when adding Venly to our docs/demo site - please pull down the latest develop, cd docs/ yarn, comment in venly within the wallets array here and yarn dev and select venly to see error require is not defined
Unfortunately until we have resolution here we cannot promote the Venly package or support

@Adamj1232 Adamj1232 mentioned this pull request Jun 1, 2023
@davidzwfu
Copy link
Contributor Author

@davidzwfu we are seeing an error when adding Venly to our docs/demo site - please pull down the latest develop, cd docs/ yarn, comment in venly within the wallets array here and yarn dev and select venly to see error require is not defined Unfortunately until we have resolution here we cannot promote the Venly package or support

I managed to fix that error by removing 'http' from line 31 of vite.config.js, but now I'm getting a different error about my imports being undefined.

@Adamj1232
Copy link
Member

@davidzwfu interesting - I had initially added http to fix this error when opening Venly
We are on node 16.18.1
Screenshot 2023-06-02 at 10 12 09 AM

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.

3 participants