ThomasV
8f41aeb783
Replace wallet backup with channel backups
...
- channels can be backed up individually
- backups are added to lnwatcher
- AbstractChannel ancestor class
2020-04-10 14:45:23 +02:00
SomberNight
71eed1d4cb
wizard: (trivial) add show_error to base class, document API
2020-04-09 19:45:42 +02:00
ThomasV
3d69f3b0be
improve payment status callbacks:
...
- add 'computing route' status for lightning payments
- use separate callbacks for invoice status and payment popups
- show payment error and payment logs in kivy
2020-03-10 13:27:02 +01:00
ThomasV
47b6c2d87f
improve kivy password dialog:
...
- separate classes for pin code and password
- add file selector to initial screen
2020-03-09 11:13:05 +01:00
ThomasV
958898280e
follow-up previous commit
2020-03-07 23:06:30 +01:00
ThomasV
c3c6b81857
kivy: show closing transaction in channel dialog
2020-03-06 06:49:46 +01:00
ThomasV
7c77d7c176
kivy: improve channel detaild dialog
2020-03-06 05:50:45 +01:00
ThomasV
0c3565bd4d
kivy: show warning if request/invoice exceeds channel capacity
2020-03-05 14:30:01 +01:00
ThomasV
69b58433bf
kivy: Show lightning balance. Remove 'unmatured', 'unconfirmed'
...
from info dialog, as this is visible in history.
2020-03-05 13:02:17 +01:00
ThomasV
c2432aa125
kivy: set pin_code timeout to 5 minutes
2020-02-21 11:33:07 +01:00
ThomasV
feb47b0a6f
Add lightning tx dialog (qt and kivy)
2020-02-18 13:02:18 +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
098af02789
kivy: pass message to password_dialog (follow-up d9172ade71
)
2020-02-17 09:16:29 +01:00
ThomasV
eb28f57051
(minor) kivy: initialize invoice_popup
2020-02-16 19:32:18 +01:00
ThomasV
e3ccfe6449
kivy: make backups optional
2020-02-15 17:26:03 +01:00
ThomasV
d9172ade71
kivy: use password + pin_code
...
- password is per wallet, is retained in memory
- pin code is saved in config
2020-02-15 17:09:09 +01:00
SomberNight
497d6019e1
kivy/android: ask for STORAGE permission at runtime
2020-02-15 16:28:15 +01:00
ThomasV
d5dc8d1ab2
kivy: save pin code in memory
2020-02-15 16:28:15 +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
87b7d2c0c0
wallet backup function for kivy/android
2020-02-15 16:28:15 +01:00
SomberNight
5d8d8f743a
kivy: more reliable saving of "last wallet"
...
The intended behaviour is that when the user launches the app,
the wallet we try to open is the wallet most recently opened by the user.
The old code in 'on_stop' in practice only got called if the user exited via
repeatedly pressing the system 'back' button.
related #5952
2020-02-13 03:12:32 +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
96fa03c11b
fix paying bip70 payment request with Kivy GUI
2019-12-31 03:37:50 +01:00
SomberNight
02baae10d7
kivy: implement opening storage-encrypted wallet files
2019-12-17 18:39:52 +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
4057140e6a
lightning qr codes: more robust parsing
...
kivy qr code handling did not accept "lightning:" prefix or uppercase
2019-11-20 03:21:59 +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
7b5869c7bc
kivy:
...
- simplify menu
- add lightning network dialog
2019-10-25 16:46:52 +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
576fbbd074
kivy: minor fixes
2019-10-22 11:59:16 +02:00
ThomasV
3af7920b63
fix typo
2019-10-14 12:02:04 +02:00
ThomasV
1b0521cabd
kivy: toggle lightning dialog
2019-10-14 11:59:04 +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
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
04edad9984
config: no longer singleton. it is passed to Wallet.__init__
...
The few other cases that used SimpleConfig.get_instance() now
either get passed a config instance, or they try to get a reference
to something else that has a reference to a config.
(see lnsweep, qt/qrcodewidget, qt/qrtextedit)
2019-09-22 20:46:01 +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
49a2dbb021
kivy: receive to ln invoice should be disabled if lightning is disabled
2019-09-16 16:19:19 +02:00
SomberNight
ff9cc4d292
kivy: fix "use change addresses" setting (previously ignored, always on)
...
this config setting is stored in the WalletStorage unlike most others
closes #5643
2019-09-16 16:01:52 +02:00
ThomasV
30092cd68c
kivy: request PIN to load_wallet only on android
2019-09-11 16:36:04 +02:00
SomberNight
c531c72940
kivy: attempt at handling (some) exceptions on startup
2019-09-10 21:29:13 +02:00
SomberNight
a05dab2c4d
storage: read/write sanity checks
...
related: #4110
supersedes: #4528
2019-09-10 21:17:15 +02:00
SomberNight
1a08063928
config: remove 'open_last_wallet' side-effecting
...
related: #5629
2019-09-10 17:10:52 +02:00
ThomasV
cefa4762ba
do not create multiple instances of SimpleConfig ( fix #5629 ). Add config field to wallet
2019-09-10 08:57:40 +02:00
ThomasV
a50f935aec
Restructure invoices and requests (WIP)
...
- Terminology: use 'invoices' for outgoing payments, 'requests' for incoming payments
- At the GUI level, try to handle invoices in a generic way.
- Display ongoing payments in send tab.
2019-09-02 15:35:44 +02:00
ThomasV
b99a71d1b3
kivy: call register_callback only from main_window. Display CTN in channel details.
2019-08-31 10:13:20 +02:00
ThomasV
ab5a02ba50
kivy: remove hidden state in RefLabel, use it for seed and private keys
2019-08-23 15:46:58 +02:00
ThomasV
e9c32bad19
kivy: remove context menus, cleanup unused files
2019-08-23 12:15:42 +02:00