LN-Zap / zap-android

Zap Wallet - Native android lightning wallet for node operators focused on user experience and ease of use ⚡️
MIT License
165 stars 49 forks source link

Add on-chain balance to wallet fragment #424

Open AlbertoBoldrini opened 1 year ago

AlbertoBoldrini commented 1 year ago

Add on-chain balance to wallet fragment

Description

In the wallet home page, it shows the lightning balance and the on-chain balance. The code is simply a suggestion, probably there are better ways to do it. A problem is the position of switchButtonImage which now is a little bit ambiguous.

Motivation and Context

You can easily see how much you can pay with lightning or with an on-chain transaction.

How Has This Been Tested?

Tested on my phone Xiaomi Redmi Note 9 Pro

Screenshots (if appropriate):

screenshot

Types of changes

Checklist:

michaelWuensch commented 1 year ago

@AlbertoBoldrini Thanks a lot for the pull request! I can understand that it is sometimes frustrating to only see one balance, especially if you are a power user and you know how bitcoin & lightning works. Did you know that you can make a long tap on the balance and a popup will occur that shows you some details about the ballance? So basically it is already possible to see on chain ballance. Showing only one balance was done on purpose to remove complexity and I would like to keep it that way, at least as default. I would agree to it if we make this optional and expose a setting in the advanced settings tab.

And for some reason the Scan button is missing in your screenshot.

AlbertoBoldrini commented 1 year ago

Hi michael, thank you for the answer. Ahah no, I didn't know the hidden feature. However, I agree with you. The total balance is cleaner and simpler. I put an option in the advanced settings tab image

I'm doing it mainly for myself, if you like it when it's finished you can merge it, but it's not a problem if you prefer not to. Are there icons of the Zap project that can be used for lightning and on-chain balances? Currently I used unicode emoji, but I don't like them so much.