Closed smaroudasunicorn closed 1 week ago
Dapp Connection Screen
CASE 1. The dApp name can be fetched, the URL can be fetched, dApp favicon/logo can be fetched and displayed.
CASE 2. The dApp name can not be fetched, dApp favicon/logo can not be fetched and displayed so we are replacing it with the generic label "DAPP" and generic icon.
CASE 3. Unknown URL! Rare case that can still occur. URL cannot be fetched by Superhero Wallet. In this case neither the favicon nor the dApp name will be available. Most probably it's a risky app with basically "unknown source". User should be warned about potential risks.
@sotiris @CedrikNikita IMO there's an issue with the way we grant permission to third party dApp to view not only the current account but also all "current active accounts" in the future. In other words the dApp asks only once for permission to view current address but it will be able to view all "currently active addresses" until Superhero Wallet is connected. @CedrikNikita correct me if I'm wrong here.
I am concerned that the user is not aware what's happening. As a user I'd expect to give permission affecting only my current account address when connecting, logging in, providing permission to a dApp or platform.
I might want to use different accounts for different platforms and purposes. I would not expect to grant access to the dApp to view all my wallet account addresses and that's what we are currently doing. I think we should reconsider this behavior and ask for permission each time the currently active account is changed.
@onvisions dapp requests access to one address is not this the case?
@onvisions dapp requests access to one address is not this the case?
As far as I understood this is not the case and that's why I raised my concerns from user perspective. Let's sync with @CedrikNikita to be on the same page if it's needed.
As far as the current task is concerned I have created the design according to request: the dApp is asking for permission to view user's currently active account address (the address that is active at the moment of granting the permission).
@onvisions , @smaroudasunicorn - I confirm that the DAPPs are actually connecting with the wallet, not the addresses. For AE if a DAPP is connected whenever user changes the active account the DAPP knows about that and can make an action based on this action. The best example is our testing DAPP: https://docs.aeternity.com/aepp-sdk-js/v13.3.2/examples/browser/aepp/
Try to connect and open the "Basic functionality" tab. Then open the extension and try to switch accounts. You'll see that the testing DAPP will update the active account on the fly.
This is why I agree with Tsvetan that this connect modal is not fully informative.
MetaMask is asking you to list the accounts you want to use for connection:
Dapp Connection Screen
CASE 1. The dApp name can be fetched, the URL can be fetched, dApp favicon/logo can be fetched and displayed.
I suggest to not put the dapp name (eg.: Superhero Dex) as a tag above the arrow. There is a limited space in this area and in my opinion putting the name there gives more risk of breaking the layout than a real value to the user.
Also regarding the icon: should we create our own list of icons we can display? I'm asking because the situation is the same as with the app browser: we are not able to obtain the dapp icon.
CASE 2. The dApp name can not be fetched, dApp favicon/logo can not be fetched and displayed so we are replacing it with the generic label "DAPP" and generic icon.
The tags above the arrow are uppercased, so we are not able to display "dAPP". What do you think about using "DAPP"?
Also the "dApp" string displayed as the name is our own label which should be used when there is no name?
CASE 3. Unknown URL! Rare case that can still occur. URL cannot be fetched by Superhero Wallet. In this case neither the favicon nor the dApp name will be available. Most probably it's a risky app with basically "unknown source". User should be warned about potential risks.
Not sure if this is possible. We always have the access to the URL of the app that tries to connect. @CedrikNikita am I right?
Also I see following issues in provided designs:
As we have 100% control on the connection modals we can display those screens in totally different way than the transaction details. What do you think about following structure:
This is a working POC done with the code and it didn't require much time to do. Obviously this is only a concept and can be further updated.
I agree about this one we might get rid of:
About the fact we are currently not able to fetch the icon/favicon of any dApp - my suggestion will be to create and keep icons for a list of known and trusted dApps (like Superhero DEX) and use the generic dApp icon for all the rest.
About the label my suggestion was to make an exception of the capitalized letters in this case and use dAPP instead of DAPP to emphasize it's a "decentralized app" (it's usually written in this way). However it won't be an issue to use DAPP if making an exception is a problem.
About Case 3 (Unknown URL) - we can have such a case. The wording of the warning text (in yellow) is synced with @smaroudasunicorn
About your suggestion to change the layout: @smaroudasunicorn if you think it's a better idea to use the suggested alternative layout (mockup provided by @peronczyk) I'll update the design accordingly. I was trying to utilize what we already have as visualization for transactions and smart contract calls.
I agree with Bart Comments
OK, so now I'm waiting for updated designs. Here's working POC of my changes: https://github.com/superhero-com/superhero-wallet/pull/3385
@peronczyk @smaroudasunicorn Updated dApp connection template
1. dApp name can be fetched
2. dApp name can not be fetched
3. Trusted dApp
4. Unknown URL = unknown source
................................................................................
RESPONSIVE design for the Side panel (examples):
Figma reference (responsive, side panel): https://www.figma.com/design/3oGLWzSH0oJljo4RETZtur/Superhero-Wallet-UI-(%E2%9C%94%EF%B8%8FUpdated)?node-id=37493-273334&node-type=instance&t=rAy9jPPlzgGfAnOf-0
I am ok
The task is ready to be tested @Liubov-crypto
Regarding this part: we decided to use the dapp icon instead of the warning, but colored in orange.
https://github.com/user-attachments/assets/b6f03b07-df92-48c5-a70b-6c36ce6e573e
the same for tokaen.org:
@peronczyk please check it.
@onvisions @peronczyk One more question: do we decided to leave this screen as it is?
https://github.com/user-attachments/assets/aea4d0b2-51b2-441b-82c2-e3a62c50098c
I agree with what is mentioned above by @Liubov-crypto. We can leave the ":" as implemented. The Wallet Connect is not affected by this changes and is not within the scope of the task as far as I know.
Regarding the permission to "propose transaction" - the suggested design is a template so it shows the way we should display multiple permissions if the dApp is requesting it. If dApp is requesting only to view current address we display only this. However can't we include this one as a general request in the template (aren't all the dApps requiring permission to propose transactions?)
@peronczyk @Liubov-crypto 2 more remarks on my side:
All the UI related fixes are there.
@Liubov-crypto
- When I interacted with superhero dex there were some connection issues, I was disconnected and observed that our connection modal also has some changes. Is it expected in this case?
The disconnecting happens also on dev. But I don't fully understand this. The PR is about changing the connection screen.
- When it opens as web wallet Propose Tx text is missing:
This is how the dapp asks for permission. We are not controlling this. Can you compare with dev?
All the UI related fixes are there.
@Liubov-crypto
- When I interacted with superhero dex there were some connection issues, I was disconnected and observed that our connection modal also has some changes. Is it expected in this case?
The disconnecting happens also on dev. But I don't fully understand this. The PR is about changing the connection screen.
- When it opens as web wallet Propose Tx text is missing:
This is how the dapp asks for permission. We are not controlling this. Can you compare with dev?
I tested with dev and there was no disconnection issue for me. And today this branch also was working fine, without disconnection.
Would we like to show superhero icon here? or leave it as it is?
also aescan:
the rest is fixed, LGTM
Superhero.com and aescan added to trusted dapps. Can you retest @Liubov-crypto ?
I found that Dapp name is missing in Permissions Settings:
https://github.com/user-attachments/assets/dbf1e544-420d-4046-b99f-ad5bce4102b1
Dev:
@peronczyk please check it
Fixed @Liubov-crypto Please retest.
LGTM
Below an image is presented about dapp connection
We need to rework dapp connection screen. This screen is about dapp requesting from the wallet to provide address of active account. Should not seem like a transaction.