Skip to content

Refresh network when connection is reset#1235

Merged
Gudahtt merged 2 commits intomainfrom
refresh-network-when-connection-is-reset
Apr 21, 2023
Merged

Refresh network when connection is reset#1235
Gudahtt merged 2 commits intomainfrom
refresh-network-when-connection-is-reset

Conversation

@Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Apr 20, 2023

Description

The resetConnction method has been updated to match the extension more closely. We now refresh the network when this is called, rather than just reconstructing the provider and checking EIP1559 status.

Unit tests have been updated to align more closely with the extension as well.

Changes

  • CHANGED: Update resetConnection to perform network lookup (refresh network id and status)

References

This was done to unblock #1203, but it also relates to #1023 and #1176

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation for new or updated code as appropriate (note: this will usually be JSDoc)
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate

@Gudahtt Gudahtt marked this pull request as ready for review April 20, 2023 14:59
@Gudahtt Gudahtt requested a review from a team as a code owner April 20, 2023 14:59
The `resetConnction` method has been updated to match the extension
more closely. We now refresh the network when this is called, rather
than just reconstructing the provider and checking EIP1559 status.

Unit tests have been updated to align more closely with the extension
as well.

This was done to unblock #1203, but it also relates to #1023
@Gudahtt Gudahtt force-pushed the refresh-network-when-connection-is-reset branch from c88d819 to b319771 Compare April 21, 2023 00:57
@legobeat
Copy link
Contributor

This change is only affecting tests since the function is not exported or referenced elsewhere, correct?

@Gudahtt
Copy link
Member Author

Gudahtt commented Apr 21, 2023

Correct. This will be used on the extension, but it's not yet. And this PR moves it closer to how the extension resetConnection method works anyway.

Copy link
Contributor

@legobeat legobeat left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@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.

Ah right, and #refreshNetwork already calls #configureProvider. Makes sense.

@Gudahtt Gudahtt merged commit 360796a into main Apr 21, 2023
@Gudahtt Gudahtt deleted the refresh-network-when-connection-is-reset branch April 21, 2023 01:38
@legobeat legobeat mentioned this pull request Apr 25, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The `resetConnction` method has been updated to match the extension
more closely. We now refresh the network when this is called, rather
than just reconstructing the provider and checking EIP1559 status.

Unit tests have been updated to align more closely with the extension
as well.

This was done to unblock #1203, but it also relates to #1023

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The `resetConnction` method has been updated to match the extension
more closely. We now refresh the network when this is called, rather
than just reconstructing the provider and checking EIP1559 status.

Unit tests have been updated to align more closely with the extension
as well.

This was done to unblock #1203, but it also relates to #1023

Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.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.

3 participants