* F541 fix
remove unused workflow and combine linters into one
add lnbits/static to ruff ignore
remote setupnode
ignore upgrades for mypy
ignore F401 for __init__ files
unused noqa
ignore upgrades for black
F821: undefine name
disabled and logged webhook_listener for opennode and lnpay because they are obvisouly not working
E402: module level import not at top of file
fixup
revert breaking changes wait for PR #1876https://github.com/lnbits/lnbits/pull/1876
E721 fixes, only popped up for python3.9 not 3.10
[REFACTOR] core/__init__ to not have circular import issues
WIP
add db for backwards compat
fix pyright
make mypy happy again
pyright did not catch those, i think mypy got confused with relative imports. maybe we should use absolute ones everywhere
E402: module level import not at top of file
dont forget to add core_app
rebase on ruff pr
f
remo
format
* fix clnrest
* ignore E402 in conftest
* refactoring issues
---------
Co-authored-by: jacksn <jkranawetter05@gmail.com>
* [BUG] self payments for fakewallet
make it possible to pay to yourself on fakewallet
f
* bugfix selfpayments for fakewallet
* delete by wallet and fix previous_payment check (#1919)
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* [FEAT] improve update_admin_settings
while working on the push notification pr i found it very hard just to update
2 settings inside the db, so i improved upon update_admin_settings.
now you just need to provide a dict with key/values you want to update inside db.
also debugging the endpoints for update_settings i found despite the type of `EditableSettings`
fastapi did in fact pass a dict.
* t
* use `EditableSettings` as param in update_settings
* fix settings model validation
we previously overrode the pydantic validation with our own method
* make `LnbitsSettings` a `BaseModel` and only add `BaseSettings` later
this allows us to instantiate `EditableSettings` without the environment values being loaded in
* add test
* forbid extra fields in update api
* fixup
* add test
* test datadir
* move UpdateSettings
* fix compat
* fixup webpush
---------
Co-authored-by: jacksn <jkranawetter05@gmail.com>
* push notification integration into core
added missing component
fixed bell working on all pages
- made pubkey global template env var
- had to move `get_push_notification_pubkey` to `helpers.py` because of circular reference with `tasks.py`
formay
trying to fix mypy
added py-vapid to requirements
Trying to fix stub mypy issue
* removed key files
* webpush key pair is saved in db `webpush_settings`
* removed lnaddress extension changes
* support for multi user account subscriptions, subscriptions are stored user based
fixed syntax error
fixed syntax error
removed unused line
* fixed subscribed user storage with local storage, no get request required
* method is singular now
* cleanup unsubscribed or expired push subscriptions
fixed flake8 errors
fixed poetry errors
* updating to latest lnbits
formatting, rebase error
fix
* remove unused?
* revert
* relock
* remove
* do not create settings table use adminsettings
mypy
fix
* cleanup old code
* catch case when client tries to recreate existing webpush subscription e.g. on cleared local storage
* show notification bell on user related pages only
* use local storage with one key like array, some refactoring
* fixed crud import
* fixed too long line
* removed unused imports
* ruff
* make webpush editable
* fixed privkey encoding
* fix ruff
* fix migration
---------
Co-authored-by: schneimi <admin@schneimi.de>
Co-authored-by: schneimi <dev@schneimi.de>
Co-authored-by: dni ⚡ <office@dnilabs.com>
* 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>
* 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
* [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>
* 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>
* fix: temp create account for `super_user_id` if missing
* chore: remove dumb import
* refactor: move logic outside `crud`
* feat: add uuid4 conversion
* fix: require valid string in .env file
* fix: update the `settings.super_user` value in case or normalisation for UUID4
* fix: allow long super_user
* chore: code format
* fix: add UI redirect with the normalized user
* fix: normalize `super_user` up one level
* fix: should normalize user in non-ui mode also
* initial backend support
* implement payments pagination on frontend
* implement search for payments api
* fix pyright issues
* sqlite support for searching
* backwards compatability
* formatting, small fixes
* small optimization
* fix sorting issue, add error handling
* GET payments test
* filter by dates, use List instead of list
* fix sqlite
* update bundle
* test old payments endpoint aswell
* refactor for easier review
* optimise test
* revert unnecessary change
---------
Co-authored-by: dni ⚡ <office@dnilabs.com>
* feat filters, add them to GET payments
* add limit and offset to filters (#1563)
* add limit and offset to filters
* move filters example to parse_filters doc string
* black
* add openapi docs
* remove example commentC
* improve typing and make nested filter possible in openapi
* typo in fn name
* readd Type
---------
Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com>
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
* BUG: proper exception for paid interal invoices
* test should now fail, because we pay invoice twice, and should also work in regtest
* sorting
* unpack check_internal
* introduce another crud fn for checking internal paid payment
* rename
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>