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: update web3auth deps and fix build #2228

Merged
merged 8 commits into from
Jun 13, 2024

Conversation

bengobeil
Copy link
Contributor

@bengobeil bengobeil commented Jun 10, 2024

Description

resolve #2056

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

@bengobeil bengobeil marked this pull request as draft June 10, 2024 19:10
@bengobeil bengobeil marked this pull request as ready for review June 10, 2024 19:18
@bengobeil
Copy link
Contributor Author

just have one question in the code pertaining to behavior for empty rpcUrl now that web3auth does not allow undefined

@bengobeil bengobeil marked this pull request as draft June 10, 2024 19:25
@bengobeil bengobeil marked this pull request as ready for review June 11, 2024 21:43
Copy link

socket-security bot commented Jun 11, 2024

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

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

Alert Package NoteSource
Protestware/Troll package npm/[email protected]
  • Note: This package prints a protestware console message on install regarding Ukraine for users with Russian language locale
Install scripts npm/[email protected]
  • Install script: postinstall
  • Source: node -e "try{require('./_postinstall')}catch(e){}" || exit 0
Install scripts npm/[email protected]
Install scripts npm/[email protected]
  • Install script: postinstall
  • Source: echo "[svelte-preprocess] Don't forget to install the preprocessors packages that will be used: sass, stylus, less, postcss & postcss-load-config, coffeescript, pug, etc..."
Install scripts npm/@sveltejs/[email protected]
  • Install script: postinstall
  • Source: node postinstall.js
Install scripts npm/[email protected]
Install scripts npm/[email protected]
  • Install script: install
  • Source: npm run rebuild || echo "Secp256k1 bindings compilation fail. Pure JS implementation will be used."
Install scripts npm/[email protected]
  • Install script: install
  • Source: npm run rebuild || echo "Keccak bindings compilation fail. Pure JS implementation will be used."

View full report↗︎

Next steps

What is protestware?

This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function.

Consider that consuming this package my come along with functionality unrelated to its primary purpose.

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.

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 ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@bengobeil
Copy link
Contributor Author

tested locally within our dapp
image

@bengobeil
Copy link
Contributor Author

@Adamj1232 ready for review! (can't add a reviewer it seems)

@bengobeil
Copy link
Contributor Author

@Adamj1232 ready for re-review, rpcUrl is required for web3auth

Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@babel/[email protected] environment 0 24.1 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 65.6 kB nicolo-ribaudo
npm/@babel/[email protected] environment, filesystem, unsafe +1 840 kB nicolo-ribaudo
npm/@babel/[email protected] None +3 797 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 52.2 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 6.72 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 21.7 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 6.99 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 63.7 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 158 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 127 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 14.1 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 10.8 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 31.8 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 49.3 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 11.8 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 859 kB nicolo-ribaudo
npm/@babel/[email protected] environment +1 47.2 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 1.89 MB nicolo-ribaudo
npm/@babel/[email protected] None 0 258 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 69 kB nicolo-ribaudo
npm/@babel/[email protected] None 0 634 kB nicolo-ribaudo
npm/@babel/[email protected] environment 0 2.41 MB nicolo-ribaudo
npm/@ensdomains/[email protected] None 0 2.21 MB makoto_inoue
npm/@ensdomains/[email protected] None 0 3.96 MB makoto_inoue
npm/@ensdomains/[email protected] None +2 15.8 MB nickjohnson
npm/@esbuild-plugins/[email protected] Transitive: environment, filesystem, network, shell +24 227 MB xmorse
npm/@esbuild-plugins/[email protected] filesystem Transitive: environment, network, shell, unsafe +31 229 MB xmorse
npm/@eslint-community/[email protected] None 0 375 kB eslint-community-bot
npm/@ethereumjs/[email protected] None +3 6.45 MB holgerd77
npm/@ethereumjs/[email protected] None +1 4.02 MB holgerd77
npm/@ethersproject/[email protected] None 0 495 kB ricmoo
npm/@ethersproject/[email protected] None 0 498 kB ricmoo
npm/@ethersproject/[email protected] None 0 61 kB ricmoo
npm/@ethersproject/[email protected] None 0 82.2 kB ricmoo
npm/@ethersproject/[email protected] None 0 33.1 kB ricmoo
npm/@ethersproject/[email protected] None 0 11.3 kB ricmoo
npm/@ethersproject/[email protected] None 0 30.1 kB ricmoo
npm/@ethersproject/[email protected] None 0 143 kB ricmoo
npm/@ethersproject/[email protected] None 0 80.9 kB ricmoo
npm/@ethersproject/[email protected] None 0 18.7 kB ricmoo
npm/@ethersproject/[email protected] None 0 249 kB ricmoo
npm/@ethersproject/[email protected] None 0 250 kB ricmoo
npm/@ethersproject/[email protected] None 0 257 kB ricmoo
npm/@ethersproject/[email protected] None 0 81 kB ricmoo
npm/@ethersproject/[email protected] None 0 80.7 kB ricmoo
npm/@ethersproject/[email protected] None +2 2.78 MB ricmoo
npm/@ethersproject/[email protected] None 0 125 kB ricmoo
npm/@ethersproject/[email protected] None +1 59 kB ricmoo
npm/@ethersproject/[email protected] None 0 46.8 kB ricmoo
npm/@ethersproject/[email protected] None 0 47.5 kB ricmoo
npm/@ethersproject/[email protected] None 0 17.4 kB ricmoo
npm/@ethersproject/[email protected] None 0 31 kB ricmoo
npm/@ethersproject/[email protected] network +1 1.12 MB ricmoo
npm/@ethersproject/[email protected] network 0 1.2 MB ricmoo
npm/@ethersproject/[email protected] None 0 17.3 kB ricmoo
npm/@ethersproject/[email protected] None 0 29.6 kB ricmoo
npm/@ethersproject/[email protected] None 0 21.7 kB ricmoo
npm/@ethersproject/[email protected] None 0 244 kB ricmoo
npm/@ethersproject/[email protected] None 0 23.2 kB ricmoo
npm/@ethersproject/[email protected] None 0 23.2 kB ricmoo
npm/@ethersproject/[email protected] None 0 119 kB ricmoo
npm/@ethersproject/[email protected] None 0 89.6 kB ricmoo
npm/@ethersproject/[email protected] None 0 20.2 kB ricmoo
npm/@ethersproject/[email protected] None 0 20.2 kB ricmoo
npm/@ethersproject/[email protected] None 0 55.5 kB ricmoo
npm/@ethersproject/[email protected] None 0 55.2 kB ricmoo
npm/@ethersproject/[email protected] network 0 127 kB ricmoo
npm/@ethersproject/[email protected] network 0 128 kB ricmoo
npm/@ethersproject/[email protected] None 0 390 kB ricmoo
npm/@fontsource/[email protected] None 0 1.02 MB lotusdevshack
npm/@jridgewell/[email protected] None 0 52.4 kB jridgewell
npm/@jridgewell/[email protected] None 0 40 kB jridgewell
npm/@ledgerhq/[email protected] None +1 95.8 kB gre
npm/@ledgerhq/[email protected] None 0 90.7 kB gre
npm/@ledgerhq/[email protected] None 0 68.2 kB gre
npm/@lit/[email protected] None +1 800 kB lit-robot
npm/@playwright/[email protected] environment, eval, filesystem, network, shell, unsafe +1 6.31 MB aslushnikov
npm/@rollup/[email protected] filesystem Transitive: environment +12 861 kB shellscape
npm/@sindresorhus/[email protected] None 0 88.6 kB sindresorhus
npm/@stablelib/[email protected] None +3 157 kB dchest
npm/@sveltejs/[email protected] environment, filesystem, shell +1 78.4 kB svelte-admin
npm/@sveltejs/[email protected] environment, eval, filesystem Transitive: network, unsafe +20 2.75 MB svelte-admin
npm/@synthetixio/[email protected] environment, filesystem Transitive: eval, network, unsafe +102 38 MB drptbl
npm/@szmarczak/[email protected] None 0 10.8 kB szmarczak
npm/@truffle/[email protected] None +2 3.87 MB eggplantzzz
npm/@truffle/[email protected] None 0 13.6 kB eggplantzzz
npm/@truffle/[email protected] None +5 12.9 MB eggplantzzz
npm/@truffle/[email protected] None 0 277 kB eggplantzzz
npm/@truffle/[email protected] Transitive: network +17 55.7 MB eggplantzzz
npm/@types/[email protected] None +4 3.66 MB types
npm/@types/[email protected] None 0 9.76 kB types
npm/@types/[email protected] None 0 25.7 kB types
npm/@types/[email protected] None +3 3.69 MB types
npm/@types/[email protected] None +4 3.66 MB types
npm/@types/[email protected] None +2 3.64 MB types
npm/@types/[email protected] None 0 17.9 kB types
npm/@typescript-eslint/[email protected] Transitive: environment, filesystem +26 5.69 MB jameshenry
npm/@typescript-eslint/[email protected] Transitive: environment, filesystem +15 1.98 MB jameshenry
npm/@walletconnect/[email protected] None 0 103 kB gancho_walletconnect
npm/@walletconnect/[email protected] None +1 188 kB gancho_walletconnect
npm/@walletconnect/[email protected] None +1 345 kB gancho_walletconnect
npm/@walletconnect/[email protected] None 0 215 kB gancho_walletconnect
npm/@walletconnect/[email protected] None 0 218 kB bkrem
npm/@web3-onboard/[email protected] Transitive: environment, network +16 17.6 MB cmeisl
npm/@web3-onboard/[email protected] network Transitive: environment, filesystem +45 28 MB cmeisl
npm/@web3-onboard/[email protected] None +7 1.19 MB cmeisl
npm/@web3-onboard/[email protected] Transitive: environment, eval, filesystem, network, unsafe +171 33.1 MB cmeisl
npm/[email protected] None +2 50.9 kB sindresorhus
npm/[email protected] Transitive: environment, eval +9 357 kB ljharb
npm/[email protected] None 0 3.68 kB cwmma
npm/[email protected] None +1 980 kB dignifiedquire
npm/[email protected] None +5 100 kB ljharb
npm/[email protected] None +12 334 kB cwmma
npm/[email protected] None +1 125 kB medikoo
npm/[email protected] environment +1 49.2 kB qix
npm/[email protected] None 0 30.4 kB tehshrike
npm/[email protected] None +1 39.4 kB ljharb
npm/[email protected] None +2 148 kB indutny
npm/[email protected] eval +1 402 kB medikoo
npm/[email protected] None +2 131 kB medikoo
npm/[email protected] None 0 18.2 kB lydell
npm/[email protected] None 0 41.3 kB conduitry
npm/[email protected] filesystem Transitive: environment, shell, unsafe +61 8.93 MB eslintbot
npm/[email protected] Transitive: network +25 12.6 MB ricmoo
npm/[email protected] filesystem +1 148 kB mrmlnc
npm/[email protected] eval +5 127 kB ljharb
npm/[email protected] None +1 38.2 kB ljharb
npm/[email protected] None 0 6.03 kB dcousens
npm/[email protected] Transitive: filesystem, unsafe +3 19.8 kB sindresorhus
npm/[email protected] None +3 57.8 kB isaacs
npm/[email protected] None 0 33.2 kB substack
npm/[email protected] None 0 7.65 kB medikoo
npm/[email protected] Transitive: unsafe +2 167 kB ljharb
npm/[email protected] environment 0 254 kB dummdidumm
npm/[email protected] environment, filesystem, unsafe 0 11.7 MB prettier-bot
npm/[email protected] environment +5 147 kB matteo.collina
npm/[email protected] None +3 1.52 MB fredkschott
npm/[email protected] None 0 4.49 MB blesh
npm/[email protected] None +1 44.8 kB lukeed
npm/[email protected] Transitive: environment, filesystem +10 4.76 MB svelte-language-tools-deploy
npm/[email protected] environment, filesystem Transitive: eval +21 2.88 MB dummdidumm
npm/[email protected] None 0 9.74 MB conduitry
npm/[email protected] None +1 57.9 kB gkz
npm/[email protected] None +1 624 kB achingbrain
npm/[email protected] environment, eval, filesystem, network, shell, unsafe +29 213 MB vitebot
npm/[email protected] None +5 122 kB ljharb

🚮 Removed packages: npm/@ampproject/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@babel/[email protected], npm/@jridgewell/[email protected], npm/@jridgewell/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@protobufjs/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/@types/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected], npm/[email protected]

View full report↗︎

@bengobeil
Copy link
Contributor Author

yarn check-all passes locally @Adamj1232 one check is failing but from what I can see it originates from another merged PR

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 PR!

@Adamj1232 Adamj1232 merged commit 4d47a5c into blocknative:develop Jun 13, 2024
2 of 3 checks passed
@Adamj1232
Copy link
Member

@bengobeil Im getting this error running the alpha branch - does privateKeyProvider need to be added to web3Auth init props?
Screenshot 2024-06-13 at 13 44 32

@bengobeil
Copy link
Contributor Author

@bengobeil Im getting this error running the alpha branch - does privateKeyProvider need to be added to web3Auth init props? Screenshot 2024-06-13 at 13 44 32

Yes, looks like this when I initialize it

image

@bengobeil
Copy link
Contributor Author

@bengobeil Im getting this error running the alpha branch - does privateKeyProvider need to be added to web3Auth init props? Screenshot 2024-06-13 at 13 44 32

Yes, looks like this when I initialize it

image

from package @web3auth/ethereum-provider

@Adamj1232
Copy link
Member

Adamj1232 commented Jun 13, 2024

@bengobeil Ok well I will need to revert this merge as it doesnt look like it was tested with the internal demo app or updated for the necessary props

@bengobeil
Copy link
Contributor Author

@Adamj1232 OK, I tried using the demo app with the current version (without my changes) and it didn't seem to work either. I think there is a react dependency.

I think the same props in a react app and it worked (the demo is with svelte).

As for the new props, how do you want to handle that?

@Adamj1232
Copy link
Member

@bengobeil new props will need to be added to the Web3AuthModuleInitOptions type here -

type Web3AuthModuleOptions = Omit<Web3AuthOptions, 'chainConfig'> & {

Then after checking with the internal svelte demo that it works we can test again.
If there is a react dependency then it may need to be added to the web3auth package.json - possibly as a peer-dep depending on how its setup

@bengobeil
Copy link
Contributor Author

@Adamj1232 it seems privateKeyProvider is already in the props as part of Web3AuthOptions
image

@bengobeil
Copy link
Contributor Author

you should get a compiler error if it's not present

@bengobeil
Copy link
Contributor Author

I will however try to get it working with the demo

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.

[Feature]: Update web3auth connector to latest version of their SDK
2 participants