1
0
Commit Graph

15182 Commits

Author SHA1 Message Date
Sander van Grieken
0649f13ee8 qml: rework drawer, split wallet details from wallet list/picker 2022-11-02 16:43:10 +01:00
Sander van Grieken
3eaebe7b47 qml: flow tags to next line if exceeding most of screen width
properly update balance amount strings
2022-11-01 09:42:44 +01:00
Sander van Grieken
3f9df0517a qml: rename walletdetails to walletsummary 2022-11-01 09:40:57 +01:00
Sander van Grieken
00e1d1786c qml: balance piechart in walletdetails, fix menus to top header height 2022-11-01 09:39:20 +01:00
Sander van Grieken
6b979f2185 qml: add basic piechart 2022-10-30 22:51:10 +02:00
Sander van Grieken
7028435daa qml: create wallet details drawer 2022-11-01 09:37:57 +01:00
SomberNight
df2d0f4e1f qt send: use bolt11 fallback addr even if LN is disabled
Given a wallet with LN disabled,
and a bolt11 invoice (or a bip21 uri that only contains bolt11 but lacks a top-level address),
if the bolt11 invoice includes a fallback address,
we would previously just error "Lightning is disabled".

Now we offer the user to pay on-chain using the fallback address.

closes https://github.com/spesmilo/electrum/issues/8047
2022-10-31 19:15:03 +00:00
SomberNight
2fd762c308 qt send: bip21: ignore "lightning=" part if LN is disabled
A wallet with LN disabled could not pay a bip21 URI with an address and a "lightning=" key.
2022-10-31 19:09:08 +00:00
SomberNight
ac1d53f067 util.parse_URI: allow bip21 with lightning key without fallback addr
We would reject bip21 URIs that contained both an "address=" and a "lightning=" key with a bolt11 invoice,
where the bolt11 invoice did not contain a fallback address.
2022-10-31 19:03:12 +00:00
SomberNight
2863fb4ab4 tests: add "as_testnet" fn decorator, to run single tests in testnet
As opposed to using TestCaseForTestnet class, this allows having a single class
of many related unit tests, some using testnet and some using mainnet constants.
2022-10-31 18:44:38 +00:00
SomberNight
d3227d7489 transaction: for witness v0 txins, put both UTXO and WIT_UTXO in psbt
Until now we have been only putting PSBT_IN_NON_WITNESS_UTXO (="UTXO", full tx)
in segwit witness v0 txins, as signers wanted the full tx anyway due to
bip-143 sighash issue [0], and as WITNESS_UTXO can be calculated from UTXO.

My reading of bip-174 is that either behaviour is correct, but
achow101 said bip-174 expects PSBT_IN_WITNESS_UTXO for segwit inputs.
Regardless, including both fields does not increase the tx size too much
(UTXO can be very large ofc but we were already including that, WIT_UTXO is small).
This also might increase compatibility with some other software - I've found
some issues where this might have been the culprit [1][2][3].

closes https://github.com/spesmilo/electrum/issues/8039

related:
[0] https://github.com/spesmilo/electrum/pull/6198
[1] https://github.com/cryptoadvance/specter-desktop/issues/868
[2] https://github.com/cryptoadvance/specter-desktop/issues/1046
[3] https://github.com/cryptoadvance/specter-desktop/issues/1544
2022-10-31 17:14:21 +00:00
SomberNight
01b5e3f8e0 flake8: enable more mandatory tests 2022-10-31 16:13:22 +00:00
SomberNight
7db396aad9 follow-up prev: indentations should not use tabs in *.py
re https://github.com/spesmilo/electrum/pull/8044
2022-10-31 15:26:27 +00:00
ThomasV
5f24030e97 Merge pull request #8044 from mrmena/network_name
add network name to getinfo()
2022-10-30 10:41:40 +01:00
mrmena
6dc4b4f3b3 modified the way the constants module is accessed 2022-10-30 16:03:16 +11:00
mrmena
7a53b2cd47 added network type to getinfo 2022-10-30 15:25:12 +11:00
SomberNight
7b6274eaff daemon: better error msg if rpchost/rpcport is badly configured
old traceback:
```
$ ./run_electrum --testnet -o setconfig rpchost qweasdfcsdf
$ ./run_electrum --testnet -o setconfig rpcport 7777
$ ./run_electrum --testnet daemon
E | daemon.Daemon | taskgroup died.
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/daemon.py", line 419, in _run
    async with self.taskgroup as group:
  File "/home/user/wspace/electrum/packages/aiorpcx/curio.py", line 297, in __aexit__
    await self.join()
  File "/home/user/wspace/electrum/electrum/util.py", line 1335, in join
    task.result()
  File "/home/user/wspace/electrum/electrum/daemon.py", line 281, in run
    await site.start()  #
  File "/home/user/wspace/electrum/packages/aiohttp/web_runner.py", line 121, in start
    self._server = await loop.create_server(
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1471, in create_server
    infos = await tasks.gather(*fs)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1408, in _create_server_getaddrinfo
    infos = await self._ensure_resolved((host, port), family=family,
  File "/usr/lib/python3.10/asyncio/base_events.py", line 1404, in _ensure_resolved
    return await loop.getaddrinfo(host, port, family=family, type=type,
  File "/usr/lib/python3.10/asyncio/base_events.py", line 860, in getaddrinfo
    return await self.run_in_executor(
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/lib/python3.10/socket.py", line 955, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -3] Temporary failure in name resolution
```
2022-10-29 03:14:12 +00:00
SomberNight
22371730d6 daemon.run_daemon: always stop if daemon.taskgroup dies
If running in daemon mode, and daemon.taskgroup died, we were not stopping.
Instead, we should gracefully stop and exit the process.

To reproduce:
```
$ ./run_electrum --testnet -o setconfig rpcport 1
$ ./run_electrum --testnet daemon -v
```
2022-10-29 02:58:09 +00:00
ThomasV
3bb453aaba PayServer: add settings dialog and hook for view_url 2022-10-28 13:52:24 +02:00
ThomasV
724edd223c make PayServer a plugin 2022-10-28 12:07:30 +02:00
Sander van Grieken
26d9c06e0c qml: add export TX and scan of TX 2022-10-28 10:46:23 +02:00
SomberNight
335f55a7bf fix tests for new pytest (py.test -> pytest)
looks like latest pytest (7.2.0) removed support for the old py.test module/namespace

see 646a46e5f4/doc/en/changelog.rst (pytest-720-2022-10-23)
2022-10-27 17:37:37 +00:00
SomberNight
30ac889656 transaction: never put ypub/zpub in psbts, only plain xpubs
BIP-0174 specifies using standard bip32-compliant serialization for extended keys.
> The 78 byte serialized extended public key as defined by BIP 32.

closes https://github.com/spesmilo/electrum/issues/8036
2022-10-27 16:03:05 +00:00
SomberNight
45a939c146 tests: add test to check if we include xpubs in psbts
related: https://github.com/spesmilo/electrum/issues/8036
2022-10-27 15:55:01 +00:00
ThomasV
eefb855671 PayServer: fix create_request 2022-10-27 10:15:30 +02:00
Sander van Grieken
afb0c3bdb7 qml: implement remove local tx, show channel backup after channel open 2022-10-26 13:22:39 +02:00
Sander van Grieken
34d39e84f0 qml: don't check min amount for amount-less invoice 2022-10-26 11:18:01 +02:00
Sander van Grieken
3ace53391f qml: disable pay button while editing amount, perform minimum amount check for lightning invoices, update amount in invoice list. 2022-10-26 11:12:58 +02:00
Sander van Grieken
e3b3f04afe qml: refresh address list on new transaction by setting dirty flag 2022-10-25 16:45:27 +02:00
Sander van Grieken
a2d1d5e288 qml: missing import 2022-10-25 16:27:15 +02:00
Sander van Grieken
571c626eb4 qml: run tx broadcast in thread, re-enable broadcast button in TxDetails when broadcast fails
show notification when broadcast fails
2022-10-25 16:24:56 +02:00
Sander van Grieken
902f16204c qml: initial RbF bump fee feature 2022-10-25 15:13:57 +02:00
ghost43
1a7fc2cff7 Merge pull request #8029 from SomberNight/202210_git_eol
add .gitattributes file for end-of-line normalisation
2022-10-24 18:11:10 +00:00
SomberNight
98d29cba56 wine build: build win-iconv-mingw-w64-dev, instead of using debian sid
This commit reintroduces b8240bec3e, which was previously reverted
due to making the build non-reproducible.
I have found building with "make -j1" seems to work.
see https://github.com/win-iconv/win-iconv/issues/42

closes https://github.com/spesmilo/electrum/issues/7994
related https://github.com/spesmilo/electrum/pull/7992
2022-10-24 18:08:51 +00:00
x
fffbccff3b make it easier to troubleshoot config parse errors
Change the logging message displayed when the config file can't be
parsed: include the underlying exception text, so that a user who is
attepting to edit the config manually can find and fix any errors.
2022-10-24 17:51:57 +02:00
Sander van Grieken
87ee3030a8 qml: actually use rbf selection 2022-10-24 17:08:57 +02:00
ThomasV
d922db0bdf Merge pull request #7986 from accumulator/wizard
New approach to implement new wallet wizard
2022-10-24 13:29:42 +02:00
Sander van Grieken
2adf034771 use apply() function on every wizard page, making sure wizard_data is always available
to wizard navigation evaluation
2022-10-24 13:04:46 +02:00
Sander van Grieken
fac4003354 qml: fix wizard_data not available to 'last' check on have seed wizard page
also refactor seed verification, split off seed_variant from seed_type (partial disambiguation),
fix bip39 wallet creation
2022-10-24 13:03:33 +02:00
Sander van Grieken
0a9c100382 force subclassing of self.last_if_single_password in NewWalletWizard 2022-10-24 10:38:43 +02:00
SomberNight
32ce64faa5 merchant www: allow symlinks for vendored libs
debian packager would like to replace vendored libs with system provided ones
(using symlinks). This requires "follow_symlinks=True".

discussion of security implications: https://serverfault.com/q/244592

to minimise attack surface, we only set this option for the "vendor/" directory.

related: https://github.com/spesmilo/electrum/issues/8023
2022-10-22 15:55:38 +00:00
accumulator
6e536d2d91 add invoice status to invoice_status callback (#8020)
* add invoice status to invoice_status callback

* debug statement fails tests

* removed commented lines, added progress/attempt counter comment in lnworker.pay_to_node,
and update the invoice_status event handler in qeinvoicelistmodel.py
2022-10-21 16:45:12 +00:00
Sander van Grieken
d65ee17100 qml: ui confirm tx dialog 2022-10-21 14:15:59 +02:00
Sander van Grieken
cf005a0f2a qml: ui close channel dialog 2022-10-21 14:11:14 +02:00
Sander van Grieken
daffa1a731 qml: ui swapdialog 2022-10-21 14:00:35 +02:00
Sander van Grieken
6ca733a12f move /gui/wizard.py to /wizard.py 2022-10-21 13:32:16 +02:00
Sander van Grieken
28b5103d93 remove qml_test plugin, remove plugin settings test 2022-10-21 13:32:16 +02:00
Sander van Grieken
c6496d02ef add recovery paths (disable and confirm/reset OTP) for 2FA 2022-10-21 13:32:16 +02:00
Sander van Grieken
15e2ed4f58 rewrite server connect wizard to new wizard style
'last' property on WizardComponents is now queried from UI, not from the wizard.
This allows the content of the WizardComponent itself to be taken into account.
2022-10-21 13:32:16 +02:00
Sander van Grieken
6ea3a16cc8 add wallet type imported addresses/private keys to wizard 2022-10-21 13:32:16 +02:00