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 blocto wallet #1699

Merged
merged 27 commits into from
Jun 14, 2023
Merged

feat: add blocto wallet #1699

merged 27 commits into from
Jun 14, 2023

Conversation

sanyu1225
Copy link
Contributor

Description

add Blocto wallet

PLEASE NOTE- Checklist must be complete prior to review.

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

Docs Checklist

  • Include a screenshot of any changes (see docs README on running locally)
  • Add/update the appropriate package README (if applicable)
  • Add/update the related module in the docs demo (if applicable)
  • Add/update the related package in the docs/package.json file (if applicable)

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 (injected)

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

Tests with demo app (SDK)

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

@vercel
Copy link

vercel bot commented May 10, 2023

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

Name Status Preview Comments Updated (UTC)
web3-onboard-docs ❌ Failed (Inspect) Jun 14, 2023 8:13pm

@socket-security
Copy link

socket-security bot commented May 10, 2023

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Issue Package Version Note Source
Install scripts web3 1.10.0
  • Install script: postinstall
  • Source: echo "Web3.js 4.x alpha has been released for early testing and feedback. Checkout doc at https://docs.web3js.org/ "
package.json via @dapperlabs/dappauth@2.0.5, packages/demo/package.json via @dapperlabs/dappauth@2.0.5
Network access @blocto/sdk 0.4.6 packages/blocto/package.json
Network access abortcontroller-polyfill 1.7.5 package.json via @dapperlabs/dappauth@2.0.5, packages/demo/package.json via @dapperlabs/dappauth@2.0.5
Network access web3-providers-http 1.10.0 package.json via @dapperlabs/dappauth@2.0.5, packages/demo/package.json via @dapperlabs/dappauth@2.0.5

Next steps

What is an install script?

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

What is network access?

This module accesses the network.

Packages should remove all network access that isn't functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

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

  • @SocketSecurity ignore web3@1.10.0
  • @SocketSecurity ignore @blocto/sdk@0.4.6
  • @SocketSecurity ignore abortcontroller-polyfill@1.7.5
  • @SocketSecurity ignore web3-providers-http@1.10.0

@leightkt
Copy link
Contributor

Went to test in the demo app and received this message:
Insufficient Blocto points for creating Ethereum Wallet
Please go to Blocto App to purchase points and create wallet

Downloaded the app and it says I have 1000 trail points- but same message when I try to login with the same email on the demo.

@leightkt
Copy link
Contributor

Please use the existing packages as a guide and add blocto to .circleci/config.yml jobs

@sanyu1225
Copy link
Contributor Author

Went to test in the demo app and received this message: Insufficient Blocto points for creating Ethereum Wallet Please go to Blocto App to purchase points and create wallet

Downloaded the app and it says I have 1000 trail points- but same message when I try to login with the same email on the demo.

Since Blocto operates as a contract wallet, creating a wallet requires gas fees. However, Blocto provides the ability to pay with Blocto Points. Therefore, I have changed the default chain in the demo to a chain with lower gas fees. You can now attempt it again. Thank @leightkt 🙏

@@ -0,0 +1,47 @@
# Blocto
Copy link
Contributor

Choose a reason for hiding this comment

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

There have been some changes to the docs structure (we just upgraded to @svelteness/kit-docs 1.1.3)- so you'll want to make a new folder [...1]blocto with this readme as a +page.md within that folder
(make sure you rename the following wallet folders with updated numerical order i.e. [...2]coinbase [...3]dcent . . . etc)

@leightkt
Copy link
Contributor

@sanyu1225 Thanks for updating! I was able to connect/disconnect a wallet, sign a message, and sign a typed message. I can't test sending a transaction (no MATIC atm)- can you confirm you've successfully sent a transaction on the demo?

I left a note about a recent docs restructure- you'll need to move your wallet's readme around a little to fit the new file system.

packages/demo/src/App.svelte Outdated Show resolved Hide resolved
packages/demo/src/App.svelte Outdated Show resolved Hide resolved
@leightkt
Copy link
Contributor

One more note- you'll want to add Blocto to docs/src/lib/services/onboard.js so it's available in the docs connection module.

@sanyu1225
Copy link
Contributor Author

Sure, I provide the gif of the transaction I just tested and successful tx

sendTx_gif

@sanyu1225 Thanks for updating! I was able to connect/disconnect a wallet, sign a message, and sign a typed message. I can't test sending a transaction (no MATIC atm)- can you confirm you've successfully sent a transaction on the demo?

I left a note about a recent docs restructure- you'll need to move your wallet's readme around a little to fit the new file system.

@leightkt
Copy link
Contributor

@sanyu1225 This is looking great- just a few minor tweaks- Can you give me access to the repo so I can push up a few changes? (like moving the blocto docs folder position)

@scottphc
Copy link
Contributor

@sanyu1225 This is looking great- just a few minor tweaks- Can you give me access to the repo so I can push up a few changes? (like moving the blocto docs folder position)

Hey @leightkt you have the permission now :)

docs/package.json Outdated Show resolved Hide resolved
@leightkt
Copy link
Contributor

leightkt commented Jun 1, 2023

@sanyu1225 I have been trying to send a TX to a MM wallet- none of the TX from my blocto wallet have gone through to my MM wallet:
https://mumbai.polygonscan.com/address/0xBB7050947E6a523A2dd42566dE928554BE4eD604

My blocto wallet:
https://mumbai.polygonscan.com/address/0x9a65d7f85c2e6bfaf21e3c17f3ba3dd326c4838b#internaltx

Until you can confirm on your end that the target wallet receives the funds from the contract we are on hold for testing.

@scottphc
Copy link
Contributor

scottphc commented Jun 1, 2023

@sanyu1225 I have been trying to send a TX to a MM wallet- none of the TX from my blocto wallet have gone through to my MM wallet: https://mumbai.polygonscan.com/address/0xBB7050947E6a523A2dd42566dE928554BE4eD604

My blocto wallet: https://mumbai.polygonscan.com/address/0x9a65d7f85c2e6bfaf21e3c17f3ba3dd326c4838b#internaltx

Until you can confirm on your end that the target wallet receives the funds from the contract we are on hold for testing.

@leightkt you can check internal txs of your MM wallet https://mumbai.polygonscan.com/address/0xBB7050947E6a523A2dd42566dE928554BE4eD604#internaltx

There are 3 transfers from your Blocto to your MM wallet.

@leightkt
Copy link
Contributor

leightkt commented Jun 1, 2023

@sanyu1225 Ah thank you for pointing that out- didn't realize I should have been looking in internal transactions!

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! Thanks for the collaboration! Are their any noted build/bundling env issues that should be noted to run Blocto? For an example of the most popular frameworks and envs we try to support have a look within the examples folder

@sanyu1225
Copy link
Contributor Author

Looks good! Thanks for the collaboration! Are their any noted build/bundling env issues that should be noted to run Blocto? For an example of the most popular frameworks and envs we try to support have a look within the examples folder

You can refer to the Blocto documentation for more information. If you encounter any issues while adding an example to a mainstream framework, please let me know. Thank @leightkt @Adamj1232

@Adamj1232
Copy link
Member

Looks good! Thanks for the collaboration! Are their any noted build/bundling env issues that should be noted to run Blocto? For an example of the most popular frameworks and envs we try to support have a look within the examples folder

You can refer to the Blocto documentation for more information. If you encounter any issues while adding an example to a mainstream framework, please let me know. Thank @leightkt @Adamj1232

Please add this information to the Blocto package README and Docs pages. It will save us a lot of time down the road going hunting for this info

@sanyu1225
Copy link
Contributor Author

Looks good! Thanks for the collaboration! Are their any noted build/bundling env issues that should be noted to run Blocto? For an example of the most popular frameworks and envs we try to support have a look within the examples folder

You can refer to the Blocto documentation for more information. If you encounter any issues while adding an example to a mainstream framework, please let me know. Thank @leightkt @Adamj1232

Please add this information to the Blocto package README and Docs pages. It will save us a lot of time down the road going hunting for this info

Thank you for your suggestion! This information is already included in README.md file for easy reference. If you have any other suggestions or need further information, please feel free to let us know.

@Adamj1232
Copy link
Member

Looks good! Thanks for the collaboration! Are their any noted build/bundling env issues that should be noted to run Blocto? For an example of the most popular frameworks and envs we try to support have a look within the examples folder

You can refer to the Blocto documentation for more information. If you encounter any issues while adding an example to a mainstream framework, please let me know. Thank @leightkt @Adamj1232

Please add this information to the Blocto package README and Docs pages. It will save us a lot of time down the road going hunting for this info

Thank you for your suggestion! This information is already included in README.md file for easy reference. If you have any other suggestions or need further information, please feel free to let us know.

I dont see any mention of build env setting within the docs or README just a link to your docs. Would really like to see build settings docs there or direct links to build configs so we dont have to go hunting for it down the road.
Within the docs pages for the core module we also keep up-to-date required build configs for supported envs. Please add any necessary there - https://github.com/blocknative/web3-onboard/blob/develop/docs/src/routes/docs/%5B...3%5Dmodules/%5B...1%5Dcore/%2Bpage.md#build-environments

@socket-security
Copy link

New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives1 Size Publisher
@blocto/sdk 🆕 0.4.6 network +0 903 kB chiakic
@dapperlabs/dappauth 🆕 2.0.5 None +48 17 MB callmenick

Footnotes

  1. https://docs.socket.dev

@leightkt
Copy link
Contributor

@sanyu1225 just checking in so we can hopefully wrap this up ASAP- do you have any build configs or direct links to build configs to add to documentation?

@sanyu1225
Copy link
Contributor Author

@sanyu1225 just checking in so we can hopefully wrap this up ASAP- do you have any build configs or direct links to build configs to add to documentation?

@leightkt I have added a minimum requirement of ES6 and included the configuration method for webpack, Thanks.

@leightkt leightkt merged commit 348dcbf into blocknative:develop Jun 14, 2023
leightkt added a commit that referenced this pull request Jun 27, 2023
* update Google Analytics Script (#1770)

* feat: add OneKey wallet  (#1739)

* feat: Support OneKey wallet

* fix: OneKey docs

* Update injected package.json version

* Update demo package.json

---------

Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>

* Fix: Connect view on safari mobile & Remove unnecessary validation check for autoSelect (#1773)

* working as expected

* Bump versions

* Remove testing css

* Remove testing code from demo

* feat: add blocto wallet (#1699)

* Release 2.24.1 (develop) (#1776)

* Release 2.24.1 (docs) (#1778)

* Update +page.md (#1775)

* Feature- update appMetadata (#1779)

* update versions

* Upgrade wallet connect v2 packages (#1788)

---------

Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
Co-authored-by: ByteZhang <ByteZhang@protonmail.com>
Co-authored-by: jimmy.pan <pan831225@gmail.com>
Co-authored-by: vanes <vanessa.mercado24@gmail.com>
leightkt added a commit that referenced this pull request Jun 27, 2023
* update Google Analytics Script (#1770)

* feat: add OneKey wallet  (#1739)

* feat: Support OneKey wallet

* fix: OneKey docs

* Update injected package.json version

* Update demo package.json

---------

Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>

* Fix: Connect view on safari mobile & Remove unnecessary validation check for autoSelect (#1773)

* working as expected

* Bump versions

* Remove testing css

* Remove testing code from demo

* feat: add blocto wallet (#1699)

* Release 2.24.1 (develop) (#1776)

* Release 2.24.1 (#1777)

* Update +page.md (#1775)

* Feature- update appMetadata (#1779)

* update versions

* Upgrade wallet connect v2 packages (#1788)

---------

Co-authored-by: Adam Carpenter <adamcarpenter86@gmail.com>
Co-authored-by: ByteZhang <ByteZhang@protonmail.com>
Co-authored-by: jimmy.pan <pan831225@gmail.com>
Co-authored-by: vanes <vanessa.mercado24@gmail.com>
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.

4 participants