mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-28 21:02:31 +02:00
revert self.wallet change
This commit is contained in:
@@ -53,13 +53,12 @@ class KeyChecker(SecurityBase):
|
|||||||
# FIXME: Find another way to validate the key. A fetch from DB should be avoided here.
|
# FIXME: Find another way to validate the key. A fetch from DB should be avoided here.
|
||||||
# Also, we should not return the wallet here - thats silly.
|
# Also, we should not return the wallet here - thats silly.
|
||||||
# Possibly store it in a Redis DB
|
# Possibly store it in a Redis DB
|
||||||
wallet = await get_wallet_for_key(key_value, self._key_type)
|
self.wallet = await get_wallet_for_key(key_value, self._key_type)
|
||||||
if not wallet:
|
if not self.wallet:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.UNAUTHORIZED,
|
status_code=HTTPStatus.UNAUTHORIZED,
|
||||||
detail="Invalid key or expired key.",
|
detail="Invalid key or expired key.",
|
||||||
)
|
)
|
||||||
self.wallet = wallet
|
|
||||||
|
|
||||||
except KeyError:
|
except KeyError:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
Reference in New Issue
Block a user