1
0
Commit Graph

15613 Commits

Author SHA1 Message Date
Sander van Grieken
8a8703d5ea qml: styling 2023-02-10 17:24:39 +01:00
ThomasV
d7f48c8805 Qt history tab: create submenu for edit actions 2023-02-10 17:13:02 +01:00
ThomasV
f617887509 RBF dialog: do not decrease payment for swap funding transactions. 2023-02-10 16:30:08 +01:00
Sander van Grieken
e9ad9986d7 qml: qedaemon doesn't need wallet path and name properties, pass them via the signal 2023-02-10 14:27:39 +01:00
Sander van Grieken
fc212b1dcc qml: improve OpenWalletDialog, PasswordDialog and PasswordField 2023-02-10 14:26:13 +01:00
Sander van Grieken
2d5ba84e35 qml: styling InfoTextArea 2023-02-10 14:11:31 +01:00
Sander van Grieken
8ccc4801f7 qml: ConfirmTxDialog styling slider, avoid running off small screens 2023-02-10 13:29:18 +01:00
Sander van Grieken
1bfc4f1529 qml: android notification params 2023-02-10 13:29:18 +01:00
Sander van Grieken
02fd25141e qml: ConfirmTxDialog layout fixes 2023-02-10 13:29:17 +01:00
Sander van Grieken
3cb9ded1ca qml: fix flickable margins TxDetails and WalletDetails 2023-02-10 13:29:17 +01:00
ThomasV
965ccedc88 tx dialog clean-up: remove 'finalized' field and related code 2023-02-10 13:02:58 +01:00
ThomasV
d1eb909bee UTXO tab: simplify freeze menus 2023-02-10 10:35:13 +01:00
ThomasV
bf16919a74 Merge pull request #8197 from spesmilo/new_tx_flow
Qt: new onchain tx creation flow:
2023-02-10 10:26:44 +01:00
ThomasV
a4928ea6ed TxEditor: various tweaks 2023-02-09 14:58:57 +01:00
ThomasV
ad83eaaba1 TxEditor: rework update methods, separate _update_message from _update_send_button 2023-02-09 14:21:03 +01:00
Sander van Grieken
d1a40c47cf qml: fix max toggle in InvoiceDialog 2023-02-09 12:42:09 +01:00
Sander van Grieken
31523449b3 qml: OTP dialog improvements 2023-02-09 12:20:50 +01:00
ThomasV
13222c479c TxEditor: make trigger_update not private, call it on rbf combo changed. 2023-02-09 11:29:10 +01:00
ThomasV
a740a8a004 TxEditor: move set_locktime 2023-02-09 11:15:31 +01:00
ThomasV
95433cd153 TxEditor: update_extra_fees, overloaded by ConfirmTxDialog 2023-02-09 11:07:37 +01:00
ThomasV
8c00188348 TxEditor: set locktime 2023-02-09 10:52:09 +01:00
Sander van Grieken
11439fb3fd qml: don't stack exception dialogs when multiple exceptions happen 2023-02-09 01:34:54 +01:00
Sander van Grieken
c9b6917ab7 qml: Addresses fills page 2023-02-09 01:21:09 +01:00
Sander van Grieken
1e60cb740f qml: fixes TextHighlightPane 2023-02-09 01:21:09 +01:00
SomberNight
72d750c51c plot history: also include lightning items
```
  6.15 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/gui/qt/history_list.py", line 637, in plot_history_dialog
    plt = plot_history(list(self.hm.transactions.values()))
  File "/home/user/wspace/electrum/electrum/plot.py", line 24, in plot_history
    if not item['confirmations']:
KeyError: 'confirmations'
```
2023-02-08 23:37:51 +00:00
SomberNight
227ccc65d4 perf: load matplotlib on-demand
it takes ~1.7 seconds to import electrum.plot, slowing down app-startup considerably
2023-02-08 23:37:11 +00:00
SomberNight
ad0b853cd9 invoices: improve perf by caching lnaddr even earlier
During wallet-open, we load all invoices/payreqs. This involved decoding the lnaddrs twice.
Now we only decode once.

For a wallet with ~1000 payreqs, this noticeably sped up wallet-open:
(before:)
8.83 | D | util.profiler | Daemon._load_wallet 6.4317 sec
(after:)
5.69 | D | util.profiler | Daemon._load_wallet 3.4450 sec

It is very expensive to parse all the lnaddrs...
2023-02-08 23:36:36 +00:00
SomberNight
8a53a3201c wallet.try_detecting_internal_addresses_corruption: check more addrs
related https://github.com/spesmilo/electrum/issues/8202

For a HD wallet, instead of checking the first 10 addrs + 10 additional random ones,
we now check the first 10 addrs + 10 random used addrs + 10 random unused addrs.
Checking unused addresses is useful to prevent getting money sent there,
and checking used addresses is useful to inform people of already lost money.
2023-02-08 23:32:32 +00:00
SomberNight
90f1279d9a addr_sync: (trivial) don't use private utxo._is_coinbase_output 2023-02-08 23:32:28 +00:00
Sander van Grieken
6b8f9f8fe2 qml: allow ln node connect string without port, default to 9735 2023-02-08 17:31:08 +01:00
Sander van Grieken
6cb6531fd9 qml: add swap progress dialog 2023-02-08 17:12:20 +01:00
ThomasV
1d00b56b64 make ConfirmTxDialog resizeable 2023-02-08 13:28:03 +01:00
Sander van Grieken
c5883c7cdb text guis low hanging fruit 2023-02-08 12:51:24 +01:00
ThomasV
53b7cc3f90 use shared prefix for config keys related to tx editor 2023-02-08 11:34:48 +01:00
ThomasV
6e8e8798c7 feerounding_icon: use transparent background, and disable if not visible 2023-02-08 11:22:02 +01:00
Sander van Grieken
f3b3a40ffe qml: add wallet button icon 2023-02-08 10:37:47 +01:00
SomberNight
b20933de6d payserver: better handle running with --offline
```
 19.70 | E | plugin | Plugin error. plugin: payserver, hook: wallet_export_request
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/plugin.py", line 227, in run_hook
    r = f(*args)
  File "/home/user/wspace/electrum/electrum/plugins/payserver/payserver.py", line 69, in wallet_export_request
    d['view_url'] = self.view_url(key)
  File "/home/user/wspace/electrum/electrum/plugins/payserver/payserver.py", line 55, in view_url
    return self.server.base_url + self.server.root + '/pay?id=' + key
AttributeError: 'NoneType' object has no attribute 'base_url'
```
```
 23.22 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/plugins/payserver/qt.py", line 48, in settings_dialog
    url = self.server.base_url + self.server.root + '/create_invoice.html'
AttributeError: 'NoneType' object has no attribute 'base_url'
```
2023-02-08 01:51:43 +00:00
SomberNight
3ce2986c1f Testing with a wallet with a ~1000 unpaid/expired payment requests,
with the Qt gui, the python process saturates one of my CPU cores to 100%.
This is because main_window.timer_actions() calls request_list.refresh_all()
every 0.5 seconds, which iterates over all unpaid payreqs, and does a
scriptpubkey->address->scriptpubkey conversion.

Trace of the hot path:
```
  File "/home/user/wspace/electrum/./run_electrum", line 510, in <module>
    main()
  File "/home/user/wspace/electrum/./run_electrum", line 421, in main
    handle_cmd(
  File "/home/user/wspace/electrum/./run_electrum", line 439, in handle_cmd
    d.run_gui(config, plugins)
  File "/home/user/wspace/electrum/electrum/daemon.py", line 581, in run_gui
    self.gui_object.main()
  File "/home/user/wspace/electrum/electrum/gui/qt/__init__.py", line 469, in main
    self.app.exec_()
  File "/home/user/wspace/electrum/electrum/gui/qt/main_window.py", line 861, in timer_actions
    self.receive_tab.request_list.refresh_all()
  File "/home/user/wspace/electrum/electrum/gui/qt/util.py", line 821, in refresh_all
    self.refresh_row(key, row)
  File "/home/user/wspace/electrum/electrum/gui/qt/request_list.py", line 126, in refresh_row
    status = self.wallet.get_invoice_status(request)
  File "/home/user/wspace/electrum/electrum/wallet.py", line 2330, in get_invoice_status
    paid, conf = self.is_onchain_invoice_paid(invoice)
  File "/home/user/wspace/electrum/electrum/wallet.py", line 1118, in is_onchain_invoice_paid
    is_paid, conf_needed, relevant_txs = self._is_onchain_invoice_paid(invoice)
  File "/home/user/wspace/electrum/electrum/wallet.py", line 1085, in _is_onchain_invoice_paid
    outputs = invoice.get_outputs()
  File "/home/user/wspace/electrum/electrum/invoices.py", line 130, in get_outputs
    traceback.print_stack()
```

These commits drastically reduce the CPU utilisation.
2023-02-08 00:51:54 +00:00
SomberNight
1e3f9b942f qt: MyTreeView.refresh_all to use maybe_defer_update
In particular, window.timer_actions() calls
request_list.refresh_all() and invoice_list.refresh_all(),
every 0.5 seconds.
We avoid doing this at least when those lists are not visible anyway.
2023-02-08 00:45:18 +00:00
Sebastian Falbesoner
ede9b2b372 transaction: cache address determination from output script
In order to avoid repeatedly calling get_addr_from_output_script() on
every read of the "TxOutput.address" property, determine and cache it
only whenever the output script is created/changed.
2023-02-08 00:41:44 +00:00
SomberNight
71697afabd invoices: get_outputs to use .outputs field if available
It is wasteful to create new PartialTxOutput objects if we already have an outputs field.
Btw apparently lightning invoices too have an outputs field.
2023-02-08 00:40:46 +00:00
ThomasV
bc3946d2f4 Qt: new onchain tx creation flow:
- transaction_dialog is read-only
 - ConfirmTxDialog and RBF dialogs inherit from TxEditor
 - TxEditors are configurable
2023-02-07 16:42:20 +01:00
Sander van Grieken
5eb7bcebef qml: remove ugly notification popup, add wallet name to notifications 2023-02-07 13:55:22 +01:00
Sander van Grieken
c3c308ec0b qml: qewallet logger add wallet name 2023-02-07 13:50:26 +01:00
Sander van Grieken
78d68d00e0 qml: override default Material styling for toolbar, use grays 2023-02-07 12:23:14 +01:00
Sander van Grieken
73004b4993 qml: button min size 2023-02-07 11:54:10 +01:00
Sander van Grieken
393dcde7ae qml: set a minimum button size 2023-02-07 11:49:57 +01:00
Sander van Grieken
9d02f6ee4c qml: shorten text for adding addresses/keys and add add.png icon 2023-02-07 11:40:31 +01:00
Sander van Grieken
2dff6a10ca qml: fix issue with number of addresses in model 2023-02-07 11:18:27 +01:00
Sander van Grieken
9d4e00d582 qml: styling ImportAddressesKeysDialog 2023-02-07 11:10:28 +01:00