Commit graph

856 commits

Author SHA1 Message Date
SomberNight
f13f46c555
qt wizard: make "GoBack" unroll the call stack to avoid stack overflow
fixes #6069
2020-04-03 18:58:51 +02:00
SomberNight
1cdff09ead
follow-up 371f55a0f9 2020-04-02 14:39:01 +02:00
SomberNight
371f55a0f9
hww: fix some threading issues in wizard
fixes #3377
related: #6064  (passphrase dialog not rendered correctly)
2020-04-01 21:09:17 +02:00
SomberNight
18c98483ac
wizard: (trivial) add some type hints 2020-04-01 21:09:10 +02:00
SomberNight
e6d43b60fa
qt hww show_settings_dialog: don't scan devices in GUI thread
Just makes sense in general.
Also, previously, the GUI would freeze if right after startup the user
clicked the hww status bar icon (especially with multiple hww connected).
2020-04-01 21:09:06 +02:00
SomberNight
e68b6447cc
hww: catch exceptions when user clicks on hww qt status bar icon
E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 167, in perform_hw1_preflight
    firmwareInfo = self.dongleObject.getFirmwareVersion()
  File "...\Python38\site-packages\btchip\btchip.py", line 561, in getFirmwareVersion
    response = self.dongle.exchange(bytearray(apdu))
  File "...\Python38\site-packages\btchip\btchipComm.py", line 127, in exchange
    raise BTChipException("Invalid status %04x" % sw, sw)
btchip.btchipException.BTChipException: Exception : Invalid status 6faa

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 120, in onPress
    self.func()
  File "...\electrum\electrum\plugins\hw_wallet\qt.py", line 260, in show_settings_dialog
    device_id = self.choose_device(window, keystore)
  File "...\electrum\electrum\plugins\hw_wallet\qt.py", line 253, in choose_device
    info = self.device_manager().select_device(self, keystore.handler, keystore)
  File "...\electrum\electrum\plugin.py", line 554, in select_device
    infos = self.unpaired_device_infos(handler, plugin, devices)
  File "...\electrum\electrum\plugin.py", line 545, in unpaired_device_infos
    soft_device_id=client.get_soft_device_id()))
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 88, in get_soft_device_id
    self._soft_device_id = self.request_root_fingerprint_from_device()
  File "...\electrum\electrum\plugins\hw_wallet\plugin.py", line 197, in request_root_fingerprint_from_device
    child_of_root_xpub = self.get_xpub("m/0'", xtype='standard')
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 55, in catch_exception
    return func(self, *args, **kwargs)
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 103, in get_xpub
    self.checkDevice()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 210, in checkDevice
    self.perform_hw1_preflight()
  File "...\electrum\electrum\plugins\ledger\ledger.py", line 198, in perform_hw1_preflight
    raise UserFacingException("Dongle is temporarily locked - please unplug it and replug it again")
electrum.util.UserFacingException: Dongle is temporarily locked - please unplug it and replug it again
2020-04-01 21:08:50 +02:00
SomberNight
e53ce5dee0
(trivial) follow-up 570f7b7790 2020-03-31 18:57:03 +02:00
SomberNight
570f7b7790
qt wizard decrypt wallet with hww: just pass through cancellation
E | gui.qt.installwizard.InstallWizard |
Traceback (most recent call last):
  File "...\electrum\electrum\base_wizard.py", line 541, in create_wallet
    password = k.get_password_for_storage_encryption()
  File "...\electrum\electrum\keystore.py", line 768, in get_password_for_storage_encryption
    client = self.plugin.get_client(self)
  File "...\electrum\electrum\plugins\trezor\trezor.py", line 180, in get_client
    client = devmgr.client_for_keystore(self, handler, keystore, force_pair)
  File "...\electrum\electrum\plugin.py", line 465, in client_for_keystore
    info = self.select_device(plugin, handler, keystore, devices)
  File "...\electrum\electrum\plugin.py", line 585, in select_device
    raise UserCancelled()
electrum.util.UserCancelled

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\installwizard.py", line 300, in select_storage
    self.run('choose_hw_device', HWD_SETUP_DECRYPT_WALLET, storage=temp_storage)
  File "...\electrum\electrum\base_wizard.py", line 109, in run
    f(*args, **kwargs)
  File "...\electrum\electrum\base_wizard.py", line 332, in choose_hw_device
    self.choice_dialog(title=title, message=msg, choices=choices,
  File "...\electrum\electrum\gui\qt\installwizard.py", line 99, in func_wrapper
    out = func(*args, **kwargs)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 536, in choice_dialog
    self.exec_layout(vbox, title)
  File "...\electrum\electrum\gui\qt\installwizard.py", line 392, in exec_layout
    raise UserCancelled
electrum.util.UserCancelled
2020-03-31 15:28:57 +02:00
SomberNight
6760c3f252
hw wallets: introduce HardwareHandlerBase
previously, client.handler was sometimes
- an InstallWizard
- a QtHandlerBase where win was an ElectrumWindow
- a QtHandlerBase where win was an InstallWizard
- a CmdLineHandler

That's just too much dynamic untyped undocumented polymorphism...
Now it will never be an InstallWizard (replaced with QtHandlerBase where win is an InstallWizard),
and now in all cases client.handler is an instance of HardwareHandlerBase, yay.

related: #6063
2020-03-31 14:40:25 +02:00
SomberNight
8e9b401c88
wizard: add a warning to multisig wallet creation to backup xpubs 2020-03-31 07:44:23 +02:00
JeremyRand
001ee25604
UTXOList: Split stretch_column out of __init__
Makes it easier to subclass UTXOList without code duplication.
2020-03-29 05:53:31 +00:00
ThomasV
bb35e330fb do not show freeze/unfreeze channel options if channel is closed 2020-03-27 11:19:27 +01:00
SomberNight
3ed6afce64
lnchannel: implement freezing channels (for receiving)
A bit weird, I know... :)
It allows for rebalancing our own channels! :P
2020-03-26 09:05:15 +01:00
SomberNight
79d202485e
lnworker: rename can_send to num_sats_can_send 2020-03-26 09:05:12 +01:00
SomberNight
deb50e7ec3
lnchannel: implement "freezing" channels (for sending)
and expose it in Qt GUI
2020-03-26 03:32:44 +01:00
SomberNight
9c8d2be638
qt channels list: sort by short chan id by default 2020-03-26 02:54:50 +01:00
SomberNight
95979ba58d
qt channels list: make selection more in line with other tabs
(allow selecting none, and allow multi-select)
2020-03-26 02:54:21 +01:00
SomberNight
7488cc91cd
qt channels: expose long channel id (in ctx menu and details dlg)
Also add separators to context menu to more visible separate
close/delete actions from rest.
2020-03-26 01:20:41 +01:00
ThomasV
5bac2fea98 Qt: improve channel details window 2020-03-12 12:40:50 +01:00
ThomasV
81dc2591b1 kivy: switch position/size of camera and clear buttons 2020-03-10 19:01:16 +01:00
ThomasV
df5acd1ea5 kivy: add delete button for invoices/requests 2020-03-10 17:30:08 +01:00
ThomasV
6c2ef176cc kivy: show payment log details 2020-03-10 16:44:23 +01:00
ThomasV
d19fc56eb8 kivy: requests/invoices dialogs improvements 2020-03-10 16:03:34 +01:00
ThomasV
3d69f3b0be improve payment status callbacks:
- add 'computing route' status for lightning payments
 - use separate callbacks for invoice status and payment popups
 - show payment error and payment logs in kivy
2020-03-10 13:27:02 +01:00
SomberNight
5d4f8f3164
qt update checker: subclass QDialog instead of QWidget
this way "minimise to taskbar" and "fullscreen" buttons are not shown
2020-03-09 22:01:51 +01:00
ThomasV
dd0a93abd5 kivy: update screen in on_activate, remove dead code 2020-03-09 12:19:07 +01:00
ThomasV
c80aab7e20 kivy: align icons in password_dialog, use IconButton 2020-03-09 11:51:48 +01:00
ThomasV
47b6c2d87f improve kivy password dialog:
- separate classes for pin code and password
 - add file selector to initial screen
2020-03-09 11:13:05 +01:00
ThomasV
25626cf23b follow-up previous commit 2020-03-07 23:18:08 +01:00
ThomasV
958898280e follow-up previous commit 2020-03-07 23:06:30 +01:00
ThomasV
8b79e9fed1 kivy: remove dynamic screen loading.
The performance gain it brings is negligible,
and it causes object duplication, which makes
things difficult to debug.
2020-03-07 22:42:17 +01:00
ThomasV
b0ddd7dc27 kivy receive screen:
- change behavior of delete button
 - screen must call parent's methods
2020-03-07 21:06:26 +01:00
ThomasV
19dcc5789f invoices list: show 'batch pay' option only if all selected invoices can be paid 2020-03-07 17:02:52 +01:00
ThomasV
172b03129b kivy: fix display of request messages 2020-03-07 15:46:20 +01:00
ThomasV
1e92307120 Qt history: Do not use monospace font for description column 2020-03-07 10:45:45 +01:00
ThomasV
ee01ca352f update force-close warning message 2020-03-06 15:21:30 +01:00
ThomasV
b36e9a6451 Qt: add info about force closing 2020-03-06 13:35:05 +01:00
ThomasV
0d160cceea Qt: test if lightinng is running 2020-03-06 11:23:26 +01:00
ThomasV
17a893441a qt: add extra fields to copy submenus 2020-03-06 09:05:32 +01:00
ThomasV
e48c7d01cd Qt: add 'View channel' to history menu, 'View funding transaction' to channel menu 2020-03-06 08:47:31 +01:00
ThomasV
c3c6b81857 kivy: show closing transaction in channel dialog 2020-03-06 06:49:46 +01:00
ThomasV
7c77d7c176 kivy: improve channel detaild dialog 2020-03-06 05:50:45 +01:00
ThomasV
a059fa0c1f fix #6017 2020-03-06 04:27:03 +01:00
SomberNight
942e03e3ae
kivy README: add instructions re accessing internal storage 2020-03-05 19:01:55 +01:00
SomberNight
60ad5e6a52
kivy pw dialog: don't enforce min length for existing generic password
this allows opening short-password wallets on desktop
2020-03-05 18:09:17 +01:00
ThomasV
496de03869 (minor) typo 2020-03-05 14:43:10 +01:00
ThomasV
0c3565bd4d kivy: show warning if request/invoice exceeds channel capacity 2020-03-05 14:30:01 +01:00
ThomasV
e362b4b94c kivy invoices and requests: show most recent items first 2020-03-05 13:15:32 +01:00
ThomasV
69b58433bf kivy: Show lightning balance. Remove 'unmatured', 'unconfirmed'
from info dialog, as this is visible in history.
2020-03-05 13:02:17 +01:00
ThomasV
c2f9c5fb1b kivy: fix layout of addresses dialog 2020-03-05 12:06:30 +01:00