electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 69b58433bfb459408b70d31c253eea6fd1522817
parent c2f9c5fb1b084312219b9000cc00c13f23a3c6d5
Author: ThomasV <thomasv@electrum.org>
Date:   Thu,  5 Mar 2020 13:02:07 +0100

kivy: Show lightning balance. Remove 'unmatured', 'unconfirmed'
from info dialog, as this is visible in history.

Diffstat:
Melectrum/gui/kivy/main_window.py | 3++-
Melectrum/gui/kivy/uix/ui_screens/status.kv | 23++++++++++-------------
2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py @@ -877,7 +877,8 @@ class ElectrumWindow(App): self.fiat_balance = status else: c, u, x = self.wallet.get_balance() - text = self.format_amount(c+x+u) + l = int(self.wallet.lnworker.get_balance()) if self.wallet.lnworker else 0 + text = self.format_amount(c + x + u + l) self.balance = str(text.strip()) + ' [size=22dp]%s[/size]'% self.base_unit self.fiat_balance = self.fx.format_amount(c+u+x) + ' [size=22dp]%s[/size]'% self.fx.ccy diff --git a/electrum/gui/kivy/uix/ui_screens/status.kv b/electrum/gui/kivy/uix/ui_screens/status.kv @@ -3,10 +3,12 @@ Popup: confirmed: 0 unconfirmed: 0 unmatured: 0 + lightning: 0 watching_only: app.wallet.is_watching_only() has_seed: app.wallet.has_seed() on_parent: self.confirmed, self.unconfirmed, self.unmatured = app.wallet.get_balance() + self.lightning = int(app.wallet.lnworker.get_balance()) if app.wallet.lnworker else 0 BoxLayout: orientation: 'vertical' ScrollView: @@ -34,21 +36,16 @@ Popup: value: (_('Enabled') if app.wallet.has_lightning() else _('Disabled')) if app.wallet.can_have_lightning() else _('Not available') BoxLabel: text: _("Balance") + ':' - value: app.format_amount_and_units(root.confirmed + root.unconfirmed + root.unmatured) - BoxLabel: - text: _("Confirmed") + ':' - opacity: 1 if root.confirmed else 0 - value: app.format_amount_and_units(root.confirmed) - opacity: 1 if root.confirmed else 0 + value: app.format_amount_and_units(root.confirmed + root.unconfirmed + root.unmatured + root.lightning) BoxLabel: - text: _("Unconfirmed") + ':' - opacity: 1 if root.unconfirmed else 0 - value: app.format_amount_and_units(root.unconfirmed) + text: _("Onchain") + ':' + value: app.format_amount_and_units(root.confirmed + root.unconfirmed + root.unmatured) + opacity: 1 if root.lightning else 0 BoxLabel: - text: _("Unmatured") + ':' - opacity: 1 if root.unmatured else 0 - value: app.format_amount_and_units(root.unmatured) - opacity: 1 if root.unmatured else 0 + text: _("Lightning") + ':' + opacity: 1 if root.lightning else 0 + value: app.format_amount_and_units(root.lightning) + GridLayout: cols: 1