-
Notifications
You must be signed in to change notification settings - Fork 893
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
show eTLD+1 prominently in request panel #12701
Conversation
lgtm |
0865cbc
to
6b272d5
Compare
A Storybook has been deployed to preview UI for the latest push |
54d417d
to
562e4e2
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, other than some useMemo
performance gotchas
components/brave_wallet_ui/components/extension/connected-panel/index.tsx
Outdated
Show resolved
Hide resolved
components/brave_wallet_ui/components/extension/connected-panel/index.tsx
Outdated
Show resolved
Hide resolved
components/brave_wallet_ui/components/shared/create-site-origin/index.tsx
Show resolved
Hide resolved
components/brave_wallet_ui/components/shared/create-site-origin/index.tsx
Outdated
Show resolved
Hide resolved
@@ -122,6 +123,13 @@ const ConnectedPanel = (props: Props) => { | |||
|
|||
const onClickViewOnBlockExplorer = useExplorer(selectedNetwork) | |||
|
|||
const showConnectButton = React.useMemo((): boolean => { | |||
if (originInfo.origin) { | |||
return originInfo.origin.startsWith('chrome://') |
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.
can this be an exact check for a set of whitelisted origins? i'm wondering why all of chrome://
needs to be whitelisted.
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.
While addressing this issue brave/brave-browser#20973 it was decided there is no reason to allow a user to give/remove
a Site Permission
to chrome://
origins.
cc: @bbondy @srirambv
562e4e2
to
b6d79d9
Compare
@@ -135,6 +136,11 @@ bool GetSubRequestOrigin(const GURL& old_origin, | |||
return AddAccountToHost(old_origin, account, new_origin); | |||
} | |||
|
|||
std::string eTLDPlusOne(const GURL& url) { |
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.
I think this one don't belong to ethereum_permission_utils.cc but belong to something more general, like brave_wallet_utils.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 e926740
A Storybook has been deployed to preview UI for the latest push |
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.
Backend overall LGTM, just a few minor comments.
e926740
to
3e94a70
Compare
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
3e94a70
to
0bba717
Compare
0bba717
to
a369c51
Compare
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
a369c51
to
91cf091
Compare
A Storybook has been deployed to preview UI for the latest push |
Resolves brave/brave-browser#21787
Request panel from dApp now will show full origin with eTLD+1 emphasized
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:
Connect Wallet
eTLD+1
part of theURL
should beBold
in theConnect with site
panelAllow spend
eTLD+1
part of theURL
should beBold
in theAllow Spend
panelNetwork
to add.eTLD+1
part of theURL
should beBold
in theAllow Add Network
paneleTLD+1
part of theURL
should beBold
in theAllow Switch Network
panelWallet Panel
and click on theConnected
button to get theSite Permissions
paneleTLD+1
part of theURL
should beBold
in theSite Permissions
panelSign
, sign the the transactioneTLD+1
part of theURL
should beBold
in thePublic Encryption Key
panelURL
should be wrapped and theeTLD+1
part of theURL
should beBold
in theConnect with site
panelWallet Panel
and click on theConnected
button to get theSite Permissions
panelURL
should be wrapped and theeTLD+1
part of theURL
should beBold
in theSite Permissions
panel