1
0
Commit Graph

17064 Commits

Author SHA1 Message Date
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
Sander van Grieken
03dd38bfb8 qml: add support for ln address and openalias, fix lnurl finalize step,
avoid overloading invoiceParser with new payment identifiers while potentially long-running
resolve/finalize steps are ongoing, show errors inresolve/finalize steps to user.
2023-11-20 17:16:22 +01:00
Sander van Grieken
ff77013a82 qml: check if self._orig_tx is valid. fixes #8407 2023-11-20 17:13:23 +01:00
Sander van Grieken
b098be988e qml: show channel close tx(id) in ChannelDetails 2023-11-20 12:58:48 +01:00
SomberNight
6a8fb26881 (trivial) follow-up prev 2023-11-20 11:37:39 +00:00
SomberNight
4cdd199f5b lnworker: add/fix some type hints, add some comments
follow-up recent refactor
2023-11-20 11:34:56 +00:00
ThomasV
1cc92d4890 trampoline forwarding: before failing payment, wait until all htcs
have failed and session is not longer active.
2023-11-18 16:08:11 +01:00
ThomasV
9b1c40e396 Refactor payment forwarding:
- all forwarding types use the same flow
 - forwarding callback returns a htlc_key or None
 - forwarding info is persisted in lnworker:
   - ongoing_forwardings
   - downstream to upstream htlc_key
   - htlc_key -> error_bytes
2023-11-18 16:03:18 +01:00
SomberNight
f1c63e2d51 commands: make payto/etc respect 'confirmed_only' config var
regression from 2f6d60c715

fixes https://github.com/spesmilo/electrum/issues/8693
2023-11-17 13:05:23 +00:00
SomberNight
c4068ab6cc swaps: add small comment 2023-11-17 11:16:45 +00:00
ThomasV
835992c7ea lnworker: remove if statements where the condition is always True.
Such statements creates confusion for the reader.
2023-11-16 17:34:48 +01:00
Sander van Grieken
a57a0d001b qml: make TextAreas more visible 2023-11-15 18:42:11 +01:00
Sander van Grieken
f8eb2e8cf8 qml: resize menus according to content 2023-11-15 17:35:08 +01:00
Sander van Grieken
4ab973f93d followup 3793a6b6b6, remove leftovers 2023-11-14 17:22:05 +01:00
Sander van Grieken
3793a6b6b6 qml: use highlight pane for QR codes, refactor ReceiveDialog invoice select UI. 2023-11-14 17:19:27 +01:00
Sander van Grieken
86a45c668c few small fixes 2023-11-14 14:36:54 +01:00
Sander van Grieken
621a397b70 i18n: translate a few untranslated strings and avoid early translate for pr_tooltips and pr_expiration_values
fixes #8689
2023-11-14 12:07:49 +01:00
SomberNight
4006a2f548 SECURITY.md: small clean-up 2023-11-13 15:45:05 +00:00
SomberNight
6ffaf7c526 lnworker: (followup prev) set .config in baseclass init, not subclasses
as methods in the base class also rely on the config field, not just methods in the subclasses
2023-11-13 15:39:15 +00:00
ThomasV
7447cf9dcc lnworker: always initialize self.config in constructor 2023-11-13 14:54:40 +01:00
ThomasV
6865204d7b Merge pull request #8671 from spesmilo/just_in_time_channels
Just in time channels
2023-11-13 14:31:34 +01:00
SomberNight
e5fae1d685 util.NetworkRetryManager: better document API 2023-11-13 12:22:05 +00:00
Sander van Grieken
94b1df4a08 qml: small UI fix, wording. 2023-11-13 11:35:30 +01:00
ThomasV
7bebd62f13 zerofonf trusdted node: use NetworkRetryManager method _can_retry_addr 2023-11-13 10:47:18 +01:00
ThomasV
a338459d45 just-in-time channels:
- a node scid alias is derived from the node ID
 - the channel opening fee is sent in a TLV field of open_channel
 - the server requires htlc settlement before broadcasting
   (server does not trust client)
2023-11-13 10:47:18 +01:00
ThomasV
816e617aaf option_zeroconf
- accept zeroconf channels only from a single node
 - fw_info uses get_scid_or_local_alias
2023-11-13 10:47:18 +01:00
ThomasV
96e143b6c3 lnpeer: abort send_revoke_and_ack and maybe_send_commitment if channel is closed. fixes #8684 2023-11-13 10:43:16 +01:00
ThomasV
98f9f295cf fix #8683; do not force close channel if we just sent update_fulfill_htlc 2023-11-12 17:10:50 +01:00
ThomasV
4a3a61c6b0 Merge pull request #8678 from accumulator/qml_password_strength
qml: introduce PasswordStrengthIndicator control, and add to Password…
2023-11-11 09:52:52 +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
ThomasV
de0dc93a9d Merge pull request #8675 from accumulator/address_delete
qml: implement delete address for imported wallets
2023-11-10 15:23:29 +01:00
ThomasV
4252c30210 Merge pull request #8682 from accumulator/about_version
qml: remove APK version, add Qt and PyQt version strings to About page
2023-11-10 15:04:53 +01:00
Sander van Grieken
3967323842 qml: refactor ChannelDetails. Add funding outpoint 2023-11-10 13:02:55 +01:00
Sander van Grieken
2995bc8b37 qml: fix dialog not closing if dialog is shown/hidden more than once
most dialogs are destroyed when closed, therefore not hitting this bug,
but e.g. ChannelOpenProgressDialog is reused.
2023-11-10 11:59:22 +01:00
Sander van Grieken
42f323ac8d qml: remove APK version, add Qt and PyQt version strings to About page 2023-11-10 11:11:51 +01:00
Sander van Grieken
0fb47c87d2 qml: fixes for CloseChannelDialog;
- split RequestForceClose and LocalForceClose options, as request force close is only available if connected.
- disable no close policy on dialog, as it locks the user in the dialog if no succesful close is initiated.
  what this intended to do is keep the backing object QEChannelDetails alive until a result is obtained, to avoid
  exceptions when emitting the result signal. this is now handled more robustly, the user can leave the dialog
  without triggering exceptions later.
2023-11-10 10:58:08 +01:00
ThomasV
fb4eb86e7c submarine swaps: remove support for 'old' normal swaps,
where the user has the preimage.

The CLTV requirements between old and new flow are imcompatible.
With the current locktime value, the server was vulnerable to an
attack where the client does not settle the lightning payment
and claims a refund. In order to support both old and new flows,
one would need to use different locktimes.
2023-11-10 10:35:34 +01:00
ThomasV
300c3bbd30 submarine_swaps: rename variable for clarity 2023-11-10 10:05:04 +01:00
Sander van Grieken
e011bd235b qml: implement delete address for imported wallets, and fix address list on address/key add. 2023-11-10 09:30:56 +01:00
Sander van Grieken
98264f64ad qml: introduce PasswordStrengthIndicator control, and add to PasswordDialog and WCWalletPassword 2023-11-10 09:30:31 +01:00
SomberNight
d49e1bb32c contrib/android/Readme.md: update "how to run qml gui on linux" section 2023-11-09 16:40:45 +00:00
SomberNight
5ba156fcad Merge remote-tracking branch 'remotes/accumulator/qt6'
For the "qml" gui (used on Android), this upgrades the qt version from 5.15 to 6.4.

PR https://github.com/spesmilo/electrum/pull/8545
2023-11-09 16:18:56 +00:00
Sander van Grieken
047cc6f957 qml: remove attempt to unfocus by clicking dialog background
Doesn't really work as it triggers on events above the background it is defined on :(
2023-11-08 15:38:26 +01:00
Sander van Grieken
8798a45d70 qml: fix issue with width of fiat textedit on ReceiveDetailsDialog 2023-11-07 17:05:13 +01:00
Sander van Grieken
f708e7f03e wizard/wallet: clean up imports, code style warnings. 2023-11-07 11:05:30 +01:00
Sander van Grieken
a6432732f0 qml: addresses/coins filter match case insensitive, don't match 'None' for undefined fields 2023-11-07 10:47:34 +01:00
SomberNight
1544a71542 qml qr scanner: make xml layout look nicer 2023-11-07 10:32:14 +01:00
Sander van Grieken
58ff76adcf android: correctly describe buildozer branch used 2023-11-07 10:32:09 +01:00
Sander van Grieken
55c01bda9b android: set target_sdk_version to 33 2023-11-07 10:32:06 +01:00
Sander van Grieken
11d39cd942 qml: fix keyboard exclusion zone
turns out that Qt.inputMethod.keyboardRectangle.height is not suitable for calculating the exact keyboard
dimensions in Qt coordinates. Instead, use Qt.inputMethod.keyboardRectangle.y transformed to Qt coordinates
using Screen.devicePixelRatio

Note: Qt.inputMethod.keyboardRectangle stop being updated after exiting FLAG_SECURE state
(e.g. in seed or master key entry pages)
2023-11-07 10:32:00 +01:00