Commit Graph

895 Commits

Author SHA1 Message Date
Sander van Grieken
d0c37c6e33 qml: refactor help text in CpfpBumpFeeDialog, move most to help text popup 2024-02-23 11:11:12 +01:00
Sander van Grieken
b0227c7e03 qml: add HelpDialog and HelpButton for showing additional info 2024-02-23 10:28:11 +01:00
Sander van Grieken
8ce1e6453b wizard: skip/hide passphrase option for 'old' and '2fa' seeds (see #4326) 2024-02-21 17:15:10 +01:00
Sander van Grieken
de9c0249c7 qml: icons, styling 2024-02-19 14:38:29 +01:00
accumulator
1b75e3883e Merge pull request #8845 from accumulator/feepicker
qml: consolidate fee slider ui in various places to a single FeePicker control
2024-02-16 13:01:34 +01:00
Sander van Grieken
016e500993 qml: FeePicker parameterize enable display of tx info and picker, use this for CPFP
to put picker in Total section
2024-02-16 12:56:18 +01:00
Sander van Grieken
c0b892720e qml: consolidate fee slider ui in various places to a single FeePicker control 2024-02-16 10:09:56 +01: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
Sander van Grieken
0a6b2d521b qml: move final wizard submit() to WizardComponent.finish handler 2024-02-05 11:13:58 +01:00
accumulator
019baa5a71 Merge pull request #8862 from SomberNight/202401_qml_wizard_final_accept
qml wizard: run navmap[view]['accept'] handler a final time on finish
2024-02-05 10:46:22 +01:00
SomberNight
07dc80dd9a qml wizard: stricter validation for new wallet name
user on bitcointalk [0] tried to create wallet with name "w/o 2FA".
Before this, one would only get an error after the last page of the wizard.
With this, the "Next" button does not even get enabled if the name does not look ok.
(and as in comment, maybe we should be even stricter re what is allowed)

[0]: https://bitcointalk.org/index.php?topic=5483514.msg63584789#msg63584789
2024-02-04 08:54:40 +00:00
SomberNight
a9a8ed2eb4 follow-up: factor out more hardcoded "sat/byte" and "sat/b" strings
- rename globals
- also rm hardcoded strings from qml
- use consistent unit names in qml
  (previously mixed sat/vB and sat/byte (latter coming from core lib))
2024-02-03 05:26:31 +00:00
SomberNight
16eec8daf5 qml QEChannelDetails: show currentFeerate
related https://github.com/spesmilo/electrum/issues/8863
2024-02-03 03:43:16 +00:00
SomberNight
48a96f6776 qml wizard: run navmap[view]['accept'] handler a final time on finish
For example, see
061c821128/electrum/plugins/trustedcoin/trustedcoin.py (L624)
Even if navmap[view]['last'] is True, we still want the navmap[view]['accept'] handler to run.

fixes https://github.com/spesmilo/electrum/issues/8861

---

Note that an analogous issue does not exist for the desktop qt gui,
see 061c821128/electrum/gui/qt/wizard/wizard.py (L206)
There, wizard.resolve_next is called regardless of is_last.
2024-01-31 12:59:47 +00:00
SomberNight
cb55c65677 qml wizard: WCWalletPassword: show warning if pw is too short 2024-01-31 10:28:10 +00:00
SomberNight
67b57da402 qml: WCHaveMasterKey: (fix) re-verify text in onTextChanged
fixes https://github.com/spesmilo/electrum/issues/8853

This is a bit ugly, but activeFocus is declared as final and cannot be overridden directly...
```
  1.42 | W | gui.qml.qeapp | file:///home/user/wspace/electrum/electrum/gui/qml/components/controls/ElTextArea.qml:23:5: Cannot override FINAL property
```
2024-01-30 02:11:01 +00:00
Sander van Grieken
55a2005a6b qml: update history view after address/key delete. fixes #8782 2024-01-18 00:28:02 +01:00
Sander van Grieken
e2bb7df54a qml: invert, more strict check in determine_can_pay for invoice types,
also disable paste button while PI is being evaluated
2024-01-17 14:09:57 +01:00
Sander van Grieken
291f0ce235 qml: handle exception more gracefully when attempting to delete last address from imported wallet 2024-01-16 15:56:49 +01:00
accumulator
a51b3bdbfb qml: show fiat price when historic rates are enabled and no timestamp available
Co-authored-by: ghost43 <somber.night@protonmail.com>
2024-01-04 17:31:00 +01:00
Sander van Grieken
5077e013f3 qml: don't show fiat amount when timestamp more than a day old and historic rates are disabled 2024-01-04 12:25:40 +01:00
accumulator
88058df409 Merge pull request #8772 from accumulator/qml_tx_inputs
qml: add transaction inputs in TxDetails and …
2023-12-29 16:21:22 +01:00
Sander van Grieken
92bff08ba5 qml: don't use predictive text for fields where it makes no sense 2023-12-29 16:18:03 +01:00
Sander van Grieken
e8852918a7 qml: fix newline in TxDetails 2023-12-29 12:13:49 +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
Sander van Grieken
ceb42c2a1b qml: show frozen lightning balance in BalanceDetails only when non-zero 2023-12-28 12:30:37 +01:00
SomberNight
0dae17339d qml: add config setting to allow screenshots
On Android, we disallow screenshots on screens where the seed is visible.
(The seed is extremely sensitive data that should not be stored digitally without
significant precautions but it's also cumbersome to write down or memorise, so
some people instinctively just try to take a screenshot of it when creating a wallet.)
We do this by using the built-in OS mechanism of setting FLAG_SECURE on the window.
However, on some devices with custom ROMs (one report from LineageOS, one from /e/OS),
unsetting FLAG_SECURE crashes the application for some reason.

As a workaround, this commit adds a config setting into the Preferences,
to disable this mechanism and just always allow screenshots.
(note that you can get into the qml Preferences before creating/opening any wallet)

ref https://github.com/spesmilo/electrum/issues/8522
2023-12-27 07:28:39 +00:00
accumulator
9ea15a1c3c Merge pull request #8737 from accumulator/welcome_page
qt,qml: add a welcome page as initial page for server connect wizard
2023-12-24 14:20:52 +01:00
Sander van Grieken
4908c8c389 qml: RbfCancelDialog: warning text in frame 2023-12-22 17:35:25 +01:00
accumulator
d8bd55bf4e Merge pull request #8758 from accumulator/qml_error_dialogs
qml: use warning icon and error title for failure messagedialogs
2023-12-22 16:55:01 +01:00
Sander van Grieken
c7e055bdb9 qml: remove unused components 2023-12-21 12:36:20 +01:00
Sander van Grieken
ebcecdccce qt,qml: add checkboxes for advanced network config on welcome page, remove separate proxy-ask and autoconnect pages 2023-12-21 11:17:48 +01:00
Sander van Grieken
5e39ff49bc add missing accept handler for welcome page 2023-12-19 18:49:16 +01:00
Sander van Grieken
a03b2d7bae qt,qml: add a welcome page as initial page for server connect wizard
This is much less intimidating than asking if the user wants to use a proxy
out of the gate.
2023-12-19 18:49:16 +01:00
Sander van Grieken
6e576f2a08 qml: fix cancelling network wizard not closing app 2023-12-19 18:37:53 +01:00
SomberNight
3b5b75325e qml: WCServerConfig.qml: only disable autoconnect if given server
if the user entered the server select screen and immediately clicked next,
a random server would get set but with auto_connect disabled.
2023-12-19 16:43:59 +00:00
Sander van Grieken
524adaf747 qml: use warning icon and error title for failure messagedialogs 2023-12-19 15:58:39 +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
a6ceeec09d qml: add frozen lightning to BalanceDetails, indent frozen on-chain and lightning amounts 2023-12-12 13:17:57 +01: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
ThomasV
8199a6b5b2 Merge pull request #8733 from accumulator/remove_2fa_email
qt, qml: remove email entry from 2FA wallet ToS pages
2023-12-10 12:39:51 +01:00
Sander van Grieken
d8d2426e83 qml: add local/remote SCID alias to ChannelDetails 2023-12-08 14:17:14 +01:00
Sander van Grieken
4c8287358a qt, qml: remove email entry from 2FA wallet ToS pages 2023-12-08 12:07:03 +01:00
Sander van Grieken
b87d091a6d qt, qml: allow BIP39 seeds which fail checksum or wordlist (fixes #8720)
removes verifySeed from qebitcoin as this code was 99% duplicate of wizard.validate_seed
2023-12-06 16:12:57 +01:00
Sander van Grieken
24c28409b3 qt, qml: use lowercase bolt11 when copying or sharing 2023-12-04 16:42:49 +01:00
Sander van Grieken
26b5bec5af qml: small text change in proxy settings 2023-11-30 14:27:31 +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
ae9767880e ui: add icons for script type and deterministic wallet 2023-11-27 16:14:41 +01:00
SomberNight
b18f9570fc qml wizard: fix creating imported wallet from camera: concat with space
The parser expects the list of keys/addrs to be whitespace-separated (no commas).
Same as line 61.
2023-11-24 20:48:04 +00:00
SomberNight
7f64ecc4bd wallet.bump_fee: the glorious return of BumpFeeStrategy :D
gui/qt/rbf_dialog.py (old) lines 57-64 were implementing logic that should not be part of GUI code.
Case in point, gui/qml/qetxfinalizer.py (old) lines 511-513 duplicated half of that logic but not the other half.
That logic is now moved to wallet.get_bumpfee_strategies_for_tx().

More context: a user on irc got confused when using the qml gui. They were sending "max" and wanted to bump_fee.
The qml gui selected the "preserve_payment" strategy by default, using which there was no solution, and the user
did not notice that the strategy can be altered (via the "method" dropdown). The qt gui had logic to select
"decrease_payment" by default in such a case (which does find a solution to bump) but this logic was not
duplicated in the qml gui.
Instead of duplicating the logic, this commit moves it to shared lib code.
2023-11-20 18:55:43 +00:00