Commit Graph

4269 Commits

Author SHA1 Message Date
SomberNight
9f08293c0e mnemonic: make sure newly generated seeds are not valid as bip39 2021-04-08 16:24:10 +02:00
SomberNight
b7a8b1aae6 prepare release 4.1.2 2021-04-08 15:22:40 +02:00
ThomasV
2c39f0c9c4 fix #7190 2021-04-08 15:12:32 +02:00
SomberNight
0ee9442972 qt update notifications: add another key for redundancy 2021-04-08 14:39:36 +02:00
ThomasV
5ac130a88c Merge pull request #7187 from SomberNight/202104_android_adaptiveicon
android: update app icon; use "adaptive icons" on API 26+
2021-04-08 13:41:39 +02:00
SomberNight
3d9798757d android: update app icon; use "adaptive icons" on API 26+
see https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

p4a and buildozer had to be patched for this; I will try to upstream the patches, see:
https://github.com/kivy/python-for-android/pull/2446
https://github.com/kivy/buildozer/pull/1312
2021-04-08 13:33:41 +02:00
SomberNight
52be6a5453 lnrater: use network.asyncio_loop instead of asyncio.get_event_loop()
fixes #5376
2021-04-08 10:46:54 +02:00
ThomasV
f815f8eb30 Merge pull request #7178 from SomberNight/202104_kivy_freeze_addrs
kivy: implement freezing addresses
2021-04-07 17:24:38 +02:00
ThomasV
e936b6e4a5 fix #7185 2021-04-07 17:21:48 +02:00
SomberNight
dfc0f896b7 icons: clean up electrum svg icons
- change viewport to square, no cropping, add small margins
- rm invisible objects
2021-04-07 17:15:48 +02:00
ThomasV
1b763b4a3c add electrum svg icons 2021-04-06 19:04:17 +02:00
ThomasV
f7a8166b9c new icons for android 2021-04-06 18:57:30 +02:00
SomberNight
e5295701d2 wizard: let UserCancelled propagate out in hw wallet flow
Note that clicking "x" to close the wizard or pressing ESC also raises
a UserCancelled:
raising ChooseHwDeviceAgain was not letting the wizard close.

E | gui.qt.installwizard.InstallWizard |
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/base_wizard.py", line 371, in on_device
    client = self.plugin.setup_device(device_info, self, purpose)
  File "/home/user/wspace/electrum/electrum/plugins/trezor/trezor.py", line 305, in setup_device
    self.initialize_device(device_id, wizard, client.handler)
  File "/home/user/wspace/electrum/electrum/plugins/trezor/trezor.py", line 231, in initialize_device
    wizard.choice_dialog(title=_('Initialize Device'), message=msg, choices=choices, run_next=f)
  File "/home/user/wspace/electrum/electrum/gui/qt/installwizard.py", line 106, in func_wrapper
    out = func(*args, **kwargs)
  File "/home/user/wspace/electrum/electrum/gui/qt/installwizard.py", line 614, in choice_dialog
    self.exec_layout(vbox, title)
  File "/home/user/wspace/electrum/electrum/gui/qt/installwizard.py", line 434, in exec_layout
    raise UserCancelled()
electrum.util.UserCancelled

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/base_wizard.py", line 277, in choose_hw_device
    self._choose_hw_device(purpose=purpose, storage=storage)
  File "/home/user/wspace/electrum/electrum/base_wizard.py", line 363, in _choose_hw_device
    self.choice_dialog(title=title, message=msg, choices=choices,
  File "/home/user/wspace/electrum/electrum/gui/qt/installwizard.py", line 120, in func_wrapper
    run_next(*out)
  File "/home/user/wspace/electrum/electrum/base_wizard.py", line 364, in <lambda>
    run_next=lambda *args: self.on_device(*args, purpose=purpose, storage=storage))
  File "/home/user/wspace/electrum/electrum/base_wizard.py", line 386, in on_device
    raise ChooseHwDeviceAgain()
electrum.base_wizard.ChooseHwDeviceAgain
E | gui.qt.installwizard.InstallWizard | choose_hw_device(). while iter starts.
I | plugin.DeviceMgr | scanning devices...
2021-04-06 18:44:16 +02:00
SomberNight
c41cd4ae04 qt init: move Ctrl-C handling earlier 2021-04-06 18:27:28 +02:00
SomberNight
84ec734385 kivy: implement freezing addresses 2021-04-04 23:00:57 +02:00
SomberNight
94774c6ad2 lnutil: add rationale for MIN_FUNDING_SAT
related: https://github.com/spesmilo/electrum/issues/7169#issuecomment-812800652
2021-04-04 19:53:10 +02:00
SomberNight
c1cb2e67f6 qt channels dialog: handle funding tx missing
see https://github.com/spesmilo/electrum/issues/7175#issuecomment-813058152
2021-04-04 19:07:01 +02:00
Benoit Verret
2fce31c5ec Show txid in text GUI 2021-04-03 23:59:11 -04:00
SomberNight
349a033ce6 qt: fix some widget parenting issues
If you force-show a widget (e.g. `w.setVisible(True)`) before parenting it,
a small window will flash (appear and disappear) for a fraction of second,
which is a bit irritating.
2021-04-04 01:43:49 +02:00
SomberNight
1cd5235426 qt init: rm gui.close() method
There is gui.stop() already, which does the same thing (which is shared API with kivy).
Also, the _cleanup_before_exit() call was redundant in close(),
aboutToQuit handles that.
2021-04-04 01:05:23 +02:00
SomberNight
a3b16c7640 qt init: shutdown properly if last open window was a wizard
fixes #7171
2021-04-04 00:49:25 +02:00
SomberNight
981381346f qt: even more clean-up before exiting
related: https://github.com/spesmilo/electrum/issues/6889#issuecomment-812776695
2021-04-03 19:17:32 +02:00
ThomasV
e64aed2aec android backups: fix missing parameter 2021-04-03 14:28:36 +02:00
SomberNight
be43632cc4 qt init: more clean-up for system tray
related: https://github.com/spesmilo/electrum/issues/6889#issuecomment-812776695
2021-04-03 06:17:47 +02:00
SomberNight
14c5ceeacf qt init: (trivial) refactor system tray 2021-04-03 05:42:32 +02:00
SomberNight
d62a4833e5 lnpeer.channel_establishment_flow: check funding_sat in bounds earlier
closes #7169
2021-04-03 04:13:28 +02:00
SomberNight
e686b40819 qt init: don't catch BaseException unless there is good reason
let KeyboardInterrupt propagate out
2021-04-03 01:47:44 +02:00
SomberNight
34e64ef152 qt gui: some more clean-up when exiting
related: https://github.com/spesmilo/electrum/issues/6889

This fixes the case where the user quits by pressing Ctrl+C,
and some other minor things.

There is still another issue that sometimes causes a segfault during shutdown...
2021-04-03 01:44:42 +02:00
ThomasV
f249ccdfd7 prepare release 4.1.1 2021-04-02 17:33:37 +02:00
ThomasV
039d11e350 Qt swap dialog: do not call update() from the asyncio thread. Fixes some segfaults that were triggered by opening the dialog 2021-04-02 15:33:37 +02:00
ThomasV
73482bb335 fix #7160 2021-04-02 15:07:08 +02:00
SomberNight
92226b077a qt tx dialog: handle fiat fee for zero-fee tx
fix #7166
2021-04-01 17:02:34 +02:00
ThomasV
774a9ad263 fix #7164 2021-04-01 14:42:52 +02:00
ThomasV
5b1d54d014 fix #7165 2021-04-01 14:25:39 +02:00
SomberNight
210ff647fa i18n: don't translate empty string
see #7158

```
$ ./contrib/pull_locale
Found 260 files to translate
Generate template
electrum/gui/qt/installwizard.py:265: warning: Empty msgid.  It is reserved by GNU gettext:
                                               gettext("") returns the header entry with
                                               meta information, not the empty string.
electrum/gui/qt/channels_list.py:49: warning: Empty msgid.  It is reserved by GNU gettext:
                                              gettext("") returns the header entry with
                                              meta information, not the empty string.
```
2021-04-01 03:33:16 +02:00
ThomasV
e13e0b11f1 Do not display the warning about static backups in init_lightning. It is not useful to display the same message twice. 2021-03-31 11:00:55 +02:00
ThomasV
bf6ecb6418 make init_lightning callable at runtime, without reloading the wallet 2021-03-31 10:57:36 +02:00
ThomasV
4b586d9cf0 kivy: remove dead code (follow-up 64a931f21e) 2021-03-31 09:51:16 +02:00
ThomasV
0459d4adb9 history_list: use from_timestamp and to_timestamp in summary 2021-03-31 06:07:29 +02:00
ThomasV
b0cf9dbeb3 kivy: remove unnecessary friction in _enable_lightning 2021-03-31 05:34:34 +02:00
SomberNight
537ec92460 wallet: change init_lightning to sometimes create deterministic LN keys 2021-03-30 21:53:18 +02:00
SomberNight
35bc461fe1 keystore: encapsulate "can_have_deterministic_lightning_xprv" logic 2021-03-30 21:31:37 +02:00
SomberNight
7b7bba2299 wallet_db: put 'seed_type' into keystores (incl db upgrade) 2021-03-30 21:16:14 +02:00
SomberNight
2cebdc8c1c add back "lightning is experimental" warning text 2021-03-30 19:55:48 +02:00
SomberNight
8ea2b4432a tests: add test for keystore.get_lightning_xprv 2021-03-30 19:05:42 +02:00
SomberNight
f830939586 lnworker: change crypto for onchain static backups
Use scripthash as nonce instead of scriptPubKey,
as first two bytes of scriptPubKey are static, i.e. wasted.
2021-03-30 18:48:17 +02:00
SomberNight
e2e8cf1043 wallet: (minor) fix filtering history by year
E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 870, in timer_actions
    self.update_wallet()
  File "...\electrum\electrum\gui\qt\main_window.py", line 1003, in update_wallet
    self.update_tabs()
  File "...\electrum\electrum\gui\qt\main_window.py", line 1010, in update_tabs
    self.history_model.refresh('update_tabs')
  File "...\electrum\electrum\util.py", line 412, in <lambda>
    return lambda *args, **kw_args: do_profile(args, kw_args)
  File "...\electrum\electrum\util.py", line 408, in do_profile
    o = func(*args, **kw_args)
  File "...\electrum\electrum\gui\qt\history_list.py", line 329, in refresh
    self.view.filter()
  File "...\electrum\electrum\gui\qt\util.py", line 705, in filter
    self.hide_rows()
  File "...\electrum\electrum\gui\qt\util.py", line 709, in hide_rows
    self.hide_row(row)
  File "...\electrum\electrum\gui\qt\util.py", line 685, in hide_row
    should_hide = self.should_hide(row_num)
  File "...\electrum\electrum\gui\qt\history_list.py", line 445, in should_hide
    date = tx_item['date']
KeyError: 'date'
2021-03-30 17:48:46 +02:00
ThomasV
bbdfde5b41 fix capital gains 2021-03-30 17:32:43 +02:00
ThomasV
cd4df2fd85 detect conflicting channel backups, add warning before channel creation 2021-03-30 09:55:18 +02:00
SomberNight
f2040b19ea lnpeer: log both sent and recv msgs; use pubkey for incoming transports
Previously for incoming transports, the diagnostic_name (for log messages)
was just "responder" -- not sufficient to distinguish peers.
We now use the pubkey instead.

For outgoing transports it is f"{host}:{port}" (unchanged).
We could just use the pubkey for both uniformly; but it is quite long, and
it is hard to distinguish them at a glance.
2021-03-29 21:29:51 +02:00