Commit Graph

1277 Commits

Author SHA1 Message Date
ThomasV
130842ecd4 Add 'has_onchain_backup' to channel storage, to fix the displayed icon.
Note that this will not fix the value for already existing channels
that have been created with onchain backup; one would need a wallet_db
upgrade in order to fix them (probably not worth the effort).
2021-03-24 11:15:24 +01:00
ThomasV
ed6eea9161 kivy: make sure there is only one resume dialog 2021-03-24 10:48:01 +01:00
ThomasV
a95bdbb331 kivy: count open channels 2021-03-24 10:33:56 +01:00
ThomasV
18d7db12da Change warning shown on first channel creation
Qt: if created channel is not recoverable, show channel backup after creation
2021-03-24 10:24:14 +01:00
ThomasV
f2aa52e5aa minor: fix channel backup icon 2021-03-24 06:48:17 +01:00
ThomasV
2b3c64a9d7 qt: use the same 'nocloud' icon in wallet information 2021-03-24 06:25:35 +01:00
ThomasV
ca6cfbc6b0 channels list: group icons to save space 2021-03-24 06:11:53 +01:00
SomberNight
db37938963 qt channels list: add "features" column with icons (e.g. trampoline) 2021-03-23 21:34:04 +01:00
ThomasV
9583887c1f qt: change backup icon, add tooltip 2021-03-23 18:07:44 +01:00
ThomasV
cd6a468fb9 Android: unify password as soon as we know it is possible 2021-03-23 17:49:27 +01:00
ThomasV
a5fea043d1 Allow user to remove onchain backups. 2021-03-23 14:41:37 +01:00
ThomasV
ec01380105 kivy: channels list improvements 2021-03-23 14:26:54 +01:00
ThomasV
a67fcdbc8a channels_list: use icon to tell apart channels from backups 2021-03-23 14:06:28 +01:00
ThomasV
1a49fd440d kivy: add option to request force-close 2021-03-21 15:26:17 +01:00
Benoit Verret
f731c38293 Minor style changes 2021-03-21 00:36:23 -04:00
SomberNight
beba807cfe qt ChannelsList: fix opening channel with "max" amount 2021-03-20 19:20:49 +01:00
ThomasV
2509eaa642 Qt: clarify use_gossip checkbox text 2021-03-19 14:07:04 +01:00
ThomasV
27dcfba98d channels_list: improve menu for backups 2021-03-19 13:57:17 +01:00
ThomasV
afcc695f4d channels_list: show backup text in the state column. fix missing import in previous commit. 2021-03-19 13:35:12 +01:00
ThomasV
2fee920f43 On Android, if channels are not recoverable, display channel backup when a new channel is created.
Remove the 'android_backups' setting, which was unpractical.
2021-03-19 13:17:58 +01:00
ThomasV
64a931f21e Deterministic NodeID:
- use_recoverable_channel is a user setting, available
   only in standard wallets with a 'segwit' seed_type
 - if enabled, 'lightning_xprv' is derived from seed
 - otherwise, wallets use the existing 'lightning_privkey2'

Recoverable channels:
 - channel recovery data is added funding tx using an OP_RETURN
 - recovery data = 4 magic bytes + node id[0:16]
 - recovery data is chacha20 encrypted using funding_address as nonce.
   (this will allow to fund multiple channels in the same tx)

GUI:
  - whether channels are recoverable is shown in wallet info dialog.
  - if the wallet can have recoverable channels but has an old node_id,
    users are told to close their channels and restore from seed
    to have that feature.
2021-03-19 10:17:02 +01:00
ThomasV
9e6996c5c1 qt: use 'local' icon for future transactions 2021-03-18 09:21:36 +01:00
ThomasV
aa58e270c7 increase width of tx dialog, to have one line per input 2021-03-17 18:35:14 +01:00
ThomasV
ef42d26cbf qt channels_list: separate on_success handlers for close_channel and request_force_close 2021-03-17 09:32:34 +01:00
ThomasV
bcfcc20363 fix: add request_force_close method 2021-03-16 17:27:37 +01:00
ThomasV
eec97ddfbb (trivial) lnbackups -> lnworker 2021-03-16 16:58:44 +01:00
ThomasV
905796baeb kivy: show channel backup before force-close 2021-03-16 10:30:52 +01:00
ThomasV
2f69f3644f kivy: show channel backup capacity 2021-03-16 09:30:25 +01:00
ThomasV
0953da75b7 fix regression from 652d10aa5f 2021-03-15 19:29:54 +01:00
SomberNight
5cbfebeb24 kivy server selection: don't hide ':t' protocol suffix 2021-03-15 15:55:18 +01:00
ThomasV
2dc79b7040 (minor) word wrap qt tooltip 2021-03-15 14:48:47 +01:00
ThomasV
d6ebb4d4ca (trivial) rm debugging code 2021-03-15 14:33:57 +01:00
ThomasV
b18123fb61 Qt: add "save backup" checkbox to force-close dialog 2021-03-15 14:24:08 +01:00
ThomasV
cf926e8412 Qt: add option to request force close of channel 2021-03-15 12:38:00 +01:00
ThomasV
d0a4f3581e follow-up previous commit 2021-03-15 11:15:19 +01:00
ThomasV
abaefa362a kivy: unify fee dialogs
- confirm_tx_dialog and bump_fee_dialog inherit from FeeSliderDialog
 - changing the slider method does not require an extra popup
2021-03-15 11:02:05 +01:00
ThomasV
2ad49bbc5b Kivy: Show fee dialog before opening a new channel.
Remove fee and rbf from settings, as they are now always proposed
2021-03-13 09:34:19 +01:00
SomberNight
5dbf6dbdec qt receive tab: change "Expires after" label and help text 2021-03-12 18:54:49 +01:00
SomberNight
1ba5997238 qt lightning_tx_dialog: use historical fx rate for fiat amounts 2021-03-12 18:29:00 +01:00
ThomasV
65d263801a show capacity of channel backups in GUI 2021-03-12 17:39:13 +01:00
SomberNight
897f90d6e8 wallet: factor out "what key to use for invoice"
fix: qt request list was not using the correct key
2021-03-12 17:29:54 +01:00
ThomasV
1b7d8c0387 Qt: rm gossip menu item: already available in toolbar, and channel_db is not always present 2021-03-11 14:44:13 +01:00
SomberNight
eaa4de3354 kivy crash_reporter: a bit more logging 2021-03-10 17:38:53 +01:00
SomberNight
0e01db4cee kivy: fix GridLayout orientations all over
Pre kivy 2.0, "orientation" was undefined for GridLayouts, not sure why we were setting it, it was a no-op.
kivy 2.0 added meaning to the field, and the values we were setting it to are invalid.

related:
https://github.com/kivy/kivy/pull/6741
https://github.com/kivy/kivy/issues/7142

-----

traceback:

E | gui.kivy.uix.dialogs.crash_reporter.ExceptionHook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 705, in _apply_rule
    setattr(widget_set, key, value)
  File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
  File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
  File "kivy/properties.pyx", line 542, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 533, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 1253, in kivy.properties.OptionProperty.check
ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
  File "/home/user/wspace/electrum/electrum/gui/kivy/uix/ui_screens/receive.kv", line 141, in <lambda>
    on_release: Clock.schedule_once(lambda dt: s.expiration_dialog(s))
  File "/home/user/wspace/electrum/electrum/gui/kivy/uix/screens.py", line 517, in expiration_dialog
    d = ChoiceDialog(_('Expiration date'), pr_expiration_values, self.expiry(), callback)
  File "/home/user/wspace/electrum/electrum/gui/kivy/uix/dialogs/choice_dialog.py", line 53, in __init__
    Factory.Popup.__init__(self)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/modalview.py", line 187, in __init__
    super(ModalView, self).__init__(**kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/anchorlayout.py", line 68, in __init__
    super(AnchorLayout, self).__init__(**kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/layout.py", line 76, in __init__
    super(Layout, self).__init__(**kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/widget.py", line 359, in __init__
    self.apply_class_lang_rules(
  File "/home/user/.local/lib/python3.8/site-packages/kivy/uix/widget.py", line 463, in apply_class_lang_rules
    Builder.apply(
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 541, in apply
    self._apply_rule(
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 710, in _apply_rule
    raise BuilderException(rule.ctx, rule.line,
kivy.lang.builder.BuilderException: Parser: File "<inline>", line 21:
...
     19:            GridLayout:
     20:                row_default_height: '48dp'
>>   21:                orientation: 'vertical'
     22:                id: choices
     23:                cols: 2
...
ValueError: GridLayout.orientation is set to an invalid option 'vertical'. Must be one of: ['lr-tb', 'tb-lr', 'rl-tb', 'tb-rl', 'lr-bt', 'bt-lr', 'rl-bt', 'bt-rl']
  File "/home/user/.local/lib/python3.8/site-packages/kivy/lang/builder.py", line 705, in _apply_rule
    setattr(widget_set, key, value)
  File "kivy/weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
  File "kivy/properties.pyx", line 498, in kivy.properties.Property.__set__
  File "kivy/properties.pyx", line 542, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 533, in kivy.properties.Property.set
  File "kivy/properties.pyx", line 1253, in kivy.properties.OptionProperty.check
2021-03-10 14:59:47 +01:00
SomberNight
8de52bf523 wallet: (trivial) use kwargs for get_tx_item_fiat 2021-03-09 18:22:30 +01:00
SomberNight
3c019c2f9c daemon/wallet/network: make stop() methods async 2021-03-09 17:52:36 +01:00
ThomasV
652d10aa5f Remove LNBackups object: no longer needed since LNWorker is instantiated by default. 2021-03-09 11:52:04 +01:00
SomberNight
920e1e94fa kivy: InvoiceDialog: make LN invoice QR code scannable
Don't show the text and the QR code together, only the QR code:
the text takes up too much space, which make the QR hard to scan.
2021-03-03 17:31:08 +01:00
SomberNight
1aec982b27 kivy: SendScreen: reliably show LN payment attempt progress for invoice 2021-03-03 16:57:54 +01:00
ThomasV
1adde4c54a qt channels_list: use monospace font for channel capacity 2021-03-03 11:20:24 +01:00