Commit Graph

84 Commits

Author SHA1 Message Date
ThomasV 1a46a795a5 detect non-final transactions, and transactions with unconfirmed inputs 2016-05-29 19:53:04 +02:00
Neil Booth 467b0c0973 tx_dialog: make a deep copy of the tx
I've confirmed this
Fixes #1690
2016-02-28 19:10:09 +09:00
ThomasV 305843999e Relicensing 2016-02-24 10:20:30 +01:00
ThomasV cc526a8734 tx dialog: don't use tx.raw 2016-02-12 15:20:34 +01:00
Neil Booth c0295c767e tx_dialog: prompt if signed but not saved
I've lost a signed TX one too many times now
2016-01-25 19:26:02 +09:00
Neil Booth 38a8385287 Remove stale comment 2016-01-23 16:52:24 +09:00
Neil Booth f92843bb10 Top level window fix for tx_dialog and h/w wallets 2016-01-23 16:06:32 +09:00
ThomasV d200b236ae replace tx.input, tx.output by methods, so that deserialize calls are encapsulated 2016-01-17 15:04:11 +01:00
Neil Booth d9a84875dc Fix prior; keep tx dialog as top-level window 2016-01-17 13:41:09 +09:00
Neil Booth d9a13a5dd1 transaction_dialog: don't override base class
Rename parent to main_window.  Make the main window our parent.
2016-01-17 13:36:40 +09:00
Neil Booth 8f91af28a5 More cleanup of WaitingDialog
Simplify its interface
2015-12-26 11:18:32 +09:00
Neil Booth 6f4d4b9a1e Modality and centring fixes for QR codes 2015-12-23 18:42:01 +09:00
Neil Booth 9484b6371f More modality fixes and cleanups 2015-12-23 18:31:36 +09:00
ThomasV 9d3162b1a1 simplify get_label 2015-12-15 12:52:30 +01:00
Neil Booth 1524fa29af Raise dialog width slightly. 2015-12-12 18:20:49 +09:00
Neil Booth 34955bd0f5 Show value if available 2015-12-12 17:52:19 +09:00
Neil Booth f3a7d3f2bf Show amount of inputs too. 2015-12-12 09:41:31 +09:00
ThomasV dfb3d7b119 show number of inputs/outputs 2015-08-18 18:35:52 +02:00
ThomasV b40f3571e8 tx window: do not always set prompt_if_unsaved 2015-08-07 18:59:50 +02:00
Neil Booth 3fbd81f8ab Improved dialog centring
Password requests from the tx dialog box are now centred on the
tx dialog.  Similarly for error messages if misentering the password.
Also, "Signing transaction..." and "Broadcasting transaction..." are
centred on the appropriate tx dialog.
Finally restore the old "Sign" button enabling / disabling, as we
can now tell if the user cancelled the password request.
2015-07-13 21:32:50 +09:00
ThomasV d3104a17b7 Revert "Improved dialog centring"
This reverts commit d41dfa394b.
2015-07-05 20:37:57 +02:00
ThomasV 383f8924d7 revert txdialog to QDialog 2015-07-05 16:55:18 +02:00
ThomasV 5c2235e54b make tx.deserialize preserve existing inputs 2015-07-04 17:33:18 +02:00
Neil Booth d41dfa394b Improved dialog centring
Password requests from the tx dialog box are now centred on the
tx dialog.  Similarly for error messages if misentering the password.
Also, "Signing transaction..." and "Broadcasting transaction..." are
centred on the appropriate tx dialog.
Finally restore the old "Sign" button enabling / disabling, as we
can now tell if the user cancelled the password request.
2015-07-04 18:25:44 +09:00
Neil Booth 15632adb40 Rename send_tx() to sign_tx()
Because it signs, and it doesn't send.
2015-07-04 16:45:08 +09:00
Neil Booth b2bfd5af1f Show the broadcast button even if broadcast.
It may not actually be broadcast or relayed for various reasons.
2015-07-04 16:37:01 +09:00
Neil Booth 3446e1fd56 Prevent garbage collection of TxDialogs
The transaction dialogs have a habit of randomly disappearing,
because of garbage collection.  This was particularly common
if you viewed the details of a tx in your history immediately
after electrum startup, or after pressing Broadcast.

Other tweaks:

- Distinguish saved and broadcast.
- When signed, consider unsaved and prompt to save if not
  subsequently saved or broadcast.
- Hide broadcast button after broadcast.
- Hook into the closeEvent so closing the window with the mouse
  has the same effect as pressing the close button.
2015-07-04 12:31:31 +09:00
Roman Zeyde a0c891d73f transaction_dialog: allow plugins manipulate transaction sharing buttons 2015-06-29 17:00:31 +03:00
Neil Booth a23247634c Remove some unused vars. 2015-06-29 10:44:27 +09:00
ThomasV 9dfe8ff847 tx window: keep a single close message, and raise window after signing 2015-06-28 10:37:08 +02:00
Neil Booth c35485c1c2 Split tx dialog buttons
The "actions" (sign, broadcast, send to cosigner, verify GA instant)
go on the RHS next to the "Cancel" button.

Copy, QR code and save go on the left.
2015-06-27 11:48:27 +09:00
Neil Booth 547886d6f1 Input tx index looks better left-aligned after all 2015-06-27 11:01:42 +09:00
Neil Booth 6c25f637b9 Wrapper func to create and show a TxDialog
Add prompt_if_unsaved as explicit argument.
Tested with cosigner pool plugin.
2015-06-27 10:56:01 +09:00
Neil Booth 3d48a2d842 More tx dialog improvements
- Show Close if no action to perform, otherwise Cancel
- Add some strings for translation
- Make input hash/index constant width; previously a
  3-digit index bumped the address a whole tabstop over
  compared to the 1-digit indices
2015-06-26 20:15:51 +09:00
ThomasV 0a8e8ec906 Merge pull request #1316 from kyuupichan/tx_dialog3
Distinguish receiving and change addrs in TxDialog
2015-06-26 10:48:52 +02:00
Neil Booth 7e36555ed8 Save the description to the wallet on broadcasting
Resolves a long-standing bug with view-before-broadcast
2015-06-26 15:40:41 +09:00
Neil Booth 820f435a9a Distinguish receiving and change addrs in TxDialog
Show change in yellow, receiving in lightgreen (as now).
Numbers are more readable with whitespace.
2015-06-26 11:55:20 +09:00
Neil Booth 56488daf04 Have show-before-broadcast defer password request
Show-before-send currently asks for the password
and creates a signed tx before showing anything.

This is a little unnerving as you can't see what
you're being asked to sign.

This patch does a few things:

- Adds a description label to the TX dialog
- You see the tx before being asked for password;
  that is only requested on pressing Sign
- in show-before-broadcast mode, the Send button
  text is instead "Show...".  Hook up this button
  text change to the prefs dialog too.
- Remove many redundant imports.  In particular
  PyQ4 is checked in main_window.py so no need
  in tx_dialog too.

Note I had to remove disabling of the Sign button,
because if the user presses "cancel" nothing will
re-enable it.
2015-06-25 15:58:40 +09:00
ThomasV 7e0a80b697 Merge pull request #1275 from kyuupichan/tx_dialog_send_tx
Have transaction_dialog use send_tx()
2015-06-24 11:15:30 +02:00
ThomasV 21f505a62c fix #1290 2015-06-12 05:06:23 +02:00
Neil Booth 4b092628df Have transaction_dialog use send_tx()
This is working towards showing transactions before asking for passwords.
I think it also means the transaction dialog now interacts properly with
plugins, whereas it didn't before.

send_tx now takes a callback instead of a label, and does not decide
on whether to broadast itself; that is left to its caller.

broadcast_transaction() takes care of adding the description of the
successfully broadcast transaction to the wallet.  Previously labels
could be added to the wallet even if the broadcast was cancelled by
the user or unsuccessful, which doesn't seem right.

Lengthen the dialog messages a little, as some window managers lose the
"Please Wait" title bar owing to window decorations if the message
is too short.
2015-06-08 07:38:08 +09:00
ThomasV 5a4a9f5369 make txdialog a nonmodal widget 2015-06-07 16:51:27 +02:00
ThomasV 3e4cb396b3 don't disable broadcast button if we are online but not connected 2015-06-03 14:23:11 +02:00
Neil Booth 79de458101 Preparation for moving the set of verified and unverified txs to the wallet.
The verifier will retain responsibility for verification, but will no longer
hold the transaction sets itself.

Change requires_fee to take a wallet.
Add new function add_unverified_tx()
Move get_confirmations() to the wallet from the verifier.
2015-05-07 09:21:08 +09:00
ThomasV 6527eae32b handle adds is None in tx dialog 2015-05-02 16:17:50 +02:00
Roman Zeyde b5c31cd031 transaction_dialog: hide broadcast button when offline 2015-04-23 09:30:25 +03:00
ThomasV 2f729c2505 add copy button to tx dialog 2015-04-20 14:44:59 +02:00
ThomasV a3ed4ce2a7 new class to show buttons in LineEdit. fixes #1050 2015-04-20 11:49:27 +02:00
ThomasV 3d1fa1e27f find_pay_to_pubkey_address 2015-03-30 14:10:46 +02:00
ThomasV 66f7a6d28e show own addresses in green 2015-03-30 14:10:46 +02:00