Commit Graph

39 Commits

Author SHA1 Message Date
Sander van Grieken 482ec89b5d minor, code style, imports 2024-02-05 21:25:13 +01:00
Sander van Grieken 8ba7a00097 qml: update new labels in history and addresscoinlist 2023-12-12 16:36:12 +01:00
Sander van Grieken 6f9e86a1ac qml: fix wrong year near newyear in transaction list 2023-11-24 10:54:25 +01:00
Sander van Grieken 6270eae5c9 qml: port PyQt5 to PyQt6 2023-11-07 10:16:18 +01:00
Sander van Grieken 190c19d48c whitespace, imports, code style 2023-09-22 16:38:37 +02:00
ThomasV d03c77837f Let the GUI compute the balance displayed in history.
Since Qt groups swap transactions, the displayed balance
was sometimes incorrect.
2023-09-14 15:58:58 +02:00
Sander van Grieken f0bbbe9955 qml: consistency camelcase public slots listmodels 2023-04-25 13:22:34 +02:00
SomberNight ea864cd5c9 qml: TxListModel: don't rely on wallet.db.get_transaction() finding tx
tx might get removed from wallet after wallet.get_full_history() but before the model is populated

closes https://github.com/spesmilo/electrum/issues/8339
2023-04-23 16:00:42 +00:00
Sander van Grieken 7383cdc474 qml: don't crash when tx not found on histogram event. closes #8332 2023-04-22 11:40:36 +02:00
SomberNight 2de9ca24a2 qml history: update mempool depth for unconf txs on new histogram 2023-04-05 14:32:11 +00:00
SomberNight fcff4b7274 qml: begone, you C-style for loops
how am I going to continue in the middle of the loop body if the i+=1 is at the end? :P
2023-04-05 14:13:40 +00:00
SomberNight db4943ff86 wallet.get_full_history: more consistent sort order
before:
```
>>> [print(wallet.get_tx_status(txid, wallet.adb.get_tx_height(txid))) for txid in list(wallet.get_full_history())[-10:]]
(7, '2023-04-04 16:13')
(7, '2023-04-04 16:13')
(7, '2023-04-04 16:13')
(7, '2023-04-04 16:13')
(0, 'Unconfirmed [20. sat/b, 0.00 MB]')
(2, 'in 2 blocks')
(3, 'Local [180.4 sat/b]')
(3, 'Local [180.2 sat/b]')
(2, 'in 2016 blocks')
(0, 'Unconfirmed [180. sat/b, 0.00 MB]')
```

after:
```
>>> [print(wallet.get_tx_status(txid, wallet.adb.get_tx_height(txid))) for txid in list(wallet.get_full_history())[-10:]]
(7, '2023-04-04 16:13')
(7, '2023-04-04 16:13')
(7, '2023-04-04 16:13')
(7, '2023-04-04 16:13')
(0, 'Unconfirmed [20. sat/b, 0.00 MB]')
(0, 'Unconfirmed [180. sat/b, 0.00 MB]')
(2, 'in 2016 blocks')
(2, 'in 2 blocks')
(3, 'Local [180.4 sat/b]')
(3, 'Local [180.2 sat/b]')
```
2023-04-04 18:32:53 +00:00
SomberNight f8f0af4a2f qml: history: add some support for future txs
- they are now distinguished from local by the status text "in %d blocks"
- this status text needs updating occasionally: on new blocks,
  and some lnwatcher interactions, hence new event: "adb_set_future_tx"
2023-04-04 17:39:58 +00:00
ThomasV 503776c0de move fiat columns show/hide settings from settings_dialog to tab toolbars 2023-03-12 13:30:11 +01: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 7ea2a2a8ea qml: use dirty flag on qetransactionlistmodel 2023-02-03 11:35:23 +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
Sander van Grieken 6c410c0548 qml: make listmodel item count a property for channels and transactions 2023-01-06 10:58:47 +01:00
Sander van Grieken cccd5ff19b qml: add 'local' and 'mempool' sections to history, update section on on_tx_verified callback 2022-11-22 00:34:31 +01:00
Sander van Grieken b7c31ad80e qml: move tx verified event handling to transactionlistmodel,
refresh history after broadcast
2022-11-15 15:33:21 +01:00
SomberNight 01b5e3f8e0 flake8: enable more mandatory tests 2022-10-31 16:13:22 +00:00
Sander van Grieken dea30f96a1 qml: small fixes, cleanup 2022-08-24 12:38:25 +02:00
Sander van Grieken 46641e7874 qml: handle unsigned, local tx in history 2022-08-16 10:04:39 +02:00
Sander van Grieken 1c852328c0 qml: try-except around data query, history is very unpredictable what's present and what's not 2022-08-12 11:59:59 +02:00
Sander van Grieken db9e2ab311 delete channel 2022-07-07 18:29:21 +02:00
Sander van Grieken 02ccd46fd5 add numtx and address history model to addres details 2022-07-07 18:29:01 +02:00
Sander van Grieken 8f8a1fc8cf wip 2022-07-07 18:29:01 +02:00
Sander van Grieken 7ef52c6625 listmodels self-initialize,
lazy-load listmodels in QEWallet,
process channel updates in qechannellistmodel
2022-07-07 18:29:01 +02:00
Sander van Grieken d69ed7a204 initial channel list model and delegate 2022-07-07 18:29:01 +02:00
Sander van Grieken a6e72ae42f add initial Transaction Details page and backing qobject 2022-07-07 18:29:01 +02:00
Sander van Grieken e78a239bf5 bugfixes, lifecycle improvements 2022-07-07 18:29:01 +02:00
Sander van Grieken e1f53c4ea0 QEDaemon uses internal QEWalletDB for wallet open pre-checks
various other fixes
2022-07-07 18:29:01 +02:00
Sander van Grieken 52c1ed10dc add section dependent datetime formatting 2022-07-07 18:29:01 +02:00
Sander van Grieken 5031391484 add a QEAmount type for storing/passing BTC amounts in the widest sense
from a UI perspective. Stores sats, millisats (LN), whether MAX amount is
requested etc

some refactor QEInvoice type and Send page
2022-07-07 18:29:01 +02:00
Sander van Grieken e8ce221a34 Qt.UserRole can be 0 offset, don't repeat wallet create request dict 2022-07-07 18:29:01 +02:00
Sander van Grieken 5c7060fffb add (today, yesterday, last week, last month, older) sections to history 2022-07-07 18:29:01 +02:00
Sander van Grieken d88cd75460 keep all models and various UI items updated on new transactions 2022-07-07 18:29:01 +02:00
Sander van Grieken 7b71323506 cleanup 2022-07-07 18:28:00 +02:00
Sander van Grieken dec0cdd0d3 refactor QEAddressListModel and QETransactionListModel to their own files 2022-07-07 18:28:00 +02:00