Commit Graph

1241 Commits

Author SHA1 Message Date
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
ThomasV
6cf79dcfb2 qt: update all tabs when base_unit changes 2021-03-03 11:19:41 +01:00
ThomasV
222c70ada6 qt swap_dialog: use a single button to toggle direction 2021-03-03 10:45:46 +01:00
SomberNight
b3b87555dc qt/kivy: lightning_tx_dialog: show LN invoice 2021-03-01 20:56:45 +01:00
SomberNight
a9185b0846 follow-up prev
kivy infers the type of the property from the default value.
without this, it was converting the str(Decimal(x)) to float
2021-03-01 18:20:33 +01:00
SomberNight
6094f2751e kivy channel dialog: fix unit of displayed feerate
The amount shown was in sat/kw, incorrectly labeled as sat/kbyte.
Show sat/vbyte instead.
2021-03-01 17:09:04 +01:00
SomberNight
7d7dcf0795 qt/kivy ChannelsList: if node alias is unknown, display node id
instead of "unknown"
2021-03-01 16:41:54 +01:00
SomberNight
dd37151d65 qt ChannelsList: (trivial) format_fields should not know column order 2021-03-01 16:28:18 +01:00
ThomasV
bc1ec6ac34 Qt: fix running GUI offline 2021-02-28 13:34:24 +01:00
SomberNight
2f223cdf46 qt channels dialog: fix for channel backups 2021-02-27 15:15:09 +01:00
ghost43
0ce6adffcc Merge pull request #6968 from HardCorePawn/issue6664
Added fiat fee estimate to Advanced Preview
2021-02-27 08:31:17 +00:00
SomberNight
f9f49daad7 tx dialog: uniform high fee warnings between GUIs 2021-02-26 19:02:24 +01:00
SomberNight
fc3009918c follow-up prev: some clean-up 2021-02-26 16:44:07 +01:00
hcp
e01a2014b1 qt tx dialog: also display fiat amounts 2021-02-26 16:43:46 +01:00
SomberNight
84326cf1f7 qt tx dialog: add legend for input/output colouring
based on e1d70bcd98
2021-02-25 18:54:55 +01:00
SomberNight
d2019fd928 qt bump fee: rename "Final" checkbox to "Keep Replace-By-Fee enabled"
Now that the checkbox is hidden behind an advanced option, there is
no need to be brief about it, better to be explicit.
(terminology unchanged for kivy.)
2021-02-25 15:39:33 +01:00
SomberNight
4c36c45664 qt bump fee: add "advanced" button, allow choosing strategy 2021-02-25 15:39:29 +01:00
SomberNight
8fe7d750f7 qt: move RBF dialog out of main_window.py into its own file 2021-02-25 15:32:03 +01:00
SomberNight
4a8286c744 qrscanner: nicer error messages 2021-02-23 22:38:53 +01:00
zebra-lucky
f6011dc31a kivy: add app.scan_qr_non_android 2021-02-23 12:51:23 +02:00
ThomasV
10611876ee qt: update swap button together with can_send 2021-02-23 10:58:21 +01:00
ThomasV
0369829e5e MPP: can_send/can_receive is now the sum, no longer the max 2021-02-22 16:42:27 +01:00
ThomasV
1c52203346 wizard: focus password field (fix #7048) 2021-02-21 11:41:34 +01:00
SomberNight
d75f9c6e80 kivy: receive request: fix RefLabel for "Address" so it can be exported
It is 'data' rather than 'text' that should be set for a RefLabel.

fixes #7042
2021-02-19 02:29:00 +01:00
ThomasV
d906819b03 minor fix following method rename 2021-02-18 13:36:54 +01:00
ThomasV
ba5e73d978 kivy: show routing options explicitly 2021-02-18 11:39:52 +01:00
ThomasV
0e23f33f59 kivy and qt: adapt open_channel dialogs to trampoline 2021-02-17 17:35:47 +01:00
ThomasV
ded449233e Trampoline routing.
- trampoline is enabled by default in config, to prevent download of `gossip_db`.
   (if disabled, `gossip_db` will be downloaded, regardless of the existence of channels)
 - if trampoline is enabled:
    - the wallet can only open channels with trampoline nodes
    - already-existing channels with non-trampoline nodes are frozen for sending.
 - there are two types of trampoline payments: legacy and end-to-end (e2e).
 - we decide to perform legacy or e2e based on the invoice:
    - we use trampoline_routing_opt in features to detect Eclair and Phoenix invoices
    - we use trampoline_routing_hints to detect Electrum invoices
 - when trying a legacy payment, we add a second trampoline to the path to preserve privacy.
   (we fall back to a single trampoline if the payment fails for all trampolines)
 - the trampoline list is hardcoded, it will remain so until `trampoline_routing_opt` feature flag is in INIT.
 - there are currently only two nodes in the hardcoded list, it would be nice to have more.
 - similar to Phoenix, we find the fee/cltv by trial-and-error.
    - if there is a second trampoline in the path, we use the same fee for both.
    - the final spec should add fee info in error messages, so we will be able to fine-tune fees
2021-02-17 17:28:13 +01:00
ThomasV
f4fe80dfd1 kivy: show node alias in channels dialog. Rename the menu back to 'Channels' 2021-02-17 16:44:43 +01:00
SomberNight
914eb9989d wallet: minor clean-up of tx.set_rbf() calls
Better to always call it, to make sure inputs have identical sequence numbers.
2021-02-12 04:59:40 +01:00
ThomasV
0c93394513 rename lnworker._pay to pay_invoice, call it directly from GUIs 2021-02-07 12:09:37 +01:00
ThomasV
c01ca101e0 minor: fix typo 2021-02-05 17:24:15 +01:00
ThomasV
cc69cf3f33 Qt: fix deprecation warning 2021-02-05 16:43:00 +01:00
ThomasV
f28a2aae73 Reorganize code so that we can send Multi Part Payments:
- LNWorker is notified about htlc events and creates payment events.
 - LNWorker._pay is a while loop that calls create_routes_from_invoice.
 - create_route_from_invoices should decide whether to split the payment,
   using graph knowledge and feedback from previous attempts (not in this commit)
 - data structures for payment logs are simplified into a single type, HtlcLog
2021-02-05 14:28:58 +01:00
ThomasV
c0bf9b4509 LNWorker: do not save PR_INFLIGHT status, detect it on startup instead 2021-02-04 16:30:50 +01:00
SomberNight
337d4890a1 lnworker/swaps: add '_sat' suffix to arg names and force kwargs 2021-02-01 22:11:56 +01:00
SomberNight
1d9311aeef qt network dialog: show protocol (if ":t") for servers in NodesList 2021-01-27 20:46:56 +01:00