Add deleted flag wallet (#1826)
* add deleted flag on wallets set deleted on delete wallet 2 twelves format fail on create invoice make deleted check on SQL query nazi flake8 add_test boom... it works and passes!! * add app fixture vlad's recommendations add deleted * Add deleted flag to Wallet * restore crud * do not check for wallet in services.py * add deleted flag on wallets set deleted on delete wallet 2 twelves format fail on create invoice make deleted check on SQL query nazi flake8 add_test boom... it works and passes!! * add app fixture vlad's recommendations * add deleted * error checks --------- Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
co-authored by
callebtc
parent
6773a0f533
commit
576e20d0cd
@@ -466,7 +466,7 @@ async def api_payment(payment_hash, X_Api_Key: Optional[str] = Header(None)):
|
||||
# We use X_Api_Key here because we want this call to work with and without keys
|
||||
# If a valid key is given, we also return the field "details", otherwise not
|
||||
wallet = await get_wallet_for_key(X_Api_Key) if isinstance(X_Api_Key, str) else None
|
||||
|
||||
wallet = wallet if wallet and not wallet.deleted else None
|
||||
# we have to specify the wallet id here, because postgres and sqlite return
|
||||
# internal payments in different order and get_standalone_payment otherwise
|
||||
# just fetches the first one, causing unpredictable results
|
||||
|
||||
Reference in New Issue
Block a user