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

adapt to eip-1193 provider changes #190

Merged
merged 4 commits into from
Jul 17, 2024

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jul 11, 2024

Following the update to SafeEventEmitterProvider to support EIP-1193, please note the following changes in the PR:

  • The use of sendAsync is being deprecated; we should now use request instead.
    • This change is reflected in the PPOMController.
    • Additionally, several tests that pass a mock provider to the controller have been updated to mock request instead of sendAsync to match the new type requirements.

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner July 11, 2024 14:51
Copy link

socket-security bot commented Jul 11, 2024

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

Package New capabilities Transitives Size Publisher
npm/@metamask/json-rpc-engine@9.0.0 None +1 196 kB metamaskbot
npm/@metamask/network-controller@20.0.0 environment Transitive: filesystem, network +49 8.42 MB metamaskbot
npm/@metamask/rpc-errors@6.3.1 Transitive: network +13 2.36 MB metamaskbot
npm/@noble/hashes@1.4.0 None 0 773 kB paulmillr
npm/tslib@2.6.3 None 0 84.9 kB typescript-bot

🚮 Removed packages: npm/@metamask/network-controller@17.2.0, npm/@metamask/rpc-errors@6.1.0, npm/tslib@2.6.2

View full report↗︎

Copy link

socket-security bot commented Jul 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 NoteSourceCI
New author npm/@metamask/eth-json-rpc-infura@9.1.0 🚫
New author npm/@spruceid/siwe-parser@2.1.0 🚫

View full report↗︎

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

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/foo@1.0.0 or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore npm/@metamask/eth-json-rpc-infura@9.1.0
  • @SocketSecurity ignore npm/@spruceid/siwe-parser@2.1.0

@cryptodev-2s cryptodev-2s requested review from mcmire and kanthesha July 11, 2024 21:34
@mcmire mcmire requested a review from a team July 16, 2024 15:19
Copy link
Collaborator

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

This looks good, I just had one comment.

src/ppom-controller.ts Outdated Show resolved Hide resolved
@cryptodev-2s cryptodev-2s requested a review from mcmire July 17, 2024 16:07
Copy link
Collaborator

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

LGTM!

@cryptodev-2s cryptodev-2s merged commit d913d8d into main Jul 17, 2024
15 of 16 checks passed
@cryptodev-2s cryptodev-2s deleted the feat/adapt-eip-1193-provider-changes branch July 17, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Adapt to EIP-1193 provider changes
2 participants