Commit graph

233 commits

Author SHA1 Message Date
SomberNight
942e03e3ae
kivy README: add instructions re accessing internal storage 2020-03-05 19:01:55 +01:00
SomberNight
60ad5e6a52
kivy pw dialog: don't enforce min length for existing generic password
this allows opening short-password wallets on desktop
2020-03-05 18:09:17 +01:00
ThomasV
496de03869 (minor) typo 2020-03-05 14:43:10 +01:00
ThomasV
0c3565bd4d kivy: show warning if request/invoice exceeds channel capacity 2020-03-05 14:30:01 +01:00
ThomasV
e362b4b94c kivy invoices and requests: show most recent items first 2020-03-05 13:15:32 +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
c2f9c5fb1b kivy: fix layout of addresses dialog 2020-03-05 12:06:30 +01:00
ThomasV
eadd5d58e8 kivy: improve open_channel dialog 2020-03-05 11:54:33 +01:00
SomberNight
7962e17df6
invoices: deal with expiration of "0" mess
Internally, we've been using an expiration of 0 to mean "never expires".
For LN invoices, BOLT-11 does not specify what an expiration of 0 means.
Other clients seem to treat it as "0 seconds" (i.e. already expired).
This means there is no way to create a BOLT-11 invoice that "never" expires.

For LN invoices,
- we now treat an expiration of 0, , as "0 seconds",
- when creating an invoice, if the user selected never, we will put 100 years as expiration
2020-03-04 14:24:07 +01:00
SomberNight
387c2a1acd
kivy wallet info screen: handle "show seed" for watch-only/no-seed case
For a watch-only wallet, previously a superfluous dummy "Tap to show"
box was shown.
For a has no seed stored (but not watch-only) wallet (e.g. bip39/xprv/imported_privkeys),
the "show seed" option was there and it raised an uncaught exception.
2020-03-02 06:12:24 +01:00
SomberNight
7a574c3cbc
wallet/GUI: don't allow "removing" a LN force-close-tx from history 2020-03-02 05:11:08 +01:00
SomberNight
a0b096dcb2
mnemonic: implement Wordlist class
Wordlist subclasses 'tuple' so it can be transparently used.
'in' and '.index()' are fast.
Use Wordlist in bip39_is_checksum_valid, which makes that faster.
2020-02-29 00:20:11 +01:00
ThomasV
b12c913d47 do not show channel balances if channel is closed 2020-02-22 12:10:41 +01:00
SomberNight
56cb45df70
android build: fix accepting licenses 2020-02-21 20:08:32 +01:00
ThomasV
c2432aa125 kivy: set pin_code timeout to 5 minutes 2020-02-21 11:33:07 +01:00
ThomasV
570167a2c4 restrict lightning to p2wpkh wallets 2020-02-20 21:17:25 +01:00
ThomasV
238fb46d87 Lightning: Show sending and receiving capacity. Fixes #5967 2020-02-19 16:11:55 +01:00
ThomasV
b90cbeb0ba fix flake8 test 2020-02-18 14:05:28 +01:00
ThomasV
6696f40e36 follow-up previous commit: show onchain tx dialog for channel open/close transactions 2020-02-18 13:58:17 +01:00
ThomasV
feb47b0a6f Add lightning tx dialog (qt and kivy) 2020-02-18 13:02:18 +01:00
ThomasV
b3a3267ede follow-up a6302b3a12 2020-02-18 12:39:18 +01:00
SomberNight
a6302b3a12
fix wallet history order: incl both on-chain and LN, sorted by time
GUIs now respect order of wallet.get_full_history(), which is probably the sane
thing to do, given that is the order the "balance" column is calculated in.

fixes #5958
2020-02-17 16:33:54 +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
58a0a9b160 kivy send screen: always show field separators. fix on_clear. 2020-02-16 23:48:23 +01:00
ThomasV
eb28f57051 (minor) kivy: initialize invoice_popup 2020-02-16 19:32:18 +01:00
ThomasV
938fab86d1 detect redeemed channels (fix #5963) 2020-02-16 19:07:20 +01:00
ThomasV
e7c02f1935 switch menus: status <-> wallets 2020-02-15 18:36:55 +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
d6b4b19824 kivy: allow generic passwords for wallets 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
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
SomberNight
091f6ced58
android build: update buildozer and p4a versions
also update NDK version (new p4a demands it)
2020-02-13 02:25:04 +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
Alexander Roth
b6a5f6f2fc Added coloring to the AddressPopup dialog:
- Moved the coloring logic (address_colors) from tx_dialog.py to a new file electrum/gui/kivy/util.py
- Added background_color to <RefLabel> in main.kv
- Calling address_colors in the initialization of AddressPopup and setting the foreground and background color

Code cleanup spaces

Code cleanup spaces

Fixed typo
2020-02-01 18:16:26 +01:00
SomberNight
96fa03c11b
fix paying bip70 payment request with Kivy GUI 2019-12-31 03:37:50 +01:00
SomberNight
9b28f6df7b
wallet: encrypt storage by default
notably, now also in kivy
2019-12-19 14:22:47 +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
ThomasV
7a080352f8
Merge pull request #5809 from SomberNight/201911_invoice_paid_detection
wallet: better (outgoing) invoice "paid" detection
2019-11-29 18:24:08 +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
roth
2ce8dd460b Color-Code Addresses in Kivy UI (#5774)
* Added static coloring of the TX output dialog.

Coloring was suggested in #5750
2019-11-28 20:40:28 +00: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