Import resilience (#463)

This commit is contained in:
Kim Neunert 2020-09-30 11:05:31 +02:00 committed by GitHub
parent 81ddbbe8d9
commit 19923700e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -9,6 +9,7 @@
- [How to run](#how-to-run)
- [Using the Specter Desktop app](#using-the-specter-desktop-app)
- [Installing Specter from Pip](#installing-specter-from-pip)
- [Connect Specter to Bitcoin Core](#connect-specter-to-bitcoin-core)
- [Detailed instructions](#detailed-instructions)
- [Errors, doubts.. Read our FAQ!](#errors-doubts-read-our-faq)
- [A few screenshots](#a-few-screenshots)

View file

@ -351,8 +351,12 @@ def general_settings():
as_attachment=True
)
elif action == "restore":
restore_devices = json.loads(request.form.get("restoredevices", "[]"))
restore_wallets = json.loads(request.form.get("restorewallets", "[]"))
restore_devices = []
restore_wallets = []
if request.form.get("restoredevices", ""):
restore_devices = json.loads(request.form.get("restoredevices", "[]"))
if request.form.get("restorewallets", ""):
restore_wallets = json.loads(request.form.get("restorewallets", "[]"))
for device in restore_devices:
with fslock:
with open(