Commit Graph

280 Commits

Author SHA1 Message Date
SomberNight
09b3c80529 Qt main_window: handle event 'ln_gossip_sync_progress' if LN disabled
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 434, in on_network_qt
    self.update_lightning_icon()
  File "...\electrum\electrum\gui\qt\main_window.py", line 2091, in update_lightning_icon
    self.lightning_button.setMaximumWidth(25 + 4 * char_width_in_lineedit())
AttributeError: 'ElectrumWindow' object has no attribute 'lightning_button'
2020-03-01 04:28:13 +01:00
SomberNight
67d24bf129 add LN gossip sync progress estimate indicator to Qt GUI 2020-02-29 20:03:35 +01:00
SomberNight
e1dcdde272 Qt tx dialog: fix file extension when exporting (on MacOS...)
closes #5954

We are now giving every(?) hint possible to the MacOS file dialog...
The extension is put in the filename as before (which turned out not to be enough).
It is also set using QFileDialog.setDefaultSuffix, which again, turns out not to be enough.
In desperation, the file extension filter-list now contains *.psbt and *.txn as separate filters,
and the one with the expected extension is pre-selected. This seems enough...
2020-02-28 21:59:09 +01:00
SomberNight
88650ed8d6 network UntrustedServerReturnedError: add "DO NOT TRUST..." tag 2020-02-28 18:47:12 +01:00
ThomasV
ed29a45d50 Qt: disable preview button in open_channel 2020-02-24 12:29:56 +01:00
SomberNight
4c2e1970f2 qt receive tab: better "Clear" behaviour
Previously, the selection would not get cleared, and if the user clicked
again on the already selected item, the click would get ignored
(request would not get populated).
2020-02-23 21:18:46 +01:00
SomberNight
45a309ff25 qt channels_list: early exit if lightning is disabled
(note: signal is coming from a different wallet/window)

Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\channels_list.py", line 142, in do_update_single_row
    self.update_can_send(self.parent.wallet.lnworker)
  File "...\electrum\electrum\gui\qt\channels_list.py", line 164, in update_can_send
    msg = _('Can send') + ' ' + self.parent.format_amount(lnworker.can_send())\
AttributeError: 'NoneType' object has no attribute 'can_send'
2020-02-23 20:30:14 +01:00
ThomasV
570167a2c4 restrict lightning to p2wpkh wallets 2020-02-20 21:17:25 +01:00
ThomasV
feb47b0a6f Add lightning tx dialog (qt and kivy) 2020-02-18 13:02:18 +01:00
SomberNight
16626a3386 lnutil.split_host_port: fix for IPv6 connection string 2020-02-17 19:43:21 +01:00
ThomasV
4dc74870e1 Catch exceptions raised in LNWorker._pay_to_route
Reset payment status if an exception is caught.
Also, do not pass status to the 'invoice_status' network callback.
This fixes #5869, #5870, #5964.
2020-02-17 12:33:43 +01:00
ThomasV
2dad87cbb4 Automate backups:
- backup wallet file on each channel creation
 - on android, a backup password is entered in settings
 - on desktop, the backup path is in settings
2020-02-15 16:28:15 +01:00
ThomasV
62eceeb573 Save and read lighting backups (Qt) 2020-02-15 16:28:15 +01:00
SomberNight
111ef9ebb1 follow-up fixes to storage-db separation
e1ce3aace7
2020-02-13 20:00:12 +01:00
ThomasV
a600873cf9 move wrapper definition outside of main_window class 2020-02-11 11:08:33 +01:00
ThomasV
e1ce3aace7 Separate db from storage
- storage is content-agnostic
 - db and storage are passed to wallet contructor
2020-02-10 17:45:23 +01:00
SomberNight
f9960a5fe2 qt: don't clear send tab in broadcast_done
no longer needed as fields are already cleared when user clicks Save/Pay
2020-02-07 20:11:08 +01:00
ThomasV
8118bd1d72 use setEnabled() for Qt menu items: Network, Lightning, Watchtower 2020-02-02 22:40:23 +01:00
SomberNight
2880c26d87 qt broadcast tx: don't complain about being "offline" for partial tx 2020-01-21 15:12:25 +01:00
SomberNight
2e654c9440 qt main_window: trivial clean-up re is_onchain 2020-01-21 14:22:25 +01:00
SomberNight
e9645db182 qt send tab: show "Pay" button even in watch-only wallets 2020-01-21 14:16:23 +01:00
SomberNight
6d270364c6 qt paytoedit: properly handle multiple max ('!') outputs 2020-01-18 04:15:44 +01:00
SomberNight
5cfafff55d qt main_window: rm require_fee_update (dead code) 2020-01-18 04:15:40 +01:00
SomberNight
b16164da4f qt paytoedit: fixes for pay-to-many (when including "!") 2020-01-18 04:15:26 +01:00
SomberNight
94888739d3 try to fix "--offline" mode 2020-01-09 19:23:24 +01:00
SomberNight
29cf01524a qt CPFP: handle empty fee field
fixes #5875
2020-01-07 17:59:17 +01:00
SomberNight
1d0aa4042a fix paying bip70 payment request with Qt GUI 2019-12-31 03:08:47 +01:00
SomberNight
9b28f6df7b wallet: encrypt storage by default
notably, now also in kivy
2019-12-19 14:22:47 +01:00
SomberNight
f2d42d79ba qt: rm redundant line: ConfirmTxDialog.update_tx()
already called in ConfirmTxDialog.__init__
2019-12-09 19:14:15 +01:00
ThomasV
9d83dea0dc Merge pull request #5822 from SomberNight/201912_qt_receive_tab_address
qt receive tab: show plain bitcoin address
2019-12-09 10:57:14 +01:00
SomberNight
369d972aed qt: handle exceptions when pressing "Max" button
fixes #5783
2019-12-08 03:21:02 +01:00
SomberNight
d2a8028cde qt receive tab: show plain bitcoin address 2019-12-07 06:06:36 +01:00
SomberNight
20bbe85bce receive requests: encode lightning invoices as uppercase -> smaller QRs
By encoding bolt11 invoices as uppercase text in QR codes,
we can use the alphanumeric mode, which results in non-negligibly smaller QR codes.
2019-12-07 05:58:58 +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
ddeb176b3d kivy: fix open_channel (API was changed) 2019-11-23 20:50:30 +01:00
SomberNight
557987d4eb add/fix some open_channel related type hints 2019-11-23 20:28:46 +01:00
ThomasV
fd8236538a Open lightning channels with partially signed tx.
Fixes #5379.
2019-11-23 19:49:12 +01:00
ThomasV
06589df812 simplify add_transaction 2019-11-23 12:46:43 +01:00
ThomasV
fc85dcead6 follow-up previous commit 2019-11-23 11:37:01 +01:00
ThomasV
6c62fb03ac fix #5733 2019-11-23 11:02:31 +01:00
ThomasV
61dfcba092 Refactor channel states:
- persisted states are saved
 - state transitions are checked
 - transient states are stored in channel.peer_state
 - new channel states: 'PREOPENING', 'FUNDED' and 'REDEEMED'
 - upgrade storage to version 21
2019-11-22 20:14:54 +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
49284f716b wallet: bump fee now supports coin selection
related: #5719
2019-11-20 18:43:05 +01:00
SomberNight
fec9677508 qt open channel: minor dialog fixes 2019-11-20 18:00:45 +01:00
SomberNight
d1c262def0 qt tx dialog: small clean-up in constructors 2019-11-19 22:17:52 +01:00
SomberNight
97056ae44d qt send tab: subtract 2fa fee when clicking "spend max" 2019-11-19 21:22:49 +01:00
SomberNight
ca6654c102 qt send tab: don't allow paying multiple invoices that spend max '!' 2019-11-19 20:26:50 +01:00
SomberNight
aa3d817ef2 qt: clean-up imports 2019-11-18 20:56:49 +01:00
ThomasV
aa37979100 fix #5761 2019-11-18 10:22:20 +01:00