1
0
Commit Graph

16302 Commits

Author SHA1 Message Date
SomberNight
bf41675d4c qml: invoice/request list: flip sort order: newest on top
to be consistent with the History, and with other GUIs

(the model is the easiest place to do it. QSortFilterProxyModel/etc looks overkill)
2023-04-24 15:33:10 +00:00
Sander van Grieken
407769cb5f qml: remove Scan.qml 2023-04-24 17:32:13 +02:00
Sander van Grieken
5ead4feabb qml: wallet menu wider to fit wide translated texts 2023-04-24 17:24:22 +02:00
SomberNight
e097a3f875 CI: add some task dependencies
run linter first, then tests, then binary builds
2023-04-24 13:37:01 +00:00
ghost43
8ef395f4f3 Merge pull request #8337 from SomberNight/202304_flake8_bugbear
CI: flake8-bugbear
2023-04-24 13:27:54 +00:00
SomberNight
4cbb8399d2 CI: also run flake8-bugbear, as part of flake8 2023-04-24 13:00:12 +00:00
SomberNight
4219022c2e fix flake8-bugbear B023
B023 Function definition does not bind loop variable 'already_selected_buckets_value_sum'

in keepkey/qt.py, looks like this was an actual bug
(fixed in trezor plugin already: 52a4810752 )
2023-04-24 13:00:07 +00:00
SomberNight
612d3493df fix flake8-bugbear B017
B017 `assertRaises(Exception)` and `pytest.raises(Exception)` should be considered evil. They can lead to your test passing even if the code being tested is never executed due to a typo. Assert for a more specific exception (builtin or custom), or use `assertRaisesRegex` (if using `assertRaises`), or add the `match` keyword argument (if using `pytest.raises`), or use the context manager form with a target.
2023-04-24 12:58:30 +00:00
SomberNight
90315e72d6 fix flake8-bugbear B016
B016 Cannot raise a literal. Did you intend to return it or raise an Exception?
2023-04-24 12:58:26 +00:00
SomberNight
8266ebcc46 fix flake8-bugbear B008
B008 Do not perform function calls in argument defaults.  The call is performed only once at function definition time. All calls to your function will reuse the result of that definition-time function call.  If this is intended, assign the function call to a module-level variable and use that variable as a default value.
2023-04-24 12:58:23 +00:00
SomberNight
e2406f21b4 fix flake8-bugbear B011
B011 Do not call assert False since python -O removes these calls. Instead callers should raise AssertionError().
2023-04-24 12:58:19 +00:00
SomberNight
312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
Sander van Grieken
6848b8f375 qml: refactor all custom QRScan component wrappers to ScanDialog
(except SendDialog, which has a Paste button and slightly different behavior)
2023-04-24 13:34:05 +02:00
Sander van Grieken
49df18c613 qml: add hint property to QRScan 2023-04-24 13:19:40 +02:00
Sander van Grieken
959d481e93 qml: create ScanDialog 2023-04-24 13:19:01 +02:00
Sander van Grieken
674c2b55e7 qml: small fixes 2023-04-24 12:38:41 +02:00
Sander van Grieken
2fc9ee5c51 p4a: fix for Qt5 accessibility bug
see 087fc3c583
2023-04-24 11:29:26 +02:00
SomberNight
b429992e77 wizard.py: don't use mutable default args 2023-04-24 09:33:21 +02:00
SomberNight
e9aad6896e wizard.py: change stack to be per-instance
seems less error-prone
2023-04-24 09:33:21 +02:00
SomberNight
fd9a90f3b6 wizard.py: fix clearing stack between wizards
try finishing a wizard and then launching a new one: the new one kept
building on top of the stack of the prev wizard
2023-04-24 09:33:21 +02:00
SomberNight
417423ecd7 qt: PayToEdit: fix input_qr_from_camera
closes https://github.com/spesmilo/electrum/issues/8342

probably regression from 1f4cedf56a
2023-04-24 00:58:41 +00:00
SomberNight
a8623f63bb qml: fix send "flow with LN but not LN enabled AND having bip21 uri"
closes https://github.com/spesmilo/electrum/issues/8334
2023-04-23 16:42:08 +00:00
SomberNight
7907eb1f86 qml/qeinvoice.py: turn _bip21 field into local var 2023-04-23 16:36:32 +00:00
SomberNight
6b75d5f134 qt SwapDialog: handle sm.max_amount_forward_swap() being None
closes https://github.com/spesmilo/electrum/issues/8341
2023-04-23 16:13:03 +00:00
SomberNight
ea864cd5c9 qml: TxListModel: don't rely on wallet.db.get_transaction() finding tx
tx might get removed from wallet after wallet.get_full_history() but before the model is populated

closes https://github.com/spesmilo/electrum/issues/8339
2023-04-23 16:00:42 +00:00
SomberNight
1a2d4494eb qt: fix sweeping
closes https://github.com/spesmilo/electrum/issues/8340

regression from 2f6d60c715
2023-04-23 15:10:38 +00:00
SomberNight
ad58916729 wizard.py: (trivial) fix type hint and an f-string 2023-04-23 00:13:22 +00:00
SomberNight
6b0db411ae wallet: save_db immediately after init_lightning() generates keys
Had a crash shortly after enabling lightning and the LN keys were lost...
Though note that opening a channel triggers wallet.save_db(), so I think
nothing of real value is at risk without this change.
2023-04-23 00:06:45 +00:00
ThomasV
0fcf423fbe Revert "lnworker: schedule_force_closing is not async"
This reverts commit fcf836bc94.
2023-04-22 17:20:47 +02:00
ThomasV
fcf836bc94 lnworker: schedule_force_closing is not async 2023-04-22 15:03:39 +02:00
ThomasV
f787d6eede qt piechart: show a full circle if there is only one item in the list 2023-04-22 12:50:14 +02:00
Sander van Grieken
0d536b83ba qml: ignore update() when wallet not set yet. closes #8330 2023-04-22 12:18:02 +02:00
Sander van Grieken
7383cdc474 qml: don't crash when tx not found on histogram event. closes #8332 2023-04-22 11:40:36 +02:00
SomberNight
75a9a4fce9 qml TxDetails: txid must be updated after rawtx is changed
refresh bug when using bump_fee/dscancel/etc
2023-04-21 17:39:11 +00:00
SomberNight
2ec4758a12 qml: follow-up fix for offline-signing pre-segwit tx
follow-up 3cec6cdcfb
2023-04-21 17:14:49 +00:00
SomberNight
2be71c2dcc windows README: update reference to libsecp256k1-0.dll to incl newer
related: https://github.com/spesmilo/electrum/pull/8185
2023-04-21 16:38:58 +00:00
SomberNight
ca3f48d22e qml: remove buggy "Replace-by-Fee" checkbox from RbfCancelDialog
follow-up 02dce339cc
2023-04-21 15:44:24 +00:00
Sander van Grieken
e9d5e5737e qml: update UI after import key/address, add icon to address/key import dialog 2023-04-21 17:05:44 +02:00
Sander van Grieken
c3a418d4da qml: address list heading translatable 2023-04-21 17:05:44 +02:00
SomberNight
cede16a522 libsecp256k1: update hardcoded .so lib name in binaries
follow-up 2a2b683d23

TODO: maybe we should drop the version number in the lib name we bundle...
2023-04-21 14:42:51 +00:00
Sander van Grieken
2f8ab8027b qml: split off AddressDelegate and handle imported addresses more gracefully 2023-04-21 16:37:39 +02:00
SomberNight
ae8501e5be qml: small fix in qetxfinalizer.py
follow-up 3cec6cdcfb
2023-04-21 14:35:37 +00:00
Sander van Grieken
bd897b0955 qml: translate <no label> 2023-04-21 16:18:12 +02:00
SomberNight
2a2b683d23 bump libsecp256k1 version 2023-04-21 14:13:32 +00:00
SomberNight
784fc27cb9 libsecp256k1: add runtime support for 0.3.x
this replaces https://github.com/spesmilo/electrum/pull/8320

see f6bef03c0a/CHANGELOG.md

I am not yet sure how this will look like going forward, but unless there will
be lots of libsecp256k1 releases with ~invisible harmless ABI changes, I think
conceptually this is the right approach.
2023-04-21 14:05:21 +00:00
Sander van Grieken
3cec6cdcfb qml: second part of partially signing tx while not having txid yet 2023-04-21 15:09:33 +02:00
Sander van Grieken
03d9000e79 qml: fix a few texts that should wrap 2023-04-21 14:50:08 +02:00
Sander van Grieken
b9ec04f13a qml: make txdetails less reliant on txid 2023-04-21 13:20:19 +02:00
SomberNight
75e65c5cc7 qml: virtual keyboard: make margins smaller, for larger buttons
Looking at different system-wide keyboards on different phones, these
new smaller margin sizes should still be sufficient; and this lets
the buttons be larger.
2023-04-20 22:26:45 +00:00
Sander van Grieken
1aa14e749a qml: first part of partially signing tx while not having txid yet 2023-04-21 00:10:15 +02:00