Commit graph

52 commits

Author SHA1 Message Date
SomberNight
111ef9ebb1
follow-up fixes to storage-db separation
e1ce3aace7
2020-02-13 20:00:12 +01:00
SomberNight
d2f132738a
wallet: only select mature coins by default
this is a regression from #5721

Removed the `TxInput.is_coinbase` method as I think it is a confusing API,
instead we now have `TxInput.is_coinbase_input` and `TxInput.is_coinbase_output`.

related #5872
2020-01-02 00:43:49 +01:00
ThomasV
2c6a1f55fb
Merge pull request #5825 from SomberNight/201912_local_tx_can_be_partial
wallet: allow saving partial tx as local (if it has a txid)
2019-12-15 16:40:46 +01:00
SomberNight
3a2fe80675
qt: also use BlockWaitingDialog in PreviewTxDialog
as when 'advanced_preview' is set, ConfirmTxDialog is skipped

follow-up 1088cf4444
2019-12-12 21:39:46 +01:00
SomberNight
dbd1c8cf71
qt TxDialog: visibility of widgets should be set after parenting
widget.show() and widget.setVisible(True) results in a blink of an ephemeral window containing the widget;
that is, unless the widget has a parent explicitly set or it can be determined via which layout the widget is placed in.
2019-12-12 21:31:30 +01:00
SomberNight
30dcab0877
wallet: allow saving partial txns as local (but require txid) 2019-12-08 04:32:44 +01:00
SomberNight
8dbbc21aff
wallet: better (outgoing) invoice "paid" detection
- no more passing around "invoice" in GUIs, invoice "paid" detection is now handled by wallet logic
- a tx can now pay for multiple invoices
- an invoice can now be paid by multiple txs (through partial payments)
- new data structure in storage: prevouts_by_scripthash
  - type: scripthash -> set of (outpoint, value)
  - also, storage upgrade to build this for existing wallets
2019-11-29 15:06:16 +01:00
SomberNight
6f246a83b3
qt coin selection: allow selecting an empty set
Using this, the user can force "bump fee" not to add new inputs.

closes #5719
2019-11-21 17:46:00 +01:00
SomberNight
1526bc9ccf
qt: consistently show tooltip when copying to clipboard 2019-11-21 03:01:55 +01:00
SomberNight
d1c262def0
qt tx dialog: small clean-up in constructors 2019-11-19 22:17:52 +01:00
SomberNight
710e9621b5
qt tx dialog: allow blanking feerate
Previously it was impossible to rm the last character in feerate_edit.
e.g. if you held down "backspace", we would keep refilling the field as soon
as it became empty.
2019-11-19 20:13:16 +01:00
SomberNight
13b858ab26
qt tx dialog: disable "Finalize" btn if tx is None
e.g. NotEnoughFunds due to too high fee
2019-11-19 19:35:57 +01:00
SomberNight
66ddedb97e
qt tx dialog: small fee edit fix
scenario: enter extremely high feerate (which we cannot satisfy) then click into fee_edit.
At that moment, fee_edit is empty and both feerate_edit and fee_edit are considered frozen.
As fee_edit has priority, we would construct a tx with default fee.
Now, instead, we won't construct this default fee tx ~as if the click to fee_edit did not happen.
2019-11-19 19:29:10 +01:00
SomberNight
8bd27851a4
qt tx dialog: only allow "save as local" for complete txns 2019-11-19 18:41:44 +01:00
SomberNight
aa3d817ef2
qt: clean-up imports 2019-11-18 20:56:49 +01:00
ThomasV
e74f7e7b42 fix #5764 2019-11-17 13:48:19 +01:00
ThomasV
78813dcb7d Pass make_tx function to ConfirmTxDialog
- allow 'spend max' when opening a channel (fixes #5698)
 - display amount minus fee when 'max' buttons are pressed
 - estimate fee of channel funding using a template with dummy address
2019-11-14 10:20:19 +01:00
SomberNight
0c0a6b2145
TxDialog: fix hooks. only show psbt widgets when applicable.
users of 'transaction_dialog' were assuming that dialog.tx is already set
2019-11-12 23:05:01 +01:00
SomberNight
05c496edd1
PreviewTxDialog: small UI changes 2019-11-12 23:04:57 +01:00
SomberNight
74790c16f9
PreviewTxDialog: fix RBF checkbox 2019-11-12 23:04:50 +01:00
SomberNight
e7efc3657b
fix Qt tx dialog randomly disappearing (due to gc) 2019-11-12 23:04:47 +01:00
ThomasV
dd6cb2caf7 GUI: Separate output selection and transaction finalization.
- Output selection belongs in the Send tab.
 - Tx finalization is performed in a confirmation dialog
   (ConfirmTxDialog or PreviewTxDialog)
 - the fee slider is shown in the confirmation dialog
 - coin control works by selecting items in the coins tab
 - user can save invoices and pay them later
 - ConfirmTxDialog is used when opening channels and sweeping keys
2019-11-12 14:42:06 +01:00
SomberNight
365aa189f2
qt FileDialogs for transactions: better file extension filter 2019-11-08 15:22:11 +01:00
SomberNight
aa518c0ea5
psbt: allow insecure signing of legacy UTXOs without full previous tx
When "importing" a psbt, we accept witness utxos even for legacy inputs
(warning shown to user in gui).
When "exporting" a psbt, we follow the spec; except when exporting as a QR code,
in which case we include witness utxos for all inputs.
This makes QR codes for psbts with legacy inputs feasible, just like they
were before, with our custom tx serialization format (with the same risk,
of burning coins as miner fees).
2019-11-07 02:40:10 +01:00
SomberNight
c8c1ea9c86
qt tx dialog: add export options for coinjoins and for coldcard 2019-11-04 22:25:06 +01:00
SomberNight
d872be7f6b
psbt: don't put xpubs and full paths into tx by def; only while signing 2019-11-04 22:25:02 +01:00
SomberNight
7eb7eb8674
add support for manual coinjoins 2019-11-04 22:24:55 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
ghost43
6d12ebabbb
qt tx dialog: show dropdown for "export", instead of separate buttons (#5739) 2019-11-04 16:24:55 +00:00
ThomasV
5c1340b7bd pass both invoice and description to show_transaction 2019-10-24 17:27:14 +02:00
SomberNight
bd83ca0286
qt: (trivial) some type hints 2019-09-18 02:10:53 +02:00
SomberNight
f60f690ca9
change many str(e) to repr(e) as some exceptions were cryptic
it's often valuable to see the type of the exception
(especially as for some exceptions str(e) == '')
2019-07-17 20:12:52 +02:00
SomberNight
c776af41f6
qt: allow QR codes to store a bit more data
by decreasing error correction (about ~26% larger max payload)
2019-05-26 02:13:02 +02:00
SomberNight
d3f65e24e1
kivy: warn user during "Send" if high fee (change condition)
Specifically, warning was previously triggered if fee > 1 mBTC;
now it is unified with Qt, warning is triggered if feerate > 600 sat/byte.
2019-05-17 20:10:10 +02:00
SomberNight
3385a94753
logging: basics 2019-05-02 15:19:03 +02:00
SomberNight
28d70963ec
qt txdialog: word-wrap blockhash 2019-05-02 12:05:27 +02:00
SomberNight
19d7784616
qt tx dialog: show block height and block hash 2019-04-29 02:48:40 +02:00
SomberNight
205c437d9a
wallet: get_tx_info now returns NamedTuple instead of abomination 2019-04-29 02:32:15 +02:00
SomberNight
271d1a3f1d
qt tx dialog: two columns for tx stats
also show "RBF", and fix "date"
2019-04-29 01:19:06 +02:00
SomberNight
026448837f
no more "import *"
fixes #5101
fixes #5105
2019-02-11 20:21:24 +01:00
SomberNight
d6986347e6
qt icons: update remaining QIcon() constructors
follow-up #5053
2019-02-05 00:59:09 +01:00
SomberNight
16bac5fd73
rm qt icons file
so we don't need pyrcc5, which is not deterministic,
and so we don't need the submodule for the icons

based on electrumsv/electrumsv@bf8802c2ea
2019-02-01 20:15:28 +01:00
SomberNight
ea235a1468
qt dark theme: use correct QR code icon (light/dark) 2018-12-03 17:51:05 +01:00
ThomasV
2b8d801b36 if possible, batch new transaction with existing rbf transaction 2018-11-09 16:33:29 +01:00
SomberNight
f53b480f1c
wallet: more powerful add_input_info
tangentially related: #4814

also recognise that input is_mine if tx was not fully parsed
but we have the prevout UTXO
2018-10-29 21:34:44 +01:00
Mark B Lundeberg
508793b010
qt transaction_dialog: normal close if user presses Esc
(Electron-Cash/Electron-Cash#890)
2018-10-09 01:14:33 +02:00
SomberNight
4d43d12abf
transaction: don't convert p2pk to p2pkh address when displaying
also closes #4742
2018-10-01 04:58:26 +02:00
SomberNight
12e79ecd60
qt tx dialog: make input/output fields expand
based on Electron-Cash/Electron-Cash@169c137211
2018-09-27 21:44:18 +02:00
SomberNight
33d14e4238
some import clean-up in qt 2018-09-25 18:15:28 +02:00
SomberNight
4284f4feb3
fix #4575 2018-07-21 23:09:46 +02:00