black formatting

This commit is contained in:
Ben Arc
2021-04-09 00:41:19 +01:00
parent 6a18766a82
commit d872f0d138
8 changed files with 98 additions and 28 deletions
+9 -2
View File
@@ -30,7 +30,10 @@ async def api_wallets_retrieve():
try:
return (
jsonify([wallet._asdict() for wallet in await get_watch_wallets(g.wallet.user)]), HTTPStatus.OK
jsonify(
[wallet._asdict() for wallet in await get_watch_wallets(g.wallet.user)]
),
HTTPStatus.OK,
)
except:
return ""
@@ -57,7 +60,9 @@ async def api_wallet_retrieve(wallet_id):
)
async def api_wallet_create_or_update(wallet_id=None):
try:
wallet = await create_watch_wallet(user=g.wallet.user, masterpub=g.data["masterpub"], title=g.data["title"])
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)
@@ -81,6 +86,7 @@ async def api_wallet_delete(wallet_id):
#############################ADDRESSES##########################
@watchonly_ext.route("/api/v1/address/<wallet_id>", methods=["GET"])
@api_check_wallet_key("invoice")
async def api_fresh_address(wallet_id):
@@ -110,6 +116,7 @@ async def api_get_addresses(wallet_id):
#############################MEMPOOL##########################
@watchonly_ext.route("/api/v1/mempool", methods=["PUT"])
@api_check_wallet_key("admin")
@api_validate_post_request(