Ability to limit available fiat currencies (#1748)

* feat: limit number of available fiat currencies
* feat: Add allowed currency selector to Admin UI
* motorinas suggestions

---------

Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Yauhen Huchok
2023-06-19 12:24:19 +02:00
committed by GitHub
co-authored by dni ⚡
parent 150a33009d
commit 48fc73d9d4
5 changed files with 26 additions and 0 deletions
+6
View File
@@ -672,6 +672,12 @@ async def api_perform_lnurlauth(
@core_app.get("/api/v1/currencies")
async def api_list_currencies_available():
if len(settings.lnbits_allowed_currencies) > 0:
return [
item
for item in currencies.keys()
if item.upper() in settings.lnbits_allowed_currencies
]
return list(currencies.keys())