f321x
bcb740695b
lnurl: only sanitize untrusted LNURL errors
...
it is not neccessary to sanitize all LNURLErrors as most are just source
strings.
2025-08-27 17:36:51 +02:00
Sander van Grieken
313c8a136a
qml: use declarative form for invoiceResolved and requestResolved in WalletMainView
...
(cherry picked from commit 78b2e3df6c47ad5d5d119cbc2372e62807f372fd)
2025-08-27 16:46:41 +02:00
f321x
c2f5b3ba6b
qml: lnurlw: bind walletCanReceive to in-liquidity
...
binds the walletCanReceive variable to the available inbound liquidity
so the withdraw button gets enabled when the channels reconnect if the
user opens a lnurlw request dialog before the channels have connected.
2025-08-27 15:35:14 +02:00
f321x
b90090e2dd
qml: separate PI resolving from QEInvoiceParser
...
separates the resolving step from the QEInvoiceParser so the 'recipient'
can be resolved first and then either an QEInvoiceParser can be used if
it is a sending request that has been resolved (invoice, address,
lnurlp, ...), or RequestDetails can be used if the resolved 'recipient'
turns out to be a voucher/LNURLW string.
# Conflicts:
# electrum/gui/qml/qeinvoice.py
2025-08-27 15:35:03 +02:00
f321x
72dfc61d9c
tests: add more lnurl testing for PaymentIdentifier
...
adds some more detailed tests to `test_payment_identifier.py` to test
lnurlp and lnurlw separately and mock their resolve.
2025-08-27 15:31:47 +02:00
f321x
fdeada3f51
lnurl: implement LNURL-withdraw
...
adds handling of lnurl-withdraw payment identifiers which allow users to
withdraw bitcoin from a service by scanning a qr code or pasting the
lnurl-w code as "sending" address.
2025-08-27 15:31:43 +02:00
f321x
f1dfe5e248
qml: LoadingWalletDialog: add some padding
...
add some padding at the bottom of the LoadingWalletDialog so the
spinning circle is not directly at the bottom of the dialog, looks a bit
nicer this way.
2025-08-27 15:17:19 +02:00
f321x
9871931bf3
android: make QR code scanner e2e compatible
...
Makes the Java QR code scanner edge-to-edge compatible by padding the
hintTextView and the pasteButton.
2025-08-27 15:17:17 +02:00
f321x
5f0180910c
qml: add padding to ElDialog for android e2e
2025-08-27 15:17:16 +02:00
f321x
53595e1be7
qml: pad main view if e2e enforcement is active
2025-08-27 15:17:13 +02:00
f321x
4b30b097a9
qml: qeapp: add methods to retrive system bar heights
2025-08-27 15:17:04 +02:00
f321x
c365272745
android: bump target sdk to 35
2025-08-27 13:57:22 +02:00
Sander van Grieken
18f6b88982
don't sys.exit() from run_offline_command, this leads to wait on lock that never releases.
2025-08-26 12:24:03 +02:00
SomberNight
835b04d5c6
swaps: add explicit check that (onchain_locktime < LN_locktime)
...
This was already implicitly checked. This diff makes the check explicit, and serves as an additional sanity-check.
- for client-forward-swaps, we have
- "cltv safety requirement: (onchain_locktime < LN_locktime), otherwise client is vulnerable"
- server chooses onchain locktime delta = 70
71255c1e73/electrum/submarine_swaps.py (L701)
- client checks that onchain locktime delta is <100
71255c1e73/electrum/submarine_swaps.py (L887)
- client chooses LN locktime delta = 432
71255c1e73/electrum/submarine_swaps.py (L907)
- for client-reverse-swaps, we have
- "cltv safety requirement: (onchain_locktime < LN_locktime), otherwise server is vulnerable"
- server chooses onchain locktime delta = 70
71255c1e73/electrum/submarine_swaps.py (L598)
- server chooses LN locktime delta: unset, i.e. our default of 147
71255c1e73/electrum/submarine_swaps.py (L612)
71255c1e73/electrum/lnworker.py (L2273)
2025-08-26 04:55:10 +00:00
SomberNight
71255c1e73
contrib/make_download: sort signers, instead of random fs order
2025-08-25 12:23:49 +00:00
SomberNight
d9480fe339
contrib: add "set -e" to bash scripts where missing
2025-08-25 12:22:37 +00:00
ThomasV
a8b86f2c72
Merge pull request #10173 from SomberNight/202508_release462
...
prepare release 4.6.2
4.6.2
2025-08-24 20:14:50 +02:00
SomberNight
c95112643b
prepare release 4.6.2
2025-08-24 18:03:20 +00:00
ghost43
68d93d186c
Merge pull request #10172 from SomberNight/202508_qml_wallet_ks_password
...
daemon: load_wallet: add force_check_password arg, and use it in qml
2025-08-24 18:00:57 +00:00
SomberNight
f98b6a3928
update locale
2025-08-23 18:59:14 +00:00
SomberNight
92bdc4d4ca
daemon: load_wallet: add force_check_password arg, and use it in qml
...
- fix: qml gui errors when trying to open a wallets with only keystore-encryption
- fixes https://github.com/spesmilo/electrum/issues/10171
- qml gui to prompt for password on wallet open even if wallet is not storage-encrypted
2025-08-23 16:54:48 +00:00
SomberNight
23a82f328f
util: fix DebugMem helper
...
```
28.99 | I | util.DebugMem | Start memscan
29.10 | E | plugin.Plugins |
Traceback (most recent call last):
File "...\electrum\util.py", line 405, in run_jobs
job.run()
File "...\electrum\util.py", line 376, in run
self.mem_stats()
File "...\electrum\util.py", line 368, in mem_stats
if isinstance(obj, class_):
File "...\Python310\lib\abc.py", line 119, in __instancecheck__
return _abc_instancecheck(cls, instance)
File "...\electrum\simple_config.py", line 609, in __getattribute__
raise AttributeError()
AttributeError
```
2025-08-23 14:51:01 +00:00
ghost43
53271a71d4
Merge pull request #10169 from SomberNight/202508_swaps_more_cleanup
...
swaps: more cleanup
2025-08-23 12:54:02 +00:00
SomberNight
7989d6467b
swaps: trivial rename WITNESS_TEMPLATE_REVERSE_SWAP
2025-08-23 12:47:53 +00:00
SomberNight
08f041f3da
swaps: add check for blockchain().is_tip_stale()
2025-08-23 02:41:53 +00:00
SomberNight
9e7c332b06
lnworker: rewrite payment_bundles: lower cpu-time-complexity
2025-08-23 02:41:46 +00:00
SomberNight
a7afd59dec
swaps: more clean-up, add comments, more sanity checks
2025-08-23 02:41:43 +00:00
SomberNight
fc362826e8
swaps: clean-up onchain script construction
2025-08-23 02:41:40 +00:00
SomberNight
8d8d1dba0f
util.format_satoshis: floating-point paranoia
2025-08-22 13:30:26 +00:00
ThomasV
44a95bafbe
Merge pull request #10164 from f321x/proper_cleanup_after_swap_failed
...
swaps: cleanup data after swap gets failed
2025-08-22 15:20:47 +02:00
f321x
97a0d27fa6
swaps: cleanup after successful swap
...
unregister hold invoice callback and delete payment bundle. they are not
used anymore.
2025-08-22 12:52:43 +02:00
ThomasV
0949d9755c
Merge pull request #10165 from spesmilo/swaps_prepayment
...
reverse swaps: in the CLI, replace 'server_mining_fee' with
2025-08-22 10:37:53 +02:00
ThomasV
13260ca498
Merge pull request #10167 from SomberNight/202508_cmd_format_satoshis
...
commands: use format_satoshis consistently. don't use sci-notation
2025-08-22 10:36:46 +02:00
ghost43
db1df37dda
Merge pull request #10159 from SomberNight/202508_max_logfile_size
...
logging: add config.LOGS_MAX_TOTAL_SIZE_BYTES: to limit size on disk
2025-08-21 21:10:42 +00:00
ghost43
e6eb9f6cd2
Merge pull request #10166 from spesmilo/txbatcher_fix_to_sweep_now
...
txbatcher: to_sweep_now should be a list
2025-08-21 21:03:49 +00:00
f321x
c623cca654
swaps: cleanup data after swap gets failed
...
Removes the persisted payment info from lnworker once a swap got failed.
Stops persisting the OnionRoutingFailure as it is sufficient to delete
the payment info to fail potential incoming htlcs.
Deletes stored swap leftovers in lnworker and SwapManager
2025-08-21 19:56:42 +02:00
SomberNight
e5930dd5e6
trivial follow-up: add more type-hints
2025-08-21 17:48:38 +00:00
ThomasV
864932c79a
reverse swaps: in the CLI, replace 'server_mining_fee' with
...
'prepayment', which corresponds to the trusted part of the
lightning payment.
We use 2*sm.mining_fee, where 'mining_fee' is the flat part of
the server fee. However, future protocol should probably allow
to set a value that does not depend on 'mining_fee'.
(note that LND uses a hardcoded amount).
2025-08-21 19:47:00 +02:00
ThomasV
08ea821221
txbatcher: to_sweep_now should be a list
2025-08-21 19:41:35 +02:00
SomberNight
c1d2fc2b42
lnworker: (trivial) get_payment_bundle to not return None
2025-08-21 17:39:31 +00:00
SomberNight
74cd2b4ac3
commands: use format_satoshis consistently. don't use sci-notation
...
old behaviour:
```
>>> from electrum.commands import format_satoshis
>>> format_satoshis(1)
'1E-8'
```
2025-08-21 17:38:27 +00:00
ThomasV
07d69bd876
Merge pull request #10161 from spesmilo/txbatcher_do_not_remove_local_tx
...
txbatcher: be careful when removing local transactions
2025-08-21 19:10:49 +02:00
SomberNight
6d99717d5b
txbatcher: add comment to _to_pay_after
2025-08-21 15:15:08 +00:00
ghost43
139508e2b4
Merge pull request #10162 from f321x/prevent_swapserver_spam
...
swaps: rate limit swapserver requests
2025-08-21 13:52:02 +00:00
f321x
aa661da9e2
swaps: stop sending whole req exception to client
2025-08-21 14:41:47 +02:00
f321x
9086f1af14
swaps: rate limit swapserver requests
2025-08-21 14:41:36 +02:00
ghost43
d7fe5fb46d
Merge pull request #10158 from f321x/command_fetch_swap_providers
...
commands: add command to fetch nostr swap providers
2025-08-21 12:29:10 +00:00
f321x
990a56b9dc
tests: regtest: add swapserver mining fee argument
2025-08-21 14:23:26 +02:00
f321x
8c8d142307
tests: unittest get_submarine_swap_providers cli
2025-08-21 14:23:24 +02:00
f321x
5bb9b71bae
commands: add command to fetch nostr swap providers
2025-08-21 14:23:20 +02:00