1
0
Commit Graph

17141 Commits

Author SHA1 Message Date
Sander van Grieken
a6ceeec09d qml: add frozen lightning to BalanceDetails, indent frozen on-chain and lightning amounts 2023-12-12 13:17:57 +01:00
Sander van Grieken
297f971fae qml: improve info text for incomplete transactions and transactions in mempool on transaction details page. 2023-12-12 12:11:37 +01:00
ThomasV
c1b359d43f Merge pull request #8738 from SomberNight/202312_mac_build
mac build: migrate to new VM (macOS 10.14 -> 11)
2023-12-12 12:08:40 +01:00
SomberNight
dd3fc041f9 qt main window: statusbar: swap Tor and Network buttons
I think it's nicer for the network status to be rightmost, which was the case for a long time.

(Though plugins are still added after (via multiple different mechanisms, see 2fa, hww, revealer).
We could perhaps add a VLine separator, or add them to the left instead.)

follow-up 90d1d587e8
2023-12-12 10:56:41 +00:00
SomberNight
c52853341c qt util: add VLine class, for vertical line separators 2023-12-12 10:50:47 +00:00
SomberNight
da775954c0 qt wizard: fix wallets directory relative paths on Windows
follow-up https://github.com/spesmilo/electrum/pull/8651

We cannot do direct comparison of path-like strings without normalisation.
E.g.
```
relative_path() cp1. path='c:\\users\\user\\appdata\\roaming\\electrum\\wallets\\9dk', wallets=C:\Users\User\AppData\Roaming\Electrum\wallets
relative_path() cp2. commonpath='c:\\users\\user\\appdata\\roaming\\electrum\\wallets'
relative_path() cp3. new_path='9dk'
```
2023-12-12 01:34:46 +00:00
SomberNight
58f041fd38 qt: fix window.donate_to_server to switch to send tab
probably regression from payment_identifier refactor
2023-12-12 01:14:13 +00:00
ghost43
e814fa0b25 Merge pull request #8719 from SomberNight/202312_db_seedtype
wallet db: deduplicate "seed_type" field
2023-12-12 01:01:30 +00:00
SomberNight
c98830d091 mac build: follow-up prev (altool -> notarytool migration)
related 7ee078852a
2023-12-12 00:57:01 +00:00
ThomasV
99da6507fc osx builds: use notarytool 2023-12-12 00:56:58 +00:00
SomberNight
86f6e3dbcb mac build: update README for new macOS 11 build VM
- For the notarisation, we were using "altool" (part of xcode), but Apple now fully deprecated that.
    - need to migrate from altool to notarytool
        https://developer.apple.com/news/?id=y5mjxqmn
    - currently using macOS 10.14.6
                  and xcode 11.3.1
    - notarytool requires xcode 13+
    - xcode 13 requires macOS 11.3
        https://en.wikipedia.org/wiki/Xcode#Version_comparison_table
    ==> created new build VM with macOS 11.7.10 and xcode 13.2
2023-12-12 00:56:55 +00:00
SomberNight
77f84060f4 mac build: clang to always target x86_64
With newer xcode (12+, I think), the default behaviour is to build
universal binaries that include native code for both arm64 and x86_64.
On older xcode, the default was to only target x86_64.

I am not sure why, but "hid.cpython-310-darwin.so" is not built
reproducibly when it is "universal".
(Even for consecutive builds done on the same machine.)
```
- + diff='Files /tmp/electrum_compare_dmg/signed_app/Electrum.app/Contents/MacOS/hid.cpython-310-darwin.so and /tmp/electrum_compare_dmg/dmg2/Electrum.app/Contents/MacOS/hid.cpython-310-darwin.so differ
```

This commit works around the reproducibly issue by making clang only
build for the x86_64 target. The binary should still be able to run
on arm64 macs using rosetta (same with previous versions of Electrum).

-----

The `lipo` tool can tell what archs a shared object is built for, e.g.:
```
$ lipo -info /Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/hid.cpython-310-darwin.so
Non-fat file: /Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/hid.cpython-310-darwin.so is architecture: x86_64
```

For quick testing, we don't need to build the whole .app, only hid.so:
```
source /Users/vagrant/electrum/contrib/osx/build-venv/bin/activate
export CFLAGS="-g0"
python3 -m pip install -I --no-build-isolation --no-dependencies --no-binary :all: --no-warn-script-location hidapi==0.14.0
strip -x /Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/hid.cpython-310-darwin.so
cp /Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/hid.cpython-310-darwin.so /Users/vagrant/wspace/tmp/try7/hid10.so
```

Re ARCHFLAGS env var, see https://stackoverflow.com/a/5808548

-----

Note: I've found several xcode build settings that looked relevant
but in the end were not useful, e.g. ARCHS, ONLY_ACTIVE_ARCH,
EXCLUDED_ARCHS, VALID_ARCHS.
- see https://developer.apple.com/documentation/technotes/tn3117-resolving-build-errors-for-apple-silicon
- see https://stackoverflow.com/a/64422757
2023-12-12 00:56:43 +00:00
Sander van Grieken
82ee4c22b8 qml: fix old ref to network.tor_proxy 2023-12-11 16:47:56 +01:00
ThomasV
ee10b0bf3e qt: move plugins dialog to own module 2023-12-11 10:19:36 +01:00
ThomasV
8199a6b5b2 Merge pull request #8733 from accumulator/remove_2fa_email
qt, qml: remove email entry from 2FA wallet ToS pages
2023-12-10 12:39:51 +01:00
Sander van Grieken
d8d2426e83 qml: add local/remote SCID alias to ChannelDetails 2023-12-08 14:17:14 +01:00
Sander van Grieken
d917c27a31 util: more code-style cleanup 2023-12-08 14:07:32 +01:00
Sander van Grieken
f5340b7791 qt: replace QStackedWidget with custom ResizableStackedWidget, remove unused imports in util 2023-12-08 13:55:45 +01:00
Sander van Grieken
4c8287358a qt, qml: remove email entry from 2FA wallet ToS pages 2023-12-08 12:07:03 +01:00
accumulator
1edb5bac81 Merge pull request #8651 from accumulator/issue_8028
config: keep wallets directory stable, regardless of wallet opens in …
2023-12-07 17:25:12 +01:00
accumulator
3f742a14b4 Merge pull request #8716 from accumulator/cosigner_pool_proxy
plugins: add proxy aware XMLRPCProxyTransport for xmlrpc.client calls…
2023-12-07 16:54:44 +01:00
Sander van Grieken
cfd24dbd6c small fixes 2023-12-06 17:11:51 +01:00
Sander van Grieken
b87d091a6d qt, qml: allow BIP39 seeds which fail checksum or wordlist (fixes #8720)
removes verifySeed from qebitcoin as this code was 99% duplicate of wizard.validate_seed
2023-12-06 16:12:57 +01:00
ghost43
1cc1926263 Merge pull request #8725 from accumulator/bolt11_lowercase
qt, qml: use lowercase bolt11 when copying or sharing
2023-12-05 17:29:09 +00:00
Sander van Grieken
15592d4987 followup 0d476f73df 2023-12-05 11:08:20 +01:00
accumulator
134fd6c656 Merge pull request #8714 from accumulator/tor_probe
network: async tor probe
2023-12-04 16:45:03 +01:00
Sander van Grieken
24c28409b3 qt, qml: use lowercase bolt11 when copying or sharing 2023-12-04 16:42:49 +01:00
Sander van Grieken
a1f3779f8b update RELEASE-NOTES 2023-12-04 13:57:07 +01:00
Sander van Grieken
0d476f73df network: rename network.tor_proxy to network.is_proxy_tor and keep it at None until TOR probe is done. 2023-12-04 10:42:32 +01:00
ThomasV
6745fb47bc Merge pull request #8724 from xiaolou86/master
Fix typos
2023-12-04 08:48:48 +01:00
xiaolou86
50e5b0efd1 electrum: fix typos 2023-12-04 14:15:39 +08:00
xiaolou86
00c584d557 contrib: fix typos 2023-12-04 14:15:38 +08:00
SomberNight
f7cb523b9d wallet db: deduplicate "seed_type" field
In the db, the 'seed_type' field could be present both at the top-level and inside keystores.

Note:
- both fields had usages
- the top-level field was added in 2.8 re "initial segwit support" (3a64ec0f2e)
  - there was no db upgrade for it, so older files are missing it
  - if present, valid values can be electrum types but also
    other types supported by the wizard, e.g. "bip39"
- the keystore-level field was added in 4.1 (7b7bba2299)
  - there was a db upgrade when it was introduced, so old files also have it
  - if present, valid values can only be electrum types
- there is not much value in the top-level one having a non-electrum value,
  and those values were never used by other parts of the code
  - note that when creating a standard wallet from a bip39 seed, the seed is discarded.
    Only the derived xprv and the derivation path are kept. If we changed this and also kept the seed,
    e.g. to display it to the user, then it would make sense to save the seed type (e.g. "bip39").
    However storing that seed_type would make more sense at the keystore level (not top-level).

We delete the top-level 'seed_type' field.

```
{
    "keystore": {
        "seed_type": "segwit",
        ...
    },
    "seed_type": "segwit",
    ...
}
```
2023-12-01 18:43:37 +00:00
SomberNight
64f82cd260 qt wizard bip39 recovery: better handle --offline mode
```
 32.40 | 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/wizard/wallet.py", line 709, in <lambda>
    button.clicked.connect(lambda: Bip39RecoveryDialog(self, get_account_xpub, on_account_select))
  File "/home/user/wspace/electrum/electrum/gui/qt/bip39_recovery_dialog.py", line 40, in __init__
    fut = asyncio.run_coroutine_threadsafe(coro, network.asyncio_loop)
AttributeError: 'NoneType' object has no attribute 'asyncio_loop'
```
2023-12-01 17:37:58 +00:00
SomberNight
5d178d3a7c qt wizard: clear up some log messages 2023-12-01 15:31:50 +00:00
Sander van Grieken
24323d21a2 qt: add note in wizard if wallet path is outside the default wallets folder 2023-12-01 16:14:32 +01:00
Sander van Grieken
b59e9089a0 qt: use datadir wallets folder consistently 2023-12-01 16:14:32 +01:00
Sander van Grieken
5c96847111 qt: show wallet as relative path if below datadir wallets folder 2023-12-01 16:14:32 +01:00
Sander van Grieken
786979ec50 config: keep wallets directory stable, regardless of wallet opens in other directories 2023-12-01 16:14:31 +01:00
Sander van Grieken
05758432d6 android: exclude more unnecessary directories 2023-12-01 16:01:46 +01:00
Sander van Grieken
134fe73f1a plugins: add proxy aware XMLRPCProxyTransport for xmlrpc.client calls in cosigner plugin 2023-12-01 14:31:10 +01:00
SomberNight
03778b6e0c add FIXMEs to instances where we don't use the network proxy
so that it at least does not get forgotten

related https://github.com/spesmilo/electrum/issues/4754
2023-11-30 19:31:14 +00:00
SomberNight
80e330d365 build: update pinned aiohttp-socks (partial rerun freeze_packages)
This should fix an issue when running with python 3.11 (possibly only 3.11.5<= ).

```
 47.45 | I | exchange_rate.CoinGecko | getting fx quotes for EUR
 48.18 | E | exchange_rate.CoinGecko | failed fx quotes: ClientOSError('Cannot write to closing transport')
Traceback (most recent call last):
  File "...\electrum\env11\Lib\site-packages\aiohttp\client.py", line 599, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "...\electrum\env11\Lib\site-packages\aiohttp\client_reqrep.py", line 712, in send
    await writer.write_headers(status_line, self.headers)
  File "...\electrum\env11\Lib\site-packages\aiohttp\http_writer.py", line 130, in write_headers
    self._write(buf)
  File "...\electrum\env11\Lib\site-packages\aiohttp\http_writer.py", line 75, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "...\electrum\electrum\exchange_rate.py", line 85, in update_safe
    self._quotes = await self.get_rates(ccy)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\electrum\electrum\exchange_rate.py", line 345, in get_rates
    json = await self.get_json('api.coingecko.com', '/api/v3/exchange_rates')
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "...\electrum\electrum\exchange_rate.py", line 69, in get_json
    async with session.get(url) as response:
  File "...\electrum\env11\Lib\site-packages\aiohttp\client.py", line 1187, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "...\electrum\env11\Lib\site-packages\aiohttp\client.py", line 613, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport
```

related:
https://github.com/romis2012/aiohttp-socks/issues/27
https://github.com/python/cpython/issues/109321
2023-11-30 19:16:33 +00:00
ThomasV
e441d4b15e release-sh: build each android apk separately
this triggers a cleanup of the fresh clone directory
2023-11-30 17:56:59 +01:00
SomberNight
6c213aca17 pyinstaller build fixes 2023-11-30 14:08:06 +00:00
Sander van Grieken
8c404f319a qt: translate string, wording minimum channel amount in new_channel_dialog 2023-11-30 15:03:05 +01:00
SomberNight
9743bd5219 pyinstaller build: (trivial) format so that win/osx look more similar 2023-11-30 13:52:20 +00:00
SomberNight
b551cb5f75 pyinstaller build: better parameterise .spec 2023-11-30 13:50:21 +00:00
SomberNight
0912e5615d pyinstaller build: follow-up: dirty hack for duplicate plugins
Ah ok, I give up for now... the prev does not really work.

The prior commit works on Windows but not on macOS.
On Windows, it would package all plugins as code and only as code.
On MacOS however, it would not package any plugins at all. And with this commit,
where I mark the plugins folder to be packaged as *data*, it packages all plugins as *both* code and data.
Not sure why.

Let's just package all plugins as both code and data, and ignore the code instances explicitly...
2023-11-30 13:48:53 +00:00
SomberNight
4cc9ef2078 pyinstaller build: clean-up .spec, fix issue described in prev commit
The hw_wallet and jade plugins were being included twice in the pyinstaller binaries.
They were apparently the only two plugins being picked as "modules" (a.pure),
which by default are included as compiled-bytecode.
In addition, we included "electrum/plugins" as data (a.data), which meant all
plugins in source form.

Instead of hacking around to fix the specific issue, this attempts a larger clean-up.
2023-11-30 13:44:31 +00:00