-
Notifications
You must be signed in to change notification settings - Fork 896
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
Add ability to resolve ENS and Unstoppable domains to ethereum address #10447
Conversation
9371f10
to
b9f681d
Compare
@@ -125,6 +145,13 @@ bool ContentHash(const std::string& domain, std::string* data) { | |||
return ConcatHexStrings(hex_strings, data); | |||
} | |||
|
|||
bool Addr(const std::string& domain, std::string* data) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could add a test for this one and Get
pretty easily in components/brave_wallet/browser/eth_data_builder_unittest.cc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in b35edba
- Get eth_json_rpc_controller directly via browser context in decentralized_dns_network_delegate_helper. - Move logic of parsing result of ENS ContentHash & UD GetMany contract methods from decentralized_dns_network_delegate_helper into eth_json_rpc_controller and eth_response_parser. - Expose EnsResolverGetContentHash to callers directly and keep the process of getting resolver first as internal implementation defails of eth_json_rpc_controller. - Add helper methods for getting contract address by chain id. - Add ability for callers to specify chain_id when doing ENS/UD resolution. - Add RequestInternal to be able to override network_url when needed.
b9f681d
to
b35edba
Compare
CI all passed. |
Resolves brave/brave-browser#18531
The first commit is mostly for doing a refactoring to make things easier, and resolve the bug we have right now where we incorrectly use wallet's network setting for browser URL bar address resolution. please see the commit message for all the things changed.
The second is adding two new APIs to resolve UD/ENS to eth addr.
The third commits are updating/adding unit tests.
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: