Commit Graph

3474 Commits

Author SHA1 Message Date
Sander van Grieken
376d881154 qml: always initialize BtcField.textAsSats 2025-02-26 11:02:12 +01:00
ThomasV
a371102a4c update text gui for lightning invoices 2025-02-25 11:28:07 +01:00
Sander van Grieken
d005da1ea2 qml: remove display states in ReceiveDialog, add balance check for enabling Lightning receive option. 2025-02-25 11:28:07 +01:00
ThomasV
3d2531cb93 reintroduce separate request types for lightning and onchain
cmdline: add_request has a --lightning option
2025-02-25 11:27:32 +01:00
ThomasV
30901212d0 Merge pull request #9467 from accumulator/qml_input_output_color
qml: apply TxInput/TxOutput coloring for swap and billing addresses.
2025-02-24 12:54:33 +01:00
f321x
f475a71871 show flat fee in qml swap provider selection 2025-02-21 08:59:18 +01:00
SomberNight
a3fc43cc2d qml: remove dependency "Pillow" (and its transitive deps)
closes https://github.com/spesmilo/electrum/issues/9572
2025-02-20 18:53:08 +00:00
f321x
6f97b7b5f9 simplify submarine swap onchain fee model to single base fee 2025-02-20 16:51:48 +01:00
ThomasV
f9c427124d qml: fix follow-up 392c219913 2025-02-20 09:38:47 +01:00
ThomasV
392c219913 simplify history-related commands:
- reduce number of methods
 - use nametuples instead of dicts
 - only two types: OnchainHistoryItem and LightningHistoryItem
 - channel open/closes are groups
 - move capital gains into separate RPC
2025-02-19 11:40:21 +01:00
SomberNight
ae8bfdcb51 qt: main_window: (trivial) fix typo on statusbar
a whitespace was missing
2025-02-18 15:36:27 +00:00
SomberNight
2d8c26f211 qt swaps: fix _spend_max_reverse_swap: round down msats
Clicking "max" btn for a reverse swap was setting the text field to a too high value.

```
>>> wallet.lnworker.num_sats_can_send()
Decimal('1242647.947')
>>> util.format_satoshis_plain(Decimal('1242647.947'))
'0.01242648'
```
2025-02-14 14:33:51 +00:00
SomberNight
6749468866 swaps: add base class for transports. move "get_recent_offers" logic
the "get_recent_offers" logic is now shared between the GUIs
2025-02-14 14:10:24 +00:00
ThomasV
5600e79edd fix swaps-over-nostr qml:
- post-rebase fixes
 - await sm.is_initalized.wait() instead of waiting 1 second
 - fix max_amount computation if channel recv capacity is higher
   than the max: the value returned by get_send_amount was zero
 - fix indentation
2025-02-14 10:57:01 +01:00
Sander van Grieken
993a575b7f submarine_swaps: implement swaps-over-nostr for qml 2025-02-14 09:54:09 +01:00
ThomasV
b097150806 Merge pull request #9551 from f321x/swap_nostr_event_type
Change nostr swap event type, add PoW, rebroadcast events
2025-02-12 10:31:54 +01:00
f321x
947094c1b0 add pow, more default relays, new event type 2025-02-11 18:16:15 +01:00
SomberNight
72c664856d qt gui: qrcodewidget: default size smaller for large codes
and use default sizing when displaying PSBTs.

Prior to this, when displaying a large PSBT (that should still fit within a QR),
the default window size was too small, and the user had to manually resize the window.
2025-02-10 18:32:09 +00:00
accumulator
9cca92d837 Merge pull request #9523 from accumulator/qt_expired_invoice
qt: show warning on expired invoice on send tab.
2025-02-10 11:43:27 +01:00
Sander van Grieken
9b520d31ab qt: fix defer eval of maybe_master_pubkey in case of electrum seed with seed extension 2025-02-10 11:28:41 +01:00
Sander van Grieken
c2456892b4 qt: show warning on expired invoice on send tab.
Also disables Save button when invoice has expired.
2025-02-10 10:36:28 +01:00
Sander van Grieken
0debe6675a qt: whitespace, imports 2025-02-04 11:13:37 +01:00
ghost43
1cdb61d966 Merge pull request #9476 from accumulator/qml_calc_max_amount
qml: calculate max amount when max toggle is enabled
2025-02-03 13:37:07 +00:00
Sander van Grieken
605b511b43 qt,qml: move get_text_not_enough_funds_mentioning_frozen and get_frozen_balance_str to backend wallet
Note: the qt gui used to include FX in get_frozen_balance_str, but that is not replicated now.
2025-01-31 18:03:21 +01:00
Sander van Grieken
25173b465f qml: network: show chain tips if > 1 2025-01-24 15:32:16 +01:00
Sander van Grieken
6a4b398209 qml: fix mixup help texts in ConfirmTxDialog, and take descriptions from config 2025-01-23 16:14:19 +01:00
Sander van Grieken
37f0069f2a qml: calculate max amount when max toggle is enabled 2025-01-23 16:00:01 +01:00
Sander van Grieken
01fcd2ee9a qml: remove .desktop suffix for QGuiApplication.setDesktopFileName 2025-01-23 15:34:40 +01:00
Sander van Grieken
19cd408f98 organize import, whitespace 2025-01-23 12:58:28 +01:00
Josh Geden
6331448860 qml: add config setting for max brightness on qr display 2025-01-22 09:47:10 +01:00
Sander van Grieken
bb66b567e0 qml: apply TxInput/TxOutput coloring for swap and billing addresses. 2025-01-21 17:11:58 +01:00
f321x
18d3d26b8d handle swap exception more gracefully
remove redundant Nne

handle reverse swap exception more gracefully

change reverse swap error

handle reverse swap exception more gracefully
2025-01-20 17:49:53 +01:00
SomberNight
f949c04cd2 gui/qt/history_list: (trivial) follow-up qt6 migration
ref https://github.com/spesmilo/electrum/pull/9189

```
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/gui/qt/my_treeview.py", line 166, in on_commitData
    self.tv.on_edited(idx, edit_key=edit_key, text=new_text)
  File "/home/user/wspace/electrum/electrum/gui/qt/history_list.py", line 699, in on_edited
    self.hm.update_fiat(index)
  File "/home/user/wspace/electrum/electrum/gui/qt/history_list.py", line 371, in update_fiat
    self.dataChanged.emit(idx, idx, [Qt.ItemDataRole.DisplayRole, Qt.ForegroundRole])
AttributeError: type object 'Qt' has no attribute 'ForegroundRole'
```
2025-01-17 15:25:19 +00:00
Sander van Grieken
19a4b149d3 qml: show proper Payment failed message when reason is empty (e.g. from previous session)
also capitalisation consistency.
2025-01-17 13:02:28 +01:00
Sander van Grieken
010b153ab2 qml: fix regression caused by ee42e09387
in qml, we need the password in-memory as the auth wrapper (@auth_protect) does not
pass the password to the wrapped fn.
2025-01-17 12:16:46 +01:00
Sander van Grieken
8ce7519558 qml: wordwrap channel type 2025-01-16 15:46:39 +01:00
ThomasV
0efe7e9bc8 swaps: make the zeroconf option non-persisted
Since we allow swaps with random servers, we should not persist that setting.
2025-01-10 16:19:01 +01:00
SomberNight
c43a691eee qt gui: qrreader: lower strong_count in qtmultimedia based reader
The qtmultimedia-based qrreader has the concept of "strong_count":
before the scanner returns a decoded qr code result, it waits until
it has seen at least "strong_count" (e.g. 10) frames in which the qr code was seen and successfully decoded.
I think the idea might have been to reduce false positives, mis-decoding qr codes from bad frames.
However in practice it makes scanning even moderately sized qr codes really difficult for the user:
it takes several seconds (at least on my laptop cam) to obtain enough "clear" frames that count into the strong_count.

So I am lowering the strong_count to 2, down from CAMERA_FPS/3,
which makes it easier to scan, and I still haven't seen false positives even with this value.
2025-01-10 12:59:56 +00:00
ghost43
2547ac4e30 Merge pull request #9412 from f321x/plugin_hash
Add filehash of external plugins to PluginDialog
2025-01-09 17:54:24 +00:00
f321x
ea10c7cfc1 add filehash of external plugins to PluginDialog
remove hashlib import

add filehash of external plugins to PluginDialog

add emptyline

add filehash of external plugins to PluginDialog
2025-01-09 18:15:12 +01:00
SomberNight
30028520e0 qml/qeinvoice.py: show error details when scanning e.g. lnurl-withdraw
saying the lnurl type is not supported is more informative than "could not resolve"
2025-01-09 16:10:46 +00:00
SomberNight
264a5fe421 qt gui: add command for console use: "scan_qr()"
try
```
>>> scan_qr().data
```
to read a qr code from the screen
2025-01-09 12:18:10 +00:00
ThomasV
c4443b841f Merge pull request #9410 from f321x/fix_user_cancelled_swap
Catch UserCancelled exception in main window on user swap cancellation
2025-01-09 11:15:08 +01:00
f321x
c4fe8433c0 catch UserCancelled exception in main window 2025-01-09 11:12:30 +01:00
ThomasV
d2fa65b9aa fix qt wizard (follow-up 693210edbe) 2025-01-06 11:46:20 +01:00
ThomasV
4d9c33c33f Qt: disable swapserver dialog if we are using http 2025-01-03 10:39:24 +01:00
ThomasV
29a8c41025 move watchtower to a plugin.
remove watchtower dialog in qt
2024-12-20 15:34:26 +01:00
ThomasV
7113cec4c7 minor fix, follow-up ee42e09387 2024-12-20 15:33:47 +01:00
ThomasV
ee42e09387 anchor channels: unlock wallet on startup if the wallet has channels 2024-12-20 10:10:07 +01:00
ThomasV
693210edbe Qt: stop support for password-protected wallets without
storage encryption.

The password will be needed on startup with anchor channels.

Note that it remains possible to use non-encrypted storage
and keystore encryption with the command line.
2024-12-20 09:24:45 +01:00