related to https://github.com/lnbits/lnbits/pull/1855
put the `.super_user` into our data_dir to not pollute our root dir
removed the weird mention to the url in the logs and mention
the `lnbits-cli superuser` instead
this is a breaking change for the bundlers, `cat .super_user` is not good anymore.
fix would be `cat data/.super_user` but for future compatibility i recommend
using `poetry run lnbits-cli superuser`
* save fiat_amounts on payment creation
* show fiat amount in frontend
* add lnbits_default_accounting_currency
* extract fiat calculation logic into service
* move all currency conversions to calc_fiat_amounts
move all conversion logic into create_invoice so extensions can benefit aswell
* show user-defined and wallet-defined currency in frontend
* remove sat from fiat units
* make bundle
* improve tests
* debug log
* [CHORE] update mypy and new issues
lnbits/cache.py:21: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/extension_manager.py:210: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/db.py:110: error: Only instance methods can be decorated with @property [misc]
lnbits/tasks.py:152: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/tasks.py:171: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/core/services.py:520: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/app.py:520: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/app.py:525: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
lnbits/app.py:532: note: By default the bodies of untyped functions are not checked, consider using --check-untyped-defs [annotation-unchecked]
* fix db.py
* fix mypy notes, type were not needed
* [REFACTOR] WalletType into enum
- move wallettype models from decorators.py into models.py
- use enum instead of int
- use HTTPStatus for consistency
* Update lnbits/core/models.py
Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com>
* use dataclass
---------
Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com>
* remove unused and update black + precommit
* makefile add ruff remove unused
* F541 fix
* complete ruff ignore
* remove unused workflow and combine linters into one
add lnbits/static to ruff ignore
save preview and linelength for later
define target version for black
* ignore upgrades for mypy
* remove flake8
* ignore F401 for __init__ files
* unused pylint comment
* unused noqa
* ignore upgrades for black
* run linting on py3.9 and py3.10
* dont assume python
* add centralized task management
in order to properly cleanup all long-running tasks we have to keep a list of them
* use new task management functions
* unify shutdown events
* vlads suggestions
rename variable for create_task
wrap cancel() with try/catch
fixup
* rename func to coro
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>
* F821: undefine name
disabled and logged webhook_listener for opennode and lnpay because they are obviously not working
* E402: module level import not at top of file
* E721 fixes, only popped up for python3.9 not 3.10
* add send_payment_notification service
payment notifications are sent from multiple places with inconsistent and incomplete data
* adopt new send_payment_notification service
* add tests
* added ratelimiter
* Adds server logs to admin ui
* Added IP allow/ban list
* fixed remove ips
* Split rate limit number and unit
* security tab and background tasks for killswitch
* fix test for auditor api
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>
* Create cn.js
Add chinese translation
* added additional files for chinese language
* Update lnbits/templates/base.html
---------
Co-authored-by: hodlbaby <52352588+hodlbaby@users.noreply.github.com>
Co-authored-by: dni ⚡ <office@dnilabs.com>
* feat: limit number of available fiat currencies
* feat: Add allowed currency selector to Admin UI
* motorinas suggestions
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>