1
0
Commit Graph

17223 Commits

Author SHA1 Message Date
SomberNight
0a6283b1ef build: bump zbar version in win/mac/android builds
- new version (0.23.93) fixes a security issue
  bb05ec54ee/ChangeLog (L5)
2024-01-10 20:46:38 +00:00
SomberNight
d89f9846b9 qt/qrreader(zbar): don't call callback if user closes camera window
- without this, in send tab paytoedit, try_payment_identifier will get called and it will error
df1b9a223c/electrum/gui/qt/paytoedit.py (L153)
- also, in all text fields this used to result in clearing the current text (but now it is kept instead)
2024-01-10 20:39:58 +00:00
ThomasV
df1b9a223c remove qt module from swapserver plugin (unused since a300b8968a) 2024-01-10 17:32:31 +01:00
MrNaif2018
7369145a49 Fix graceful shutdown for lightning swaps 2024-01-10 17:17:48 +01:00
ThomasV
178a03129f submarine_swaps: define main_loop, with async with taskgroup
rm unneeded @ignore_exception wrapper in lnworker and network
2024-01-10 17:15:29 +01:00
Sander van Grieken
65210d03ac qml: log txid when assertion fails in qetxdetails.py 2024-01-09 12:57:26 +01:00
ThomasV
d6c45113e4 trustedcoin: do not db.write() from daemon thread. fixes #8791 2024-01-09 12:36:09 +01:00
ghost43
af6467bac4 Merge pull request #8786 from MrNaif2018/fix/in-memory-wallet
Restore ability to pass wallet in-memory
2024-01-08 18:08:01 +00:00
SomberNight
f9d6849b0a tests: add unit tests for prev 2024-01-08 18:03:40 +00:00
SomberNight
f7ea2e0d3c trustedcoin: fix qt wizard two-part-wallet-creation, online phase
```
 25.30 | 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/__init__.py", line 439, in _start_wizard_to_select_or_create_wallet
    wallet = self.daemon.load_wallet(wallet_file, d['password'], upgrade=True)
  File "/home/user/wspace/electrum/electrum/daemon.py", line 481, in func_wrapper
    return func(self, *args, **kwargs)
  File "/home/user/wspace/electrum/electrum/daemon.py", line 491, in load_wallet
    wallet = self._load_wallet(path, password, upgrade=upgrade, config=self.config)
  File "/home/user/wspace/electrum/electrum/util.py", line 481, in do_profile
    o = func(*args, **kw_args)
  File "/home/user/wspace/electrum/electrum/daemon.py", line 516, in _load_wallet
    raise WalletUnfinished(db)
electrum.wallet_db.WalletUnfinished: <electrum.wallet_db.WalletDB object at 0x7f11db3a7ca0>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wizard.py", line 203, in on_next_button_clicked
    if self.is_finalized(wd):
  File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wallet.py", line 178, in is_finalized
    if not wizard_data['wallet_exists'] or wizard_data['wallet_is_open']:
KeyError: 'wallet_exists'
```
2024-01-05 15:34:20 +00:00
SomberNight
66b8ec1833 trustedcoin: rm some dead code
used by old qt wizard
2024-01-05 15:29:21 +00:00
SomberNight
683c6083c9 wizard: do not log sensitive data (add more keys) 2024-01-05 15:14:33 +00:00
SomberNight
77c55d78b7 qt wizard: show warning when trying to restore 2fa seed as std wallet
With wallet_type=="standard", if the user enters a 2fa electrum seed, the "next" btn is disabled.
This is a regression in the new wizard, the old one used to "redirect" seamlessly.
This commit does not fix this, but at least shows a user-friendly warning message.

Note: would be nice if the wizard redirected automatically, in both directions (2fa->std, std->2fa).
The old wizard implemented std->2fa (probably the more common case hit by users), and had this
warning message shown for the 2fa->std case. Now I am repurposing the warning also for std->2fa.
2024-01-05 15:00:45 +00:00
SomberNight
dab768b932 qt/wizard/wallet: improve typing: introduce WalletWizardComponent cls 2024-01-05 13:34:57 +00:00
SomberNight
37173845c2 qt wizard: WizardComponent: (fix) also inherit ABC
for `@abstractmethod` decorator to work
(except, turns out, it's not so simple because of pyqt's own magic for QWidget)
2024-01-05 13:26:33 +00:00
SomberNight
201c0ab71b qt wizard: fix restoring from 2fa seed
follow-up 7df057aaf9
2024-01-05 12:51:54 +00:00
SomberNight
3b630c7a5b tests: add "short seed cheat sheet"
hopefully I can remember what to ctrl+f to find this
2024-01-05 12:14:33 +00:00
accumulator
35d4cf4d09 Merge pull request #8788 from accumulator/qml_non_historic_fiat
qml: don't show fiat amount when timestamp more than a day old and historic rates are disabled
2024-01-04 17:31:16 +01:00
accumulator
a51b3bdbfb qml: show fiat price when historic rates are enabled and no timestamp available
Co-authored-by: ghost43 <somber.night@protonmail.com>
2024-01-04 17:31:00 +01:00
ghost43
926756c6cc Merge pull request #8789 from accumulator/bip21_req_params_validation
bip21: fail bip21 uri if unsupported req-* parameter is present.
2024-01-04 16:10:55 +00:00
SomberNight
bd88b6ba29 tests: add unit test for prev 2024-01-04 16:00:24 +00:00
Sander van Grieken
313b79cfaf qml: add txid not empty assert to removeLocalTx. ref #8775 2024-01-04 13:08:17 +01:00
Sander van Grieken
0b7fa9cd99 bip21: fail bip21 uri if unsupported req-* parameter is present. fixes #8781 2024-01-04 12:34:17 +01:00
Sander van Grieken
5077e013f3 qml: don't show fiat amount when timestamp more than a day old and historic rates are disabled 2024-01-04 12:25:40 +01:00
MrNaif2018
9b5bead6f4 Restore ability to pass wallet in-memory 2024-01-02 18:46:02 +03:00
accumulator
88058df409 Merge pull request #8772 from accumulator/qml_tx_inputs
qml: add transaction inputs in TxDetails and …
2023-12-29 16:21:22 +01:00
Sander van Grieken
92bff08ba5 qml: don't use predictive text for fields where it makes no sense 2023-12-29 16:18:03 +01:00
Sander van Grieken
3935e378b3 android: p4a ref d976b539dc7c808d103a7edfe6dc1fd300582a89
> don't keep build dir around after succesful build
2023-12-29 16:16:07 +01:00
Sander van Grieken
c1ebc42724 android: p4a ref f534fe9bcd692c4df97e644d34c5bd8acede01eb
> qt6: don't copy entire build tree to dist, use select set of include patterns.
2023-12-29 13:58:46 +01:00
Sander van Grieken
e8852918a7 qml: fix newline in TxDetails 2023-12-29 12:13:49 +01:00
Sander van Grieken
7164392b1c qml: add transaction inputs in TxDetails and ConfirmTxDialog, RbfBumpFeeDialog, RbfCancelDialog, CpfpBumpFeeDialog
and allow collapse/expand of input/output lists by clicking on label.
2023-12-29 11:55:36 +01:00
SomberNight
eee61a98cb gui: cpfp: calc parent fee for cpfp using wallet.get_tx_info
I am only making this change as it makes it simpler to do manual testing of CPFP-ing *local* txs.
That is, by changing a few easy-to-find lines of code, I can make the GUI allow CPFP-ing a local tx, but
without this change it errors out with "unknown fee for parent transaction".

If one has an incoming local tx saved in the wallet, adb.get_tx_fee(txid) returns None
(if the tx gets into the mempool, it will use the server-reported value instead).
In contrast, wallet.get_tx_info(tx).fee calls both wallet.get_wallet_delta(tx) and adb.get_tx_fee(txid),
making it more expensive but more complete.
2023-12-29 02:55:11 +00:00
Sander van Grieken
ceb42c2a1b qml: show frozen lightning balance in BalanceDetails only when non-zero 2023-12-28 12:30:37 +01:00
SomberNight
0dae17339d qml: add config setting to allow screenshots
On Android, we disallow screenshots on screens where the seed is visible.
(The seed is extremely sensitive data that should not be stored digitally without
significant precautions but it's also cumbersome to write down or memorise, so
some people instinctively just try to take a screenshot of it when creating a wallet.)
We do this by using the built-in OS mechanism of setting FLAG_SECURE on the window.
However, on some devices with custom ROMs (one report from LineageOS, one from /e/OS),
unsetting FLAG_SECURE crashes the application for some reason.

As a workaround, this commit adds a config setting into the Preferences,
to disable this mechanism and just always allow screenshots.
(note that you can get into the qml Preferences before creating/opening any wallet)

ref https://github.com/spesmilo/electrum/issues/8522
2023-12-27 07:28:39 +00:00
accumulator
9ea15a1c3c Merge pull request #8737 from accumulator/welcome_page
qt,qml: add a welcome page as initial page for server connect wizard
2023-12-24 14:20:52 +01:00
SomberNight
d54184dbc1 fix some DeprecationWarnings in python3.12
...\electrum\electrum\logging.py:137: DeprecationWarning: datetime.datetime.utcnow() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
...\electrum\electrum\x509.py:310: DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC).
2023-12-24 08:57:57 +00:00
SomberNight
3d1009f7e2 tests: fix TestLNTransport.test_loop for python 3.12
Semantics for server.wait_closed changed in 3.12, and it was always
a no-op in our usage in prior versions.
see https://github.com/python/cpython/issues/104344
2023-12-24 07:12:15 +00:00
SomberNight
872ab29436 android build: bump some security-sensitive packages (py3, ssl) 2023-12-24 05:18:47 +00:00
SomberNight
615cb66692 appimage build: bump python version (3.10.11->3.10.13) 2023-12-24 05:15:39 +00:00
SomberNight
25c50f15c0 qt TxEditor: fix extraneous "not able to RBF later" warning
Imported wallets, and HD wallets with "use change" disabled, would always
get the warning before.
2023-12-22 23:50:04 +00:00
Sander van Grieken
4908c8c389 qml: RbfCancelDialog: warning text in frame 2023-12-22 17:35:25 +01:00
accumulator
d8bd55bf4e Merge pull request #8758 from accumulator/qml_error_dialogs
qml: use warning icon and error title for failure messagedialogs
2023-12-22 16:55:01 +01:00
sha-265
92a08a5fe7 Add Bit2C exchange (#8767)
* Add Bit2C exchange
* Remove whitespace

---------

Co-authored-by: sha-265 <sha@mempool.party>
2023-12-22 11:03:58 +01:00
Sander van Grieken
cb34bbee7e qml: don't enable save button for already saved invoices 2023-12-21 13:29:37 +01:00
accumulator
bec74304b6 Merge pull request #8759 from accumulator/qml_remove_unused
qml remove unused components
2023-12-21 12:36:51 +01:00
Sander van Grieken
adcc9eb2d1 qml: qewallet code style 2023-12-21 12:36:20 +01:00
Sander van Grieken
c7e055bdb9 qml: remove unused components 2023-12-21 12:36:20 +01:00
Sander van Grieken
ebcecdccce qt,qml: add checkboxes for advanced network config on welcome page, remove separate proxy-ask and autoconnect pages 2023-12-21 11:17:48 +01:00
SomberNight
2ea723a91a tests: add test for bip39 utf-8 normalisation
test case from https://github.com/Electron-Cash/Electron-Cash/issues/2740
2023-12-19 22:47:57 +00:00
Sander van Grieken
5e39ff49bc add missing accept handler for welcome page 2023-12-19 18:49:16 +01:00