Skip to content

Conversation

@cryptodev-2s
Copy link
Contributor

This PR adds a resetConnection method.
Related issue #1023

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner March 15, 2023 18:57
@cryptodev-2s cryptodev-2s changed the title [draft]: implement reset connection in network controller [draft]: implement resetConnection method in network controller Mar 15, 2023
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.

We should add tests for resetConnection. We have existing tests for this on the extension side here: https://github.com/MetaMask/metamask-extension/blob/b9f00ba5365cf92429c45f4ad05ced7373f726f5/app/scripts/controllers/network/network-controller.test.js#L3535. Note, however, that due to the differences in implementation between the extension and core versions of the network controller as well as the network controller tests, you will probably have to make some modifications to these tests when bringing them over.

@mcmire
Copy link
Contributor

mcmire commented Mar 21, 2023

By the way, @cryptodev-2s, if you use "Fixes" instead of "Related issue" in your PR description, it will associate this PR with the original issue and when you merge this PR it will close the associated issue automatically. Otherwise we have to go back later and manually close issues.

@mcmire mcmire linked an issue Mar 21, 2023 that may be closed by this pull request
4 tasks
@cryptodev-2s cryptodev-2s changed the title [draft]: implement resetConnection method in network controller implement resetConnection method in network controller Mar 30, 2023
@cryptodev-2s cryptodev-2s changed the title implement resetConnection method in network controller Implement resetConnection method in network controller Mar 30, 2023
Gudahtt
Gudahtt previously approved these changes Mar 30, 2023
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@mcmire
Copy link
Contributor

mcmire commented Mar 30, 2023

We still ought to have tests for the resetConnection method, as there are none at this time. Also, there seem to be extra changes borrowed from #1133.

@Gudahtt Gudahtt dismissed their stale review March 30, 2023 22:26

Missing tests

@cryptodev-2s cryptodev-2s force-pushed the feature/reset-connection branch from c35f242 to 5edb863 Compare April 3, 2023 15:08
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.

This is getting there! Just a few more changes needed.

@cryptodev-2s cryptodev-2s force-pushed the feature/reset-connection branch 2 times, most recently from 95d242e to 53fab33 Compare April 6, 2023 15:16
@cryptodev-2s cryptodev-2s force-pushed the feature/reset-connection branch from 078de49 to 4104f40 Compare April 6, 2023 17:00
mcmire
mcmire previously approved these changes Apr 6, 2023
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.

Two nits, but I'm happy with this!

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.

Looks great!

@cryptodev-2s cryptodev-2s merged commit cb43d9e into main Apr 6, 2023
@cryptodev-2s cryptodev-2s deleted the feature/reset-connection branch April 6, 2023 17:42
@legobeat legobeat mentioned this pull request Apr 25, 2023
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* implement reset connection in network controller
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* implement reset connection in network controller
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.

NetworkController API normalization: Add resetConnection method

5 participants