pendulum-chain / portal

The Pendulum/Amplitude portal UI
GNU General Public License v3.0
1 stars 1 forks source link

Don't show empty balances when account not connected #477

Closed ebma closed 4 weeks ago

ebma commented 1 month ago

I replaced all related loaders I could find with just 'nothing' expect for the Backstop Pool screen where 'My pool balance' now shows 0 if no account is connected.

Closes #469.

netlify[bot] commented 1 month ago

Deploy Preview for rococo-souffle-a625f5 ready!

Name Link
Latest commit 000204f0c1466844542801588edbd1d27fbd01b1
Latest deploy log https://app.netlify.com/sites/rococo-souffle-a625f5/deploys/665d88f59dc706000894c9f0
Deploy Preview https://deploy-preview-477--rococo-souffle-a625f5.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

ebma commented 1 month ago

I left the 'My pool balance: 0' at the backstop pool because I thought it might look weird because it's so empty otherwise. But I can remove that too, no problem.

ebma commented 1 month ago

Please check again @prayagd

prayagd commented 1 month ago

@ebma the text "My pool balance" also went away, no worries lets merge. This is for the testnet campaign anyway

ebma commented 1 month ago

Wait, I thought that's how you wanted it to look like? 😅 At least that's exactly what I changed it to. Did you expect something else? I can also change it again.

prayagd commented 1 month ago

"My pool balance"

@ebma oh sorry for the confusion. just show this text back, that's it

ebma commented 1 month ago

Out of the three options we have: 1) Show 'My pool balance: 0' 2) Don't show 'My pool balance' at all 3) Only show 'My pool balance' but without an actual number after it

Isn't option 3) the most confusing? 😅

vadaynujra commented 1 month ago

If there is nothing the user can do on that page, without connecting their wallet, then that's where we should be sending them (and so should be what they see).

References from other DEXes

HydraDX's Wallet Page:

image

Pablo's portfolio view

image

Both dApps:

Specifically on the options:

Since my suggested solution might require some more work, can the immediate solution just be that the animation is made static, everything else remaining the same? See HydraDX's wallet view without connecting wallet for reference.

TorstenStueber commented 1 month ago

I suggest: remove "My pool balance" as @ebma did and just add a "Connect Wallet" button instead. Don't we have a component for this and adding such a button is a trivial change?

ebma commented 1 month ago

Thanks for providing some references. Personally, I think it's fine the way it is now with not showing anything related to balances as long as no wallet is connected. I can add the change @TorstenStueber suggested and instead make the button for depositing/swapping prompt to connect a wallet account instead. The same is already done when you go to the Spacewalk issue/redeem dialog without being connected to a wallet.

vadaynujra commented 1 month ago

Sounds good, so both buttons become Connect Wallet, when the user connects wallet, the My Pool Balance appears with the correct amount.

ebma commented 1 month ago

I changed it so that all Nabla primary action buttons are replaced with 'Connect to Wallet'. And I added the change to make the wallet account selection scrollable.

prayagd commented 1 month ago

@ebma looks good we can merge, checked all the buttons and all the connect wallet buttons work and open the pop-up