general cleanup and unused imports removal
This commit is contained in:
@@ -22,20 +22,16 @@ from .crud import get_withdraw_link_by_hash, update_withdraw_link
|
||||
name="withdraw.api_lnurl_response",
|
||||
)
|
||||
async def api_lnurl_response(request: Request, unique_hash):
|
||||
print("NOT UNIQUE")
|
||||
link = await get_withdraw_link_by_hash(unique_hash)
|
||||
|
||||
if not link:
|
||||
raise HTTPException(
|
||||
status_code=HTTPStatus.NOT_FOUND, detail="Withdraw link does not exist."
|
||||
)
|
||||
# return ({"status": "ERROR", "reason": "LNURL-withdraw not found."},
|
||||
# HTTPStatus.OK,
|
||||
# )
|
||||
|
||||
|
||||
if link.is_spent:
|
||||
raise HTTPException(
|
||||
# WHAT STATUS_CODE TO USE??
|
||||
detail="Withdraw is spent."
|
||||
)
|
||||
url = request.url_for("withdraw.api_lnurl_callback", unique_hash=link.unique_hash)
|
||||
@@ -52,9 +48,6 @@ async def api_lnurl_response(request: Request, unique_hash):
|
||||
|
||||
# CALLBACK
|
||||
|
||||
#https://5650-2001-8a0-fa12-2900-4c13-748a-fbb9-a47f.ngrok.io/withdraw/api/v1/lnurl/cb/eJHybS8hqcBWajZM63H3FP?k1=MUaYBGrUPuAs8SLpfizmCk&pr=lnbc100n1pse2tsypp5ju0yn3w9j0n8rr3squg0knddawu2ude2cgrm6zje5f34e9jzpmlsdq8w3jhxaqxqyjw5qcqpjsp5tyhu78pamqg5zfy96kup329zt40ramc8gs2ev6jxgp66zca2348qrzjqwac3nxyg3f5mfa4ke9577c4u8kvkx8pqtdsusqdfww0aymk823x6znwa5qqzyqqqyqqqqlgqqqqppgq9q9qy9qsq66zp6pctnlmk59xwtqjga5lvqrkyccmafmn43enhhc6ugew80sanxymepshpv44m9yyhfgh8r2upvxhgk00d36rpqzfy3fxemeu4jhqp96l8hx
|
||||
|
||||
|
||||
@withdraw_ext.get(
|
||||
"/api/v1/lnurl/cb/{unique_hash}",
|
||||
name="withdraw.api_lnurl_callback",
|
||||
@@ -126,7 +119,6 @@ async def api_lnurl_callback(
|
||||
name="withdraw.api_lnurl_multi_response",
|
||||
)
|
||||
async def api_lnurl_multi_response(request: Request, unique_hash, id_unique_hash):
|
||||
print("UNIQUE")
|
||||
link = await get_withdraw_link_by_hash(unique_hash)
|
||||
|
||||
if not link:
|
||||
|
||||
Reference in New Issue
Block a user