Commit graph

249 commits

Author SHA1 Message Date
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
ThomasV
b9cf095e1a fix #5761 2019-11-18 05:48:21 +01:00
ThomasV
47e0b4cd02 fix #5765 2019-11-18 05:12:13 +01:00
ThomasV
6b9971a466 fix #5767 2019-11-17 19:29:48 +01:00
ThomasV
a453189d37 fix #5766 2019-11-17 17:08:09 +01:00
ThomasV
e74f7e7b42 fix #5764 2019-11-17 13:48:19 +01:00
ThomasV
78813dcb7d Pass make_tx function to ConfirmTxDialog
- allow 'spend max' when opening a channel (fixes #5698)
 - display amount minus fee when 'max' buttons are pressed
 - estimate fee of channel funding using a template with dummy address
2019-11-14 10:20:19 +01:00
SomberNight
970bd4e95f
qt coin control: introduce second status bar 2019-11-13 19:09:07 +01:00
SomberNight
800c05b32f
qt addresses tab: fix "Spend from" 2019-11-13 05:46:45 +01:00
SomberNight
05c496edd1
PreviewTxDialog: small UI changes 2019-11-12 23:04:57 +01:00
ThomasV
8c3af39a9b add option to pay multiple invoices 2019-11-12 18:37:35 +01:00
ThomasV
dd6cb2caf7 GUI: Separate output selection and transaction finalization.
- Output selection belongs in the Send tab.
 - Tx finalization is performed in a confirmation dialog
   (ConfirmTxDialog or PreviewTxDialog)
 - the fee slider is shown in the confirmation dialog
 - coin control works by selecting items in the coins tab
 - user can save invoices and pay them later
 - ConfirmTxDialog is used when opening channels and sweeping keys
2019-11-12 14:42:06 +01:00
SomberNight
365aa189f2
qt FileDialogs for transactions: better file extension filter 2019-11-08 15:22:11 +01:00
SomberNight
9ff7d2c5a7
transactions (qt): fix opening raw bytes files
(both when trying to "load tx from file", and "load tx from text" > "browse file")
2019-11-08 15:10:54 +01:00
SomberNight
27df235c26
transactions: reading QR codes: clean-up and accept all encodings 2019-11-07 06:33:15 +01:00
SomberNight
bafe8a2fff
integrate PSBT support natively. WIP 2019-11-04 22:24:36 +01:00
ThomasV
5c1340b7bd pass both invoice and description to show_transaction 2019-10-24 17:27:14 +02:00
ThomasV
76c22f3e06 follow-up a0ec2690cf 2019-10-24 16:27:54 +02:00
ThomasV
a0ec2690cf Call wallet.set_paid after onchain broadcast. Check if invoices are expired in util.get_request_status 2019-10-23 17:33:46 +02:00
ThomasV
aac0fe9ae6 kivy: show status with color. show inflight attempts. 2019-10-22 15:41:45 +02:00
ThomasV
0a6ac7c61a fix #5702 2019-10-16 12:01:52 +02:00
ThomasV
d1f4804962 misc Qt fixes
- improve layout of send tab
 - use tabs to show receive widgets
 - add menu item to copy address from request
 - show copied content in copy dialog
2019-10-16 11:46:23 +02:00
fiatjaf
b476681af7 fix typo: wallet.requests -> wallet.receive_requests (#5706) 2019-10-15 13:22:05 +00:00
ThomasV
3af7920b63 fix typo 2019-10-14 12:02:04 +02:00
ThomasV
a13cea6f8a add remove_lightning command 2019-10-14 11:18:57 +02:00
ThomasV
90ce9f195b Allow user to enable lightning in the GUI. Make it a per-wallet setting. 2019-10-13 20:34:38 +02:00
ThomasV
a201ed44df Qt: add lightning button to status bar 2019-10-12 19:27:14 +02:00
ThomasV
af4a3328f7 Qt: separate lightning and watchtower dialogs 2019-10-12 14:30:52 +02:00
ThomasV
dd0be1541e Improve handling of lightning payment status:
- Move 'handle_error_code_from_failed_htlc' to channel_db,
and call it from pay_to_route, because it should not be
called when HTLCs are forwarded.
- Replace 'payment_received' and 'payment_status'
callbacks with 'invoice_status' and 'request_status'.
- Show payment error logs in the Qt GUI
- In the invoices list, show paid invoices for which
we still have the log.
2019-10-11 17:51:33 +02:00
SomberNight
8dabdf8bfb
qt send tab: handle invalid ln invoice; and ln invoice with ln disabled
fixes #5639
fixes #5662
2019-10-01 19:15:26 +02:00
ThomasV
f08e5541ae Refactor invoices in lnworker.
- use InvoiceInfo (NamedTuple) for normal operations,
   because lndecode operations can be very slow.
 - all invoices/requests are stored in wallet
 - invoice expiration detection is performed in wallet
 - CLI commands: list_invoices, add_request, add_lightning_request
 - revert 0062c6d695 because it forbids self-payments
2019-09-22 16:06:53 +02:00
SomberNight
0a395fefbc
qt send tab: use monospace font in "from" UTXO-selection section 2019-09-22 06:20:57 +02:00