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:
@@ -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())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user