1
0
Commit Graph

3909 Commits

Author SHA1 Message Date
SomberNight
e6071bbf5d qml: fee histogram colours: extend colour palette to cover sub-1 s/b
Currently on master the qml fee histogram colours are calculated for feerates clamped to [1, 600] sat/vbyte. I want to extend it to now cover [0, 600] sat/vbyte.
I would like to extend it in a way that does not change the existing colour meanings/mapping, so not just e.g. doing an offset.

follow-up bd6dfc53a2
2025-11-15 01:46:31 +00:00
Sander van Grieken
81c83f8318 qeinvoice: query self.status once in update_userinfo() and determine_can_pay() 2025-11-13 12:40:37 +01:00
ThomasV
5cb0902793 Merge pull request #10299 from f321x/pay_to_many_label
qt: send tab: show "pay to many" label
2025-11-12 15:29:27 +01:00
ghost43
d87f9e9a44 Merge pull request #10295 from SomberNight/202510_proto16
electrum protocol: add support for 1.6, but keep supporting 1.4
2025-11-07 16:42:11 +00:00
f321x
8fabad4b51 qt: send tab: show "pay to many" label
This changes the "Pay to" label to "Pay to many" if the user enables the
"Pay to many" option and aligns it at the top of the payto_e instead of
moving ot to the center when the payto_e expands.
2025-11-04 10:21:09 +01:00
f321x
c2068a4e4b qt: add text to toolbar button
The toolbar button is very small and some users probably don't even
notice it. As we have lots of space in the toolbar anyways i think it
makes sense to add some text to it to make it more visible and easier to
click. Maybe this is also useful for screen readers.
2025-11-04 09:54:29 +01:00
SomberNight
cd3173a289 interface: extend client to be able to support a range of protocols 2025-11-03 16:50:38 +00:00
ghost43
41378e1c91 Merge pull request #10287 from f321x/fix_cake_diagram
qt: allow opening BalanceDialog if warning is set and balance is 0
2025-10-31 13:45:08 +00:00
f321x
fb4b744142 qt: remove outdated help string in SendTab
The amount edit box is not turning red anymore if the amount is higher
than the wallet balance, so this string can be removed.
Alternatively it could be made red again but seems like nobody missed
it.
2025-10-29 18:17:06 +01:00
f321x
6484947485 qt: allow opening BalanceDialog if warning
Allow to open the BalanceDialog, by clicking on the Pie Diagram in the
bottom left corner of the main window, if there is an active warning,
even if the wallets balance is 0. Right now the user can see the
warning icon for the lighting channel reserve, but cannot click on the
icon to read the actual warning if there is no balance in the wallet.
2025-10-29 10:50:56 +01:00
f321x
c816987164 android: qr scanner: add emoji to clipboard string
The string is not translated and might not be accessible for non-english
speakers, even though its relatively self-explanatory i think adding
this emoji makes it more accessible.
2025-10-28 14:32:04 +01:00
f321x
f2aa4404ad qt: fix ServerWidget
The ServerWidget was not working properly, when switching from "Manual
Mode" to "Auto Connect" the change wouldn't get saved as it depended on
having a correct server string entered (which isn't neccessary for Auto
Connect).
Also makes the widget behave more sane by cleaning the server input if
Auto Connect is enabled and switching to Manual Mode if the user
manually selects a server.

Update the ServerWidget every time it is shown (on initialization and
also when the user opens it again or switches between network dialog
tabs).
This will clean it up if the user has entered some invalid server and
closes it, otherwise this server would stay in the input field until the
application is restarted.

The list of servers in the ServerWidget allows the user to right click
and 'Use as server' on the servers in the list, however internally it
was handled differently than what the user would expect when clicking on
'Use as server'. E.g. if the user selects a server in autoconnect mode
it would still stay in autoconnect mode so the server could switch again
to another server any time? Now it will also change the mode to manual
(or stay in single server mode if that was selected before), making it
clear that this server will stay selected.

If the user clicks on "Follow this branch" the connect mode will get changed to
autoconnect as internally we connect to a random interface on this
branch.
2025-10-27 18:46:36 +01:00
dulanting
08fd2de003 chore: fix comment for electrum/gui/qt/main_window.py
Signed-off-by: dulanting <dulanting@outlook.jp>
2025-10-13 16:26:50 +08:00
SomberNight
f832c33d76 qt: main_window.confirm_tx_dialog: rm dead code 2025-10-09 14:36:15 +00:00
SomberNight
af6715040c lnurlw: follow-up: adapt to recent lnworker.get_bolt11_invoice refactor 2025-10-03 02:12:04 +00:00
SomberNight
ef8d53c46a lnurlw: follow-up: fix android edge-to-edge layout padding
as per https://github.com/spesmilo/electrum/pull/9993#issuecomment-3228252596
2025-10-03 02:11:43 +00:00
SomberNight
7d0ac64d06 Merge remote-tracking branch 'spesmilo/pr/9993': lnurl-withdraw
ref https://github.com/spesmilo/electrum/pull/9993
2025-10-02 23:34:40 +00:00
f321x
286fc4b86e lnworker: enforce creation of PaymentInfo for b11
Enforce that the information used to create a bolt11 invoice using
`get_bolt11_invoice()` is similar to the related instance of PaymentInfo
by requiring a PaymentInfo as argument for `get_bolt11_invoice()`.
This way the invoice cannot differ from the created PaymentInfo.
This allows to use the information in PaymentInfo for validation of
incoming htlcs more reliably.

To cover all required information for the creation of a b11 invoice the
PaymentInfo class has to be extended with a expiry and
min_final_cltv_expiry. This requires a db upgrade.
2025-09-30 09:54:35 +02:00
ghost43
de7612b3b1 Merge pull request #10216 from SomberNight/202509_adb_spv
adb: change API of util.TxMinedInfo: height() is now always SPV-ed
2025-09-24 13:50:14 +00:00
SomberNight
b944371ffd adb: change API of util.TxMinedInfo: height() is now always SPV-ed 2025-09-24 13:46:24 +00:00
Sander van Grieken
0fcd8f76fc qml: small gridlayout fix in BalanceDetails 2025-09-19 15:36:07 +02:00
SomberNight
e10cf30627 crash_reporter: flag reports where console was used in app_version
so we don't waste time on weird reports where the user modified
internals at runtime

ref
https://github.com/spesmilo/electrum/issues/10217
https://github.com/spesmilo/electrum/issues/10218
2025-09-11 17:01:52 +00:00
SomberNight
47f1a2d7a2 wallet.get_full_history: rm "include_fiat" arg, infer it from fx
ref https://github.com/spesmilo/electrum/pull/10209#discussion_r2334228490
2025-09-09 17:24:59 +00:00
ghost43
df45233c2f Merge pull request #10209 from f321x/fix_fiat_history_export
qt: add missing fiat values in csv/json history export
2025-09-09 16:56:21 +00:00
ghost43
b4a6de46f4 Merge pull request #10188 from f321x/capacity_warning_zero_amount
qt: receive dialog: also propose swaps for 0 amount invoices
2025-09-09 16:16:23 +00:00
ThomasV
61aeffd26f qt: add_to_coincontrol: assert that coins are in self._utxo_dict 2025-09-09 15:55:54 +02:00
ThomasV
64a08f4937 fix #10206: replace for loop with single operation (dicts are threadsafe) 2025-09-09 12:55:37 +02:00
f321x
55d8974c8f fix: Re-add fiat values to csv history export
Re-add fiat values to the csv history export as they were missing due to
a regression.
2025-09-08 09:58:19 +02:00
SomberNight
d01e6b8101 qt confirm_tx_dialog: fix wallet.get_candidates_for_batching
I don't understand what the "coins not used" comment meant here.
It was added in the change away from the old config.WALLET_BATCH_RBF option
(ab14c3e138).

The `coins` param *is used* in wallet.get_candidates_for_batching.
Without setting that, the returned set of candidates was restricted to
only base txs that had a large enough change output to cover *all* the newly added outputs.
Instead, it is desirable to allow adding new inputs.
2025-09-05 19:42:56 +00:00
SomberNight
75195b667a keystore: get_private_keys should not return None
closes https://github.com/spesmilo/electrum/issues/10200
2025-09-05 16:10:33 +00:00
f321x
e7bb75bc3e chore: replace calls to asyncio.iscoroutinefunction
Replace calls to deprecated asyncio.iscoroutinefunction with calls to
inspect.iscoroutinefunction to prevent the following deprecation
warnings from showing up if running with Python 3.14:
```
/home/user/code/electrum-fork/electrum/util.py:1225: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  assert asyncio.iscoroutinefunction(func), 'func needs to be a coroutine'
/home/user/code/electrum-fork/electrum/util.py:507: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  if asyncio.iscoroutinefunction(func):
/home/user/code/electrum-fork/electrum/util.py:1246: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  assert asyncio.iscoroutinefunction(func), 'func needs to be a coroutine'
/home/user/code/electrum-fork/electrum/lnpeer.py:272: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  assert asyncio.iscoroutinefunction(func), 'func needs to be a coroutine'
/home/user/code/electrum-fork/electrum/util.py:1225: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  assert asyncio.iscoroutinefunction(func), 'func needs to be a coroutine'
/home/user/code/electrum-fork/electrum/util.py:507: DeprecationWarning: 'asyncio.iscoroutinefunction' is deprecated and slated for removal in Python 3.16; use inspect.iscoroutinefunction() instead
  if asyncio.iscoroutinefunction(func):
```
2025-09-05 10:29:34 +02:00
f321x
45bdd6a827 swaps: add type hints to gui swap suggestion flow
Adds type more type hints and clearer variable names to the swap
suggestion flow.
2025-09-04 12:24:12 +02:00
f321x
3df1af8ee3 qt: SwapDialog: don't force amount on user
When a SwapDialog gets initiated with a recv_amount_sat through the
receive tab the Max Button and edits are disabled and the user is forced
to do a swap with the preset amount. Maybe the user wants to do a larger
swap?
2025-09-04 12:04:13 +02:00
SomberNight
c68deb25ff daemon: get_wallet: handle OSError for weiiird paths
I think _wallet_key_from_path should not raise.
This is probably the sane way to deal with this.
Though all this is assuming that os.path.realpath can be treated as consistent/stateless.

closes https://github.com/spesmilo/electrum/issues/10182
2025-09-03 14:14:22 +00:00
f321x
debb4da90d qml: android: add padding to report dialog in ExcDialog
Adds padding to the report content dialog in the QML ExceptionDialog if
required on android.
Followup https://github.com/spesmilo/electrum/pull/10178
2025-09-02 10:32:10 +02:00
SomberNight
c8a14cc2cc qml: add some type hints to qetxfinalizer 2025-09-01 17:09:38 +00:00
f321x
0263b5ecc1 qml: adapt exception dialog to edge-to-edge layout
Even though the exception dialog inherits from ElDialog the padding
didn't work as it overwrites the properties of the ElDialog. So the
padding has to be applied separately to the ExceptionDialog.
2025-08-28 10:17:32 +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
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
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
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
ghost43
e85a3f2d3f Merge pull request #10157 from SomberNight/202508_swap_sanity_check_costs
swaps: add sanity-check for total swap costs
2025-08-20 18:05:13 +00:00