* 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>
* [refactor] pyln-client is not optional
some time ago we added pyln do main dependencies, its need for think like, saas or docker.
so this import was dead code
* stubs for pyln.client
* 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 simple caching utility
* test cache
* remove prefix, default on get
* check expiry in pop aswell
* remove unnecessary type
* improve invalidation task
increase default interval to 10 seconds - doesnt have to check that often.
instead of recreating the dict everytime mutate the existing one
* tests: hold invoice tests pending during payment
* sigh...
* ok
* hash preimage
* preimage_hash == payment_hash
* should error
* check that payment is gone
* cancel task while in-flight
* lnbits endpoing return error
* return error
* add both options
* fix list
* respond to error
* return false if payment status errors
* outgoing invoice should be deleted after one status check
* test api_payments_create error
* add hold invoices and basic test
* run request in parallel
* create_task
* dont cancel it
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
* 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
* make sidebar above tabs on mobile
* Can we add padding instead
* fix: add padding for small screen
* make bundle... again
---------
Co-authored-by: Ben <ben@arc.wales>
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
* better checking
* flake8 fix
* make format
* invoices scope are function for tests
* invoice back to sessionbut keep real_invoice for now
* make format
* comment
* get payment by checking id and test
* add github workflow for checking openapi
* verbose errors
* actual fix? remove env_names from BaseSettings class?
* dont kill process in workflow
* poetry version 1.5.1 for openapiu
* more reasonable default expiry
600 = 10 minutes which is a pretty short amount of time, for example when using lnbits fundingsource inside lnbits itself it would fail if you do a submarine swap or anything involved with hold invoices
i think 3600 = 1 hour should not make a difference in performance and is a way more reasonable expiry
* change default in .env.example
---------
Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>