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

Merge extension ens controller #1170

Merged
merged 13 commits into from
Apr 20, 2023

Conversation

cryptodev-2s
Copy link
Contributor

@cryptodev-2s cryptodev-2s commented Apr 6, 2023

This PR merges the extension ens controller with the core ens controller
Fix issue #1129

@cryptodev-2s cryptodev-2s requested a review from a team as a code owner April 6, 2023 16:26
@mcmire mcmire linked an issue Apr 6, 2023 that may be closed by this pull request
4 tasks
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.

It seems like even if we're bringing code from the extension we can use this opportunity to clean things up a bit. My suggestions below are mainly geared toward that end. However it also seems that there are other changes here that we might not want just yet.

packages/controller-utils/src/constants.ts Outdated Show resolved Hide resolved
packages/network-controller/src/NetworkController.ts Outdated Show resolved Hide resolved
packages/controller-utils/src/constants.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
@legobeat
Copy link
Contributor

Related: MetaMask/metamask-extension#18035
As noted there, ENS lookups in the extension are currently limited to predefined networks, which is addressed in that PR.

Something to consider bringing in here as well, or better saved for a follow-up?

@socket-security
Copy link

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


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
ethereum-ens-network-map@1.0.2 None +0 danfinlay

@mcmire
Copy link
Contributor

mcmire commented Apr 11, 2023

@legobeat Thanks for linking that PR, I wasn't aware of that. I looked through the PR and it doesn't seem to change the controller itself, so I think we should take care of that in a followup PR.

@cryptodev-2s cryptodev-2s force-pushed the feature/merge-extension-ens-controller branch from b408e1f to 5f5847f Compare April 12, 2023 16:10
@mcmire
Copy link
Contributor

mcmire commented Apr 13, 2023

@cryptodev-2s Just FYI, looks like the newest changes are failing the lint step. There's also the outstanding questions I have above. Let me know if my comments make sense or if you want to meet briefly to discuss them.

packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
@mcmire
Copy link
Contributor

mcmire commented Apr 17, 2023

@cryptodev-2s If you push up the changes you were showing me today then I can help you tweak this further!

@cryptodev-2s cryptodev-2s force-pushed the feature/merge-extension-ens-controller branch 4 times, most recently from 42346e8 to 704b617 Compare April 18, 2023 14:58
@cryptodev-2s cryptodev-2s force-pushed the feature/merge-extension-ens-controller branch from 69af306 to ec95052 Compare April 18, 2023 18:04
packages/controller-utils/src/constants.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
packages/ens-controller/src/EnsController.ts Outdated Show resolved Hide resolved
@cryptodev-2s cryptodev-2s changed the title feat: init merge ens controller feat: merge extension ens controller Apr 18, 2023
@cryptodev-2s cryptodev-2s changed the title feat: merge extension ens controller Merge extension ens controller Apr 18, 2023
@cryptodev-2s cryptodev-2s force-pushed the feature/merge-extension-ens-controller branch from 08f49ec to f76e0d5 Compare April 20, 2023 02:28
@cryptodev-2s cryptodev-2s force-pushed the feature/merge-extension-ens-controller branch from f76e0d5 to c04737f Compare April 20, 2023 02:29
Gudahtt
Gudahtt previously approved these changes Apr 20, 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!

Edit: Oh, lint failures. I can re-approve after those are fixed.

@cryptodev-2s cryptodev-2s merged commit 7d5057b into main Apr 20, 2023
@cryptodev-2s cryptodev-2s deleted the feature/merge-extension-ens-controller branch April 20, 2023 16:45
@legobeat legobeat mentioned this pull request Apr 25, 2023
Gudahtt added a commit that referenced this pull request May 10, 2023
The network change handler for the ENS controller has been broken since
the PR #1170 due to a conflict with #1196, which was merged around the
same time. It referenced the `network` property of the network state
that we have removed.

The change handler has been updated to use `networkId` instead.
Additionally, the `NetworkState` type has been imported so that we're
less likely to make this mistake again.
Gudahtt added a commit that referenced this pull request May 10, 2023
The network change handler for the ENS controller has been broken since
the PR #1170 due to a conflict with #1196, which was merged around the
same time. It referenced the `network` property of the network state
that we have removed.

The change handler has been updated to use `networkId` instead.
Additionally, the `NetworkState` type has been imported so that we're
less likely to make this mistake again.
Gudahtt added a commit that referenced this pull request May 10, 2023
The network change handler for the ENS controller has been broken since
the PR #1170 due to a conflict with #1196, which was merged around the
same time. It referenced the `network` property of the network state
that we have removed.

The change handler has been updated to use `networkId` instead.
Additionally, the `NetworkState` type has been imported so that we're
less likely to make this mistake again.
Gudahtt added a commit that referenced this pull request May 10, 2023
The network change handler for the ENS controller has been broken since
the PR #1170 due to a conflict with #1196, which was merged around the
same time. It referenced the `network` property of the network state
that we have removed.

The change handler has been updated to use `networkId` instead.
Additionally, the `NetworkState` type has been imported so that we're
less likely to make this mistake again.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
Merge extension ens controller
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The network change handler for the ENS controller has been broken since
the PR #1170 due to a conflict with #1196, which was merged around the
same time. It referenced the `network` property of the network state
that we have removed.

The change handler has been updated to use `networkId` instead.
Additionally, the `NetworkState` type has been imported so that we're
less likely to make this mistake again.
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
Merge extension ens controller
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
The network change handler for the ENS controller has been broken since
the PR #1170 due to a conflict with #1196, which was merged around the
same time. It referenced the `network` property of the network state
that we have removed.

The change handler has been updated to use `networkId` instead.
Additionally, the `NetworkState` type has been imported so that we're
less likely to make this mistake again.
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.

Merge the extension ENS controller with the core ENS controller
4 participants