-
Notifications
You must be signed in to change notification settings - Fork 873
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
Polygon network for UD wallet address #13085
Conversation
5259f8e
to
562f854
Compare
A Storybook has been deployed to preview UI for the latest push |
562f854
to
f5c5290
Compare
A Storybook has been deployed to preview UI for the latest push |
f5c5290
to
49df1e1
Compare
A Storybook has been deployed to preview UI for the latest push |
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.
Tests are ready.
@yrliou, PTAL
@@ -907,6 +909,13 @@ std::string GetDefaultBaseCryptocurrency(PrefService* prefs) { | |||
return prefs->GetString(kDefaultBaseCryptocurrency); | |||
} | |||
|
|||
GURL GetUnstoppableDomainsRpcUrl(const std::string& chain_id) { | |||
if (chain_id == brave_wallet::mojom::kPolygonMainnetChainId) | |||
return GURL("https://polygon-rpc.com"); |
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.
will be changed to brave.com subdomain in nearest future
return; | ||
} | ||
|
||
std::move(callback).Run(address, mojom::ProviderError::kSuccess, ""); | ||
if (address->empty()) { | ||
ud_get_eth_addr_calls_->SetNoResult(domain, chain_id); |
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.
Empty result is not an error. Now handled by frontend
@@ -1762,44 +1765,203 @@ TEST_F(JsonRpcServiceUnitTest, UnstoppableDomainsProxyReaderGetMany) { | |||
EXPECT_TRUE(callback_called); | |||
} | |||
|
|||
TEST_F(JsonRpcServiceUnitTest, UnstoppableDomainsGetEthAddr) { | |||
// Non-support chain (localhost) should fail. |
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.
Removed that test block. Now always use eth mainnet and polygon mainnet
components/brave_wallet/browser/unstoppable_domains_multichain_calls.h
Outdated
Show resolved
Hide resolved
9a27348
to
d867100
Compare
A Storybook has been deployed to preview UI for the latest push |
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.
LGTM, nice work and tests, thanks.
Resolves brave/brave-browser#22146
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: