1
0
Commit Graph

65 Commits

Author SHA1 Message Date
Sander van Grieken
9a7ca74992 qml: qetxdetails: update mempool depth on fee histogram 2025-08-12 12:35:16 +02:00
SomberNight
e658fa4e04 qml: QETxFinalizer: handle txid being None
fixes https://github.com/spesmilo/electrum/issues/10042
2025-07-18 01:11:19 +00:00
Sander van Grieken
0a6f6ab006 qml: use color for accounting addresses 2025-06-06 13:38:48 +02:00
Sander van Grieken
c89398cd5b qml: handle callbacks via ui thread. 2025-05-16 09:49:41 +02:00
Sander van Grieken
a9213c4d66 psbt_nostr: send label along with PSBT 2025-05-14 12:49:33 +02:00
Sander van Grieken
f16efd759a qml: detect transaction removed (e.g. replace-by-fee) for qetxdetails and qetxfinalizer,
don't close active feebump/cancel dialogs, but invalidate them,
don't close TxDetails page, but show removed status,
show broadcast-failed status in TxDetails
2025-03-21 17:36:17 +01:00
ThomasV
840243e029 separate fee policy from config
- Wallet.make_unsigned_transaction takes a FeePolicy parameter
 - fee sliders act on a FeePolicy instead of config
 - different fee policies may be used for different purposes
 - do not detect dust outputs in lnsweep, delegate that to lnwatcher
2025-03-05 10:29:26 +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
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
Sander van Grieken
bb66b567e0 qml: apply TxInput/TxOutput coloring for swap and billing addresses. 2025-01-21 17:11:58 +01:00
Sander van Grieken
c6cd47ebba qml: refactor QEWallet.sign() to sign() and sign_and_broadcast(), add user feedback when signing fails. 2024-10-23 12:02:01 +02:00
SomberNight
87dd74d45c qml: QETxDetails: defer to wallet.get_tx_info() for rbf/cpfp
It might make sense to allow bump_fee on a local tx, and so wallet.get_tx_info() allows it.
For dscancel/cpfp, it does not allow it either. Still, I think this logic should be encapsulated in the wallet.
2024-02-15 16:40:55 +00:00
Sander van Grieken
4228911609 qml: close TxDetails on TX remove only after the 'removed_transaction' event has been received, so the
history model doesn't refresh too early (fixes #8782)
2024-02-05 21:07:33 +01:00
SomberNight
248e50eed0 transaction: rename tx.is_final to tx.is_rbf_enabled, and invert it 2024-01-17 02:08:15 +00:00
Sander van Grieken
65210d03ac qml: log txid when assertion fails in qetxdetails.py 2024-01-09 12:57:26 +01:00
Sander van Grieken
313b79cfaf qml: add txid not empty assert to removeLocalTx. ref #8775 2024-01-04 13:08:17 +01:00
Sander van Grieken
7164392b1c qml: add transaction inputs in TxDetails and ConfirmTxDialog, RbfBumpFeeDialog, RbfCancelDialog, CpfpBumpFeeDialog
and allow collapse/expand of input/output lists by clicking on label.
2023-12-29 11:55:36 +01:00
SomberNight
2bc056ed33 wallet: refactor check_sighash/risk_of_burning_coins_as_fees
- risk_of_burning_coins_as_fees is turned into a private (helper) method, only called by check_sighash.
  UIs should only care about check_sighash.
- check_sighash returns instance of new class "TxSighashDanger" instead of tuple
- made warning levels more fine-grained (FEE_WARNING_SKIPCONFIRM vs FEE_WARNING_NEEDCONFIRM)
- this became more complicated than I had hoped for but I think it is worth it to ~merge
  check_sighash and risk_of_burning_coins_as_fees into one.

related https://github.com/spesmilo/electrum/pull/8699
2023-12-13 04:52:01 +00: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
Sander van Grieken
7b96a83350 wallet: add sighash check to class Abstract_Wallet
qml: use backend sighash check and add user confirmation path
qt: use backend sighash check and add user confirmation path
qml: include get_warning_for_risk_of_burning_coins_as_fees test in txdetails
qt: add warning icon to sighash warning
add sighash and fee checks to wallet.sign_transaction, making all warnings fatal unless ignore_warnings is set to True
tests: test sign_transaction on both code paths with ignore_warnings True and False,
raise specific exceptions TransactionPotentiallyDangerousException and TransactionDangerousException
2023-11-30 12:53:46 +01:00
Sander van Grieken
d1d4e19554 qml: txdetails: add lockDelay property when height is TX_HEIGHT_FUTURE and add mempool depth for height TX_HEIGHT_UNCONF_PARENT 2023-11-10 17:03:56 +01:00
Sander van Grieken
6270eae5c9 qml: port PyQt5 to PyQt6 2023-11-07 10:16:18 +01:00
ThomasV
83ff192bf5 follow-up 190c19d48c 2023-09-22 17:50:46 +02:00
Sander van Grieken
190c19d48c whitespace, imports, code style 2023-09-22 16:38:37 +02:00
ThomasV
6cd42faa68 QML: show onchain and offchain amounts for groups in txdetails 2023-09-16 15:42:16 +02:00
Sander van Grieken
3115ce2f53 qml: show historic fiat amounts when enabled and applicable 2023-05-15 11:38:43 +02:00
Sander van Grieken
9d11aae394 qml: take internal, external, billing address colors from desktop client and color output addresses
accordingly in ConfirmTxDialog, TxDetails, CpfpBumpFeeDialog, RbfBumpFeeDialog and RbfCancelDialog
2023-05-04 13:26:56 +02:00
Sander van Grieken
325a1bbba6 followup ae12d236b2 2023-05-04 01:17:29 +02:00
Sander van Grieken
ae12d236b2 qml: fix broadcastFailed signal connections in txdetails (fixes #8384) 2023-05-04 01:15:25 +02:00
Sander van Grieken
e26d49f11e qml: consistency camelcase public slots qetxdetails, qelnpaymentdetails, qechannelopener, qeaddressdetails 2023-04-25 13:46:30 +02:00
SomberNight
312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
SomberNight
75a9a4fce9 qml TxDetails: txid must be updated after rawtx is changed
refresh bug when using bump_fee/dscancel/etc
2023-04-21 17:39:11 +00:00
Sander van Grieken
b9ec04f13a qml: make txdetails less reliant on txid 2023-04-21 13:20:19 +02:00
Sander van Grieken
1aa14e749a qml: first part of partially signing tx while not having txid yet 2023-04-21 00:10:15 +02:00
SomberNight
ca40b37ec5 qml: show "tx fee rate" in TxDetails, like in other guis 2023-04-18 12:59:09 +00:00
ThomasV
84cb210e7e qml TxDetails: do not show rbf buttons if the tx is local 2023-04-01 17:11:15 +02:00
ThomasV
f396d15146 qml: (clarity) use separate slots for sign and sign_and_broadcast. 2023-04-01 12:03:50 +02:00
Sander van Grieken
e476e60247 qml: add note regarding validity of qetxdetails instance and reset tx/txid members 2023-03-31 12:47:43 +02:00
Sander van Grieken
d99a220c66 qml: add new 'removed_transaction' callback in wallet.py, hook up callback in qewallet and
emit balanceChanged events for add_transaction and remove_transaction
2023-03-31 12:32:02 +02:00
Sander van Grieken
df44a5c361 qml: port over 'show_qr to warn if QR code is missing data' 2023-03-31 10:50:11 +02:00
SomberNight
0a3e286f1d qt tx dialog: show_qr to warn if QR code is missing data
When exporting a tx as qr code, the prev txs are omitted to save space.
This causes problems with offline signers: software electrum signers will
just warn and then proceed, but hw devices will typically error.
2023-03-30 14:32:31 +00:00
Sander van Grieken
c08ca94591 qml: support create & save transaction on watch-only wallet, refactor showExport and supply
relevant help text when sharing a transaction
2023-03-30 12:28:09 +02:00
Sander van Grieken
2cbb16ae4b qml: move save_tx to qewallet 2023-03-30 10:41:01 +02:00
SomberNight
8c1fe10f54 qml TxDetails: show short_id instead of block height and txpos
The "TX index" (txpos) item I think was confusing.
2023-03-23 16:57:16 +00:00
SomberNight
d83863cc52 qt tx dialog: add checkbox "Download input data"
If checked, we download prev (parent) txs from the network, asynchronously.
This allows calculating the fee and showing "input addresses".

We could also SPV-verify the tx, to fill in missing tx_mined_status
(block height, blockhash, timestamp, short ids), but this is not done currently.
Note that there is no clean way to do this with electrum protocol 1.4:
`blockchain.transaction.get_merkle(tx_hash, height)` requires knowledge of the block height.

Loosely based on 6112fe0e51
2023-03-12 00:24:31 +00:00
SomberNight
81772faf6c wallet: add_input_info to no longer do network requests
- wallet.add_input_info() previously had a fallback to download parent
  prev txs from the network (after a lookup in wallet.db failed).
  wallet.add_input_info() is not async, so the network request cannot
  be done cleanly there and was really just a hack.
- tx.add_info_from_wallet() calls wallet.add_input_info() on each txin,
  in which case these network requests were done sequentially, not concurrently
- the network part of wallet.add_input_info() is now split out into new method:
  txin.add_info_from_network()
- in addition to tx.add_info_from_wallet(), there is now also tx.add_info_from_network()
  - callers of old tx.add_info_from_wallet() should now called either
    - tx.add_info_from_wallet(), then tx.add_info_from_network(), preferably in that order
    - tx.add_info_from_wallet() alone is sufficient if the tx is complete,
      or typically when not in a signing context
- callers of wallet.bump_fee and wallet.dscancel are now expected to have already
  called tx.add_info_from_network(), as it cannot be done in a non-async context
  (but for the common case of all-inputs-are-ismine, bump_fee/dscancel should work regardless)
- PartialTxInput.utxo was moved to the baseclass, TxInput.utxo
2023-03-12 00:21:57 +00:00
Sander van Grieken
15a3c2d344 qml: auto sign & broadcast fee bump transactions if wallet can sign without cosigners.
Show a dialog otherwise
2023-03-10 13:31:41 +01:00
Sander van Grieken
b9b0ada15d qml: better fix 2023-02-07 00:21:21 +01:00
Sander van Grieken
ad26d809a4 qml: update history in more cases when saving/removing tx 2023-02-06 22:49:03 +01:00
Sander van Grieken
0bc8460005 qml: don't initialize instance variables on class scope for non-singletons
(this somehow escaped attention before, as most objects usually don't have multiple instances,
unless multiple wallets are open at the same time.)
Also, move all signal declarations, class constants and variables to the top of class definitions.
2023-01-12 13:09:21 +01:00