add descriptor support

This commit is contained in:
Stepan Snigirev
2021-04-07 19:27:26 +02:00
parent 96082978d1
commit a27a3885f3
4 changed files with 72 additions and 28 deletions
+4 -1
View File
@@ -56,7 +56,10 @@ async def api_wallet_retrieve(wallet_id):
}
)
async def api_wallet_create_or_update(wallet_id=None):
wallet = await create_watch_wallet(user=g.wallet.user, masterpub=g.data["masterpub"], title=g.data["title"])
try:
wallet = await create_watch_wallet(user=g.wallet.user, masterpub=g.data["masterpub"], title=g.data["title"])
except Exception as e:
return jsonify({"message": str(e)}), HTTPStatus.BAD_REQUEST
mempool = await get_mempool(g.wallet.user)
if not mempool:
create_mempool(user=g.wallet.user)