Commit Graph

1084 Commits

Author SHA1 Message Date
ThomasV
aaff48720f Qt lightning invoice dialog: make payment_hash copiable 2020-11-18 11:47:47 +01:00
SomberNight
fa8c751abf qt swap dialog: fix disabling "OK" btn if NotEnoughFunds 2020-11-17 19:44:33 +01:00
SomberNight
a5c6a570ae qt console: fix usage in --offline mode
fixes #6731
related: #6467
2020-11-14 19:36:54 +01:00
SomberNight
c872c3194f qt "open channel" dialog: detect invalid remote node id sooner
and avoid the "please wait" text to be interpreted as a node id

related #6705
2020-11-13 19:21:37 +01:00
ThomasV
ea654ad740 Merge pull request #6705 from bitromortac/lnrater
lightning: reintroduce node recommendation
2020-11-09 10:06:13 +01:00
bitromortac
f36d7872c3 qt: move local node id to info menu 2020-11-06 08:00:24 +01:00
bitromortac
085056532c guis: reintroduce suggest button 2020-11-06 08:00:24 +01:00
bitromortac
cc9e19409f lnrater: module for node rating
Introduces LNRater, which analyzes the Lightning Network graph for
potential nodes to connect to by taking into account channel capacities,
channel open times and fee policies. A score is constructed to assign a
scalar to each node, which is then used to perform a weighted random
sampling of the nodes.
2020-11-06 08:00:23 +01:00
SomberNight
193c29af87 wizard, multisig: on bip39/hw ks, only ask for script type for 1st ks
When setting up a multisig wallet, there is no point in asking for the
script type for each cosigner (bip39/hw) -- we can just ask for the
first one. If the first keystore is an electrum seed, we end up never asking :)
2020-11-05 01:02:11 +01:00
SomberNight
802fe8c73a qt user interface: send tab: change "Pay" button text to "Pay..."
Ellipsis ("...") is sometimes used in UIs to suggest there will be an
additional modal dialog before executing the action.
2020-10-29 01:58:34 +01:00
SomberNight
ea22d0073e config: distinguish knowing mempool is empty vs not having mempool_fees
config.mempool_fees is now [] if server claims mempool is ~empty,
and None if no valid histogram has been received from server.
(previously it used to be [] in both cases)
2020-10-27 18:55:39 +01:00
SomberNight
25d4a40d6e qt history tab: fix shortcut in HistoryModel.refresh() 2020-10-25 06:55:10 +01:00
SomberNight
b95525896f qt send tab: show friendlier error on mistyped bitcoin address 2020-10-25 04:24:31 +01:00
SomberNight
4c7a92f39c bitcoin: implement construct_script and use it 2020-10-24 07:49:06 +02:00
ThomasV
7110fde25d follow-up: fix qt lightning dialog if gossip is not started 2020-10-22 19:20:22 +02:00
ThomasV
f155f3aff5 start lngossip if instantiated; this saves a boolean 2020-10-22 18:48:27 +02:00
bitromortac
1855bcb17d qt: reflect running gossip in lightning icon 2020-10-22 18:05:51 +02:00
bitromortac
750147d931 kivy: display warning when first channel is opened 2020-10-22 18:05:51 +02:00
bitromortac
6a0ada3f79 qt: display warning when first channel is opened 2020-10-22 18:05:51 +02:00
bitromortac
bdca7be1c7 kivy: remove enable/disable button 2020-10-22 18:05:51 +02:00
bitromortac
bba995ada3 qt: remove enable/disable button 2020-10-22 18:05:51 +02:00
bitromortac
3314c149f2 qt: show channels tab by default if ln wallet 2020-10-22 18:05:51 +02:00
bitromortac
42df51f2dd qt: remove node suggestion 2020-10-22 18:05:51 +02:00
bitromortac
4efcb53d24 network: load gossip db early
The gossip db is loaded early when the network is started to save
time when the gui is locked and a wallet not yet loaded. Side effects
of the LNWallet to start peering when a channel db is loaded is
circumvented.
2020-10-22 18:05:51 +02:00
SomberNight
914b606cb9 kivy: fix app not even starting
```
  File "/home/user/venvs/electrum37/lib64/python3.7/site-packages/kivy/lang/builder.py", line 654, in _apply_rule
    child = cls(__no_builder=True)
TypeError: __init__() got an unexpected keyword argument '__no_builder'
```

follow-up c70484455c
2020-10-20 14:55:39 +02:00
SomberNight
f125a06453 wallet: simplify get_wallet_delta 2020-10-18 20:37:29 +02:00
SomberNight
55b5335ebb qt tx dialog: always show input amounts if we know them
Previously we would only show input amounts for partial txs.
Now also show them for complete txs as well, if we know them:
we check in the wallet db for the prevtx and read the value for the output.
This is safe as the input commits to the prevout via txid (which commits to the output value).

Also show "from addresses" in more cases in a similar fashion.
2020-10-18 20:37:14 +02:00
SomberNight
82c8c4280f lnworker: add request_remote_force_close which can be used without state
see #6656
2020-10-17 03:59:50 +02:00
SomberNight
c70484455c kivy: use our logger, not kivy's; and log more exceptions. 2020-10-16 17:55:40 +02:00
Benoît Verret
e66a5bbfc4 Use default sys.ps1 and ps2 as console prompts (#6651)
sys.ps1 and sys.ps2 define the strings used as primary and secondary
prompts in the Python interpreter.

Also fix a rare bug introduced by myself in 7772af6 (#6607) where
spaces at the end of the current line would not be remembered when
switching server.
2020-10-16 15:37:02 +00:00
SomberNight
ef84716e8b (trivial) kivy: rename title of DSCancelDialog
For an action called "Cancel transaction" it is confusing to have a "Cancel" button
that cancels the action... not sure how to fix -- this is perhaps the least intrusive change
2020-10-15 17:38:41 +02:00
SomberNight
1d187d36f0 (fix) allow opening LN wallet with --offline 2020-10-15 14:20:51 +02:00
bitromortac
292016d283 network dialog: include protocol in server address field (#6624)
* network-dialog: include protocol in server field

In this way it is now possible again to use plain server connections
without reverting it automatically to tls connections.

* qt network dialog: hide trailing protocol ":s" in TextEdit

This hides some complexity from casual users, while still allowing
advanced users to set the protocol.

Co-authored-by: SomberNight <somber.night@protonmail.com>
2020-10-14 16:28:31 +00:00
ghost43
83143f421a Merge pull request #6641 from SomberNight/202010_dscancel
wallet: implement cancelling tx by double-spending to self ("dscancel")
2020-10-13 17:42:10 +00:00
SomberNight
082b2b3585 qt console: fix copying text using Ctrl+C
follow-up #6643
2020-10-13 19:21:32 +02:00
SomberNight
c69ce73814 qt coins tab: label(utxo) to consider both label(txid) and label(addr)
related: #6644
2020-10-13 18:57:59 +02:00
SomberNight
4b6c86ecbe wallet: make labels private, and access to need lock
e.g. labels plugin iterated over wallet.labels on asyncio thread while user could trigger an edit from Qt thread
2020-10-13 18:57:55 +02:00
SomberNight
8eb4247ac4 kivy: allow setting password for watch-only wallets
closes #6622

This has been only disabled for historical reasons: for a long time,
wallets in kivy were only keystore-encrypted, but watch-only wallets
do not have a keystore. Now they are storage-encrypted so passwords make sense.
2020-10-13 17:19:47 +02:00
Benoît Verret
15de954d6a Handle KeyboardInterrupt in Python Console (#6643)
Use Ctrl+C to raise a KeyboardInterrupt.
This is especially useful to escape constructs.

Example:
>>> for i in range(0, 3):
...
KeyboardInterrupt
>>>
2020-10-12 17:28:44 +00:00
SomberNight
67cd73cae0 kivy: implement dscancel 2020-10-09 19:01:48 +02:00
SomberNight
3a4f07c345 wallet: implement cancelling tx by double-spending to self ("dscancel") 2020-10-09 17:36:37 +02:00
SomberNight
52f4189176 qt TorDetector: close socket
ResourceWarning below is shown when running python3 with "-X dev":

...\electrum\electrum\gui\qt\network_dialog.py:457: ResourceWarning: unclosed <socket.socket fd=3276, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('0.0.0.0', 55693), raddr=('127.0.0.1', 9050)>
  if TorDetector.is_tor_port(net_addr):
ResourceWarning: Enable tracemalloc to get the object allocation traceback
2020-10-06 19:15:20 +02:00
Benoit Verret
4f1c687102 Save indented lines in console history
Mimic the behavior of the standard Python console by storing
indented lines in history.
2020-09-30 09:17:04 -04:00
SomberNight
ae57941981 (trivial) follow-up 7b91da9966 2020-09-23 15:25:13 +02:00
SomberNight
c4c22312c4 transaction: impl tx.to_qr_data(): move logic from GUI to tx class 2020-09-23 14:57:46 +02:00
SomberNight
7b91da9966 Qt tx dialog: handle "empty" locktime field
fix https://github.com/spesmilo/electrum/issues/5486#issuecomment-696276020
2020-09-23 13:31:39 +02:00
MrNaif2018
6bd1a04aee Pass wallet to invoice_status/request_status (#6595)
* Pass wallet to invoice_status/request_status

* Check for same wallet in qt gui

Co-authored-by: ghost43 <somber.night@protonmail.com>
2020-09-18 17:28:51 +00:00
Benoît Verret
ddc94197aa Keep console input when switching server (#6607)
Console input was being replaced by an empty line every time the
server used changed.
2020-09-18 16:30:43 +00:00
SomberNight
1ea4e42a96 Qt history/address tab: defer refreshing while editing (e.g. label)
This functionality was originally added in 0371a3dc32,
but was lost with #4915 in version 3.3.
2020-09-16 18:26:08 +02:00
Benoît Verret
77287e0fc7 Fix multiline script error (#6581)
Syntax errors emerged when running multiline scripts in the console
when using the run() command.
2020-09-15 17:23:22 +00:00