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 #4442

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Jun 20, 2024

Explanation

After updating the SafeEventEmitterProvider to support EIP-1193, I have made the following changes:

  • Deprecated the use of sendAsync and replaced it with the request method.
    • Updated instances in the core repository:
      • NetworkController tests
    • Modified areas where we previously expected the provider returned by NetworkController to have a sendAsync method. These now use the request method with the correct method signature:
      • SelectedNetworkController tests
      • createAutoManagedNetworkClient tests

References

Changelog

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner June 20, 2024 15:02
Copy link

socket-security bot commented Jun 20, 2024

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

👍 No dependency changes detected in pull request

@cryptodev-2s cryptodev-2s force-pushed the adapt-to-eip-1193-provider-changes branch from d19b2a3 to c426abe Compare June 20, 2024 15:05
@mcmire mcmire requested a review from a team June 21, 2024 22:18
@cryptodev-2s cryptodev-2s force-pushed the adapt-to-eip-1193-provider-changes branch 3 times, most recently from cf1da22 to 4eb212c Compare July 8, 2024 23:31
@cryptodev-2s cryptodev-2s force-pushed the adapt-to-eip-1193-provider-changes branch from 4eb212c to 2b79296 Compare July 8, 2024 23:38
Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

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

These changes look good!

I noticed we left unchanged FakeProvider: are we supposed to remove sendAsync from the class or any other changes related to this work?

@cryptodev-2s
Copy link
Contributor Author

cryptodev-2s commented Jul 9, 2024

These changes look good!

I noticed we left unchanged FakeProvider: are we supposed to remove sendAsync from the class or any other changes related to this work?

Hi Michele,

FakeProvider has already been updated in a previous PR to include the request method. I had to make this change along with the SafeEventEmitterProvider updates; otherwise, the tests would not pass. You can see the updated FakeProvider here.

@cryptodev-2s cryptodev-2s merged commit 2df20d1 into main Jul 9, 2024
116 checks passed
@cryptodev-2s cryptodev-2s deleted the adapt-to-eip-1193-provider-changes branch July 9, 2024 13:25
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.

Adapt to EIP-1193 provider changes
2 participants