-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
wallet-ext: allow selecting the accounts to connect to dapp #8413
wallet-ext: allow selecting the accounts to connect to dapp #8413
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
e0dd3bd
to
32f5c53
Compare
32f5c53
to
41a4c50
Compare
b674da8
to
90a0795
Compare
41a4c50
to
42c80dc
Compare
About 'Rounder corner spec, this should be addressed by this ticket https://mysten.atlassian.net/browse/APPS-519. I will need to reuse some components from other PRs once merged will update this. (I just left it as it was for now) About spacing/border For creating New Account added this ticket |
42c80dc
to
3139292
Compare
address, | ||
selected, | ||
}: WalletListSelectItemProps) { | ||
const addressShort = useMiddleEllipsis(address); |
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.
for addressShort can you use formatAddress
from mysten/sui.js
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 useMiddleEllipsis is used almost everywhere, we should probably add a task to add a hook to format the address - and remove useMiddleEllipsis if we want
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.
Added the ticket https://mysten.atlassian.net/browse/APPS-526 removed
@@ -39,19 +45,24 @@ function SiteConnectPage() { | |||
const dispatch = useAppDispatch(); | |||
const permissionRequest = useAppSelector(permissionSelector); | |||
const activeAccount = useAppSelector(({ account }) => account.address); | |||
const activeAccountShort = useMiddleEllipsis(activeAccount); |
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.
same here
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
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.
LGT, except for ellipses
3c2a1bb
to
416f643
Compare
3139292
to
074e62b
Compare
Is there an updated video of this? |
this is how it would be after merging this one Screen.Recording.2023-02-23.at.15.54.14.mov |
074e62b
to
9b86bc8
Compare
* adds WalletListSelect component that allows selecting between the accounts of the wallet and creating new ones * when multiaccounts is enabled while connecting to a dapp user is able to choose which accounts to connect <img width="361" alt="Screenshot 2023-02-18 at 21 17 55" src="https://user-images.githubusercontent.com/10210143/219900181-82696483-cd7e-44dd-94a4-fe3d8a379db1.png"> When multiaccount is disabled <img width="375" alt="Screenshot 2023-02-19 at 22 36 21" src="https://user-images.githubusercontent.com/10210143/219980363-28a36ce0-ba5d-4743-88e2-3031c9e7bf60.png"> When multiaccount is enabled and user has more than one account https://user-images.githubusercontent.com/10210143/219980417-79a944d4-b409-4046-832a-09d8b98b2c40.mov NOTE: To check the accounts that are connected * switch between accounts and check the dapp status popup * or run ``` chrome.storage.local.get('permissions').then(({permissions: p}) => console.log(p['http://localhost:3000'].accounts)) ``` in the console of the extension. <img width="959" alt="Screenshot 2023-02-18 at 21 22 28" src="https://user-images.githubusercontent.com/10210143/219900158-798d1843-31e2-47fe-81af-3d4d993680a6.png"> Closes APPS-283
When multiaccount is disabled
When multiaccount is enabled and user has more than one account
Screen.Recording.2023-02-19.at.22.48.09.mov
NOTE: To check the accounts that are connected
in the console of the extension.
Closes APPS-283