[fix]: various issues discovered during testing (#3002)

* fix: prevent invalid calls to exchange APIs
* fix: audit conditions
* fix: audit filtering
This commit is contained in:
Vlad Stan
2025-02-27 07:45:29 +01:00
committed by GitHub
parent 89d85a0d7e
commit 048aff3db4
5 changed files with 17 additions and 10 deletions
+4 -1
View File
@@ -176,7 +176,7 @@ currencies = {
}
def allowed_currencies():
def allowed_currencies() -> list[str]:
if len(settings.lnbits_allowed_currencies) > 0:
return [
item
@@ -187,6 +187,9 @@ def allowed_currencies():
async def btc_rates(currency: str) -> list[tuple[str, float]]:
if currency.upper() not in allowed_currencies():
raise ValueError(f"Currency '{currency}' not allowed.")
def replacements(ticker: str):
return {
"FROM": "BTC",