Commit Graph

92 Commits

Author SHA1 Message Date
Sander van Grieken 48916f56bc qt: perform 'fully spend' action with coin selection, keep separate from coin control when doing action.
Also stop timer when dialog is finished, to avoid re-generating txs with the same input coin set, which
results in an exception as these coins have signatures when the swap has started.
2026-03-03 18:46:03 +01:00
ghost43 0cb4e89aee Merge pull request #10503 from accumulator/qt_coins_fully_spend_menu
qt: utxo_list: only enable 'fully spend...' menu if there are unfrozen coins in the selection.
2026-03-03 17:37:58 +00:00
SomberNight 4c27b8de8d qt: utxo_list: add asserts to helper methods that coins are selected
- otherwise they default to selecting all coins, which is unlikely to be what the user intends
- prev commit makes sure this should never happen
2026-03-03 17:29:22 +00:00
f321x 423cc678c8 qt: MyTreeView: close menu if its context changes
Stores the currently open (right-click) menu in MyTreeView
and adds a `close_menu()` method so inheritants can cleanly
close the menu again if the context it was opened upon has changed.

This is utilized by `AddressList` and `UTXOList` to close the menu
if a call to `update()` has chenged the address list in some way or
removed a utxo from the list to prevent the user from trying to use
a utxo that doesn't exist anymore.

Fixes #10464
2026-03-03 17:28:57 +01:00
Sander van Grieken f3ba25df7d qt: utxo_list: only enable 'fully spend...' menu if there are unfrozen coins in the selection.
otherwise, when selecting only frozen coins, the set of usable coins is empty, and the menu options
will instead fall back to using ALL coins without informing the user.
2026-03-02 18:04:08 +01:00
ThomasV cfe2a57f2c add plugin hook to utxo list menu 2026-01-24 11:17:47 +01: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 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 17a9a91e1f announce actual available liquidity as swap provider 2025-04-04 15:06:50 +02:00
SomberNight fddd4275aa qt: move "FREEZE_REUSED_ADDRESS_UTXOS" option to utxo_list toolbar
ref https://github.com/spesmilo/electrum/pull/9636
2025-03-14 16:16:55 +00:00
Sander van Grieken 19cd408f98 organize import, whitespace 2025-01-23 12:58:28 +01:00
ThomasV 692a777da8 coins tab: if we do not know whether we can swap a utxo, assume we can 2024-12-17 17:43:43 +01:00
SomberNight cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
SomberNight 43a5d03426 qt: coins tab: also define sort order for coins mined in same block
follow-up 0f55a1e309
2024-01-19 14:34:33 +00:00
SomberNight 9fd16cd677 follow-up prev 2024-01-19 13:19:44 +00:00
SomberNight 0f55a1e309 qt: coins tab: properly sort unconfirmed/local utxos to top 2024-01-19 13:12:36 +00:00
SomberNight affe3630b0 qt: addr/coins tab: show tooltip for "freeze address"
related https://github.com/spesmilo/electrum/issues/8698
2023-11-24 19:31:36 +00:00
Sander van Grieken e4f9cfb1cc qt: clipboard might have been changed after show menu. add check. fixes #6526 2023-10-06 11:13:16 +02:00
ThomasV 40f2087ac3 Add option for support_large_channels.
max_funding_sats is a config variable and defaults to the old value.
2023-08-09 16:36:12 +02:00
SomberNight 23f2412da7 qt: follow-up "rm thousand sep when copying numbers to clipboard"
follow-up https://github.com/spesmilo/electrum/pull/8479
2023-06-13 15:59:18 +00:00
ThomasV 6d392a67f9 wallet.get_tx_parents: populate cache regardless of self.is_up_to_date()
Fixes #8315
2023-05-02 09:11:21 +02:00
SomberNight ad5f95cb87 util.profiler: add "min_threshold" arg 2023-04-26 14:49:37 +00:00
ThomasV a753f34c09 Qt: rename utxo menu action to 'privacy analysis' 2023-04-01 12:47:30 +02:00
ThomasV 206bacbcb3 move MyTreeView and related classes to own submodule 2023-03-15 14:25:42 +01:00
ThomasV b431d39a8e Qt lists: consistently show Details as first item in the contextual menu 2023-03-15 11:18:19 +01:00
ThomasV 0bda808b29 Qt lists: always show item detail on double click
No longer enter edit mode for editable columns.
(that behaviour was difficult to learn, because
it is not explicit which columns are editable)
2023-03-15 10:35:44 +01:00
SomberNight 9d64fe7046 qt: MyTreeView: disambiguate "parent" and "main_window" 2023-03-13 17:29:29 +00:00
SomberNight dd27c6beff qt utxo list: copy menu: separate items for short/long outpoint 2023-03-13 16:41:10 +00:00
SomberNight d3c241db4c qt: MyTreeView: use enum.auto() in Columns enum 2023-03-13 16:12:50 +00:00
SomberNight 638c896b11 qt: MyTreeView: make item labels independent of column order 2023-03-13 15:54:52 +00:00
ThomasV 2571eeeecd coins tab: add toolbar. 2023-03-13 15:35:35 +01:00
ThomasV 303ad02d17 privacy analysis: add warning about tx downstream of address reuse 2023-03-13 11:41:36 +01:00
ThomasV f89a466d61 minor fix 2023-03-10 18:02:47 +01:00
ThomasV e4273e5ab9 utxo privacy analysis:
- add a new event, 'adb_removed_tx'
 - new wallet method: get_tx_parents
 - number of parents is shown in coins tab
 - detailed list of parents is shown in dialog
2023-02-25 11:46:47 +01:00
ThomasV 4a91213044 minor fix 2023-02-12 13:28:19 +01:00
ThomasV d766f2fd9e Qt: make copy menus more consistent 2023-02-12 11:13:03 +01:00
ThomasV df842af0b6 UTXO tab: add menus to fully spend utxo:
- send to address
 - in new channel
 - in submarine swap

This is easier than coin control, because it does not involve
switching tabs. Coin control is activated during the operation,
so that users learn how it works.
2023-02-11 10:49:33 +01:00
ThomasV d1eb909bee UTXO tab: simplify freeze menus 2023-02-10 10:35:13 +01:00
ThomasV d6febb5c12 Display mined tx outputs as ShortIDs instead of full transaction outpoints.
ShortIDs were originally designed for lightning channels, and are now
understood by some block explorers.

This allows to remove one column in the UTXO tab (height is redundant).

In the transaction dialog, the space saving ensures that all inputs fit
into one line (it was not the case previously with p2wsh addresses).
For clarity and consistency, the ShortID is displayed for both inputs
and outputs in the transaction dialog.
2023-01-26 10:48:28 +01:00
ThomasV 599ac065fb Qt: unify calls to get_transaction (follow-up 121d8732f1) 2023-01-25 15:55:26 +01:00
ThomasV 9f33cecede qt coins tab: sotz by height 2023-01-18 20:12:05 +01:00
Platon Pronko eed48a8508 fix adding coins to coincontrol from address list 2023-01-18 13:38:27 +04:00
ThomasV a1716df115 follow-up 975cdca474 2023-01-06 13:18:27 +01:00
ThomasV 975cdca474 Qt coin control: allow to add/remove coins one by one.
Not many users know how to select multiple coins at once.
2023-01-06 11:45:14 +01:00
SomberNight 7b095158bf wallet: add get_label_for_address, and make get_label private
fixes https://github.com/spesmilo/electrum/issues/7919

In the past, when creating payment requests, we keyed them by on-chain address,
and set/saved the msg of the request as label for the address.
Many places in the code were calling wallet.get_label(addr) with the expectation that
relevant payment requests are found and their message/description (if any) is considered.

wallet.get_label(key) is now made private, and instead the explicit non-polymorphic
wallet.get_label_for_{address,rhash,txid} alternatives should be used.
2022-08-09 17:21:14 +02:00
SomberNight 0509109d61 qt.util.MyTreeView: handle find_row_by_key returning None
fixes https://github.com/spesmilo/electrum/issues/7780
fixes https://github.com/spesmilo/electrum/issues/7815

Re FIXME in main_window.py, in particular, adb might call `add_transaction` on the same tx multiple times.
In `wallet.on_event_adb_added_tx`, maybe we should propagate `notify_GUI` to `wallet._update_request_statuses_touched_by_tx`.

The issue being fixed here (above TARS reports) can be triggered in multiple ways, e.g.:
- have an already paid receive request, and receive a payment to the same address again
- have an already paid receive request, and *spend from* that address (in which case the history of the address will change, and address_synchronizer will call add_transaction again on the old tx that satisfied the old receive request)
2022-06-29 19:11:05 +02:00
SomberNight a0b7782e6d Qt addr/utxo lists: in dark theme, fix item bgcolor (was pure black)
regression from https://github.com/spesmilo/electrum/commit/e362d1aac4c326917592bcfe1f5d679f7649366a
2022-05-20 18:26:30 +02:00
ThomasV 7be7ea71db follow-up e992e3a9b2 2022-04-21 11:50:42 +02:00