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

Channel capacity display mismatch #278

Closed typtyphus closed 3 years ago

typtyphus commented 3 years ago

Description

Channel capacity values on Zap are not the same as the ones I created on my node.

My node: IMG_20201206_102044

Zap: IMG_20201206_101953

Environment

michaelWuensch commented 3 years ago

Hi, the reason for this is that zap subtracts the commit fee. To close a channel an on chain transaction has to be done. This transaction costs fees, which must be reserved. On such small channels like in your example this is about half of the whole channel capacity. I understand the confusion though and I am open for suggestions on how this can be improved.

Here is the reference in code: https://github.com/LN-Zap/zap-android/blob/master/app/src/main/java/zapsolutions/zap/channelManagement/OpenChannelViewHolder.java#L32-L33

One more confusing thing is that on pending channels I forgot to subtract the commit fee. That is why on your opening channel the bar is only half full. I am actually not sure which representation is better. The one that shows a full bar when all spendable capacity is on your side, or the one that shows your spendable capacity in relation to the channel capacity without the commit fee deducted.

typtyphus commented 3 years ago

Thanks for clearing that up.

a suggestion, maybe have the closing transaction portion of the bar marked in red. I haven't tried to close a channel, but closing fees are depend on speed? Would it be possible for the closing portion to be adjustable?

I usually get things greyed-out when they are pending, that could be an option

michaelWuensch commented 3 years ago

Advanced channel details were added in the last release (#360 ) This should explain it and help to understand what is going on.