1
0
Commit Graph

15196 Commits

Author SHA1 Message Date
SomberNight
eb2ff94104 android: when running debug apk, disallow changing "enable_debug_logs"
follow-up 34b594ea40
2022-11-04 02:40:04 +00:00
SomberNight
4a3bc2f8b9 CI: macOS *still* does not have sha256sum :( 2022-11-04 01:53:49 +00:00
SomberNight
39dbd9492c CI: more aggressive cache invalidation
E.g. if we bump the python version, should not reuse the pip cache.
Easiest to invalidate cache if any build-specific file changes.
2022-11-04 01:51:19 +00:00
SomberNight
f8103163f7 CI: macOS does not have sha256sum 2022-11-04 01:27:40 +00:00
SomberNight
473dd08c04 CI: cache more 2022-11-04 00:49:01 +00:00
SomberNight
19d316f8e2 CI: rm obsolete "electrum_cache"
it's an empty folder.
2022-11-04 00:48:44 +00:00
SomberNight
ee8a20f7b6 CI: rename requirements-travis.txt 2022-11-04 00:48:21 +00:00
SomberNight
7328386413 CI: try to cache android apk builds
and build qml arm64 on every commit
2022-11-04 00:40:57 +00:00
SomberNight
84faf7f99a tests: fix TestLNTransport probabilistic failure
lucky CI run: https://github.com/spesmilo/electrum/runs/9273471816
2022-11-03 15:45:15 +00:00
SomberNight
08eff6faa3 android: mention in README how to install CI apks on phone 2022-11-03 13:28:51 +00:00
SomberNight
21c18bbbe7 util.parse_URI: honour docstring and only raise InvalidBitcoinURI
follow-up ac1d53f067
2022-11-03 12:47:21 +00:00
SomberNight
a15e383dbb wallet.add_input_info: also add block_height if known
The coin_chooser requires the block_height field (to prioritise confirmed utxos).
2022-11-03 12:30:37 +00:00
ThomasV
015648c4e5 Move get_dict method from wallet_db to json_db.
Define overloaded methods: _convert_dict _convert_values
2022-11-03 12:41:49 +01:00
Sander van Grieken
99b2970372 qml: forgot WalletDetails.qml 2022-11-03 12:23:41 +01:00
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