closes#1954
this PR add cache busting to `/static`
additionally i combined `lnbits/core/static` with `lnbits/static`, it was not necessary and added a lot of duplicate code for cache busting. now you have to include all static files inside the html files with `{{ static_url_for("static", "app.css" ) }}`
Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
* replace async_wrap with run_sync
formatting
remove unused fn
properly raise exception, not for timeout though
* [TEST] proper startup and shutdown (#1860)
* add proper startup / shutdown in tests
* fix event loop issues
because uvloop was installed in server.py which is not the main entry point when tests are ran.
this caused the loops referenced by the locks and queues to be a different one than the one used to run the tests
(only an issue in python 3.9)
* give openapi more time, does not matter anyway, regtest takes way longer
---------
Co-authored-by: jacksn <jkranawetter05@gmail.com>
remove uvloop
* fix test
* dont touch pyproject
* fix: install uvloop in conftest
not using uvloop at all causes tests to take way longer
---------
Co-authored-by: jacksn <jkranawetter05@gmail.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 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
* remove static/vendor
* add node dependencies
* add bolt11-decoder
* run npm install inside dockerimage
* only use bundle.js and bundle.css
* use node_modules for bundling vendor assets
* remove dead code
* make argument optional
* reintroduce vendor dir
* reintroduce vendor and single javascript files, minification
* wrong moment, remove minification
* lock packages with non critical issues
* black
* initial commit and still draft, ready for review
* forgot to uncomment this line
* fee estimation and blockheight
* resolve conversation with michael, to use mempool websockets instead of boltz status event
* Update lnbits/extensions/boltz/boltz.py
Co-authored-by: michael1011 <me@michael1011.at>
* add status to swaps, add sorting and data into listing
* add swap status checks, change urls to docker test setup, dynamic minimum and maximum limits
* fix docker hosts for development
* add api endpoints to _api_docs
* add wallet name and id, to list and status information
* fix status_update for reverse_swaps
* chore: format with black
* more blackformatting and refactoring create_swap()
* fix variable bug
* check if swap is already refunded
* use create_task instead of ensure_future
* add mempool and boltz urls depending on DEBUG .env
* raise exception in mempool fails
* fix onchain txs, sending funds to wrong address and add a refund address for normal swaps beforehand
* add status to swaps, add sorting and data into listing
* add swap status checks, change urls to docker test setup, dynamic minimum and maximum limits
* add wallet name and id, to list and status information
* fix status_update for reverse_swaps
* chore: format with black
* use create_task instead of ensure_future
* add mempool and boltz urls depending on DEBUG .env
* fix onchain txs, sending funds to wrong address and add a refund address for normal swaps beforehand
* black formatting
* add some logging with loguru, and remove function duplication
* cleanup readme
* updates/suggestions from calle
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
* remove unused comments
* Update API Endpoints
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
* un-factor get_boltz_pairs
* added a explaination for the onchain tx
* remove unused template file
* rename api endpoints
* fix isort and prettier
* more verbose logging!!
* add boltz to mock_data.zip
* new mockdata
* remove comment
* better readme
* fix mempool urls
* change /refund /check /status to post requests
* first step in tests2
* add first tests
* change refund,check,status to post requests
* next try on tests
* overall code improvements
* just testing tests
* throw http exceptions in views_api
* require admincheck for refund,check,status and added fastapi documentation for those
* added more tests
* black
* many code improvements
* adding tests
* temp fix test
* fix race condition when pay_invoice fails
* test are working
* add boltz env variables
* add startup check, bugfixes, improvements
* improve on status checking
* remove check_invoice_status
* more fixes and tests
* testing testing testing
* make tests run again inside regtest
* fix bad error :O
* fix postgres boolean bug and add swap test
* Update README.md
Update README.md
Update README.md
Update README.md
* some mypy
* blacked
* the missing commit?
* fix api_docs readme link
* better refunding error catching
fix
* check swaps now also shows pending reverse swap, ui improvements, tooltips
* add backend check for boltz limits
fixup
* many improvements, startup check for swaps working, reverse needs more testing
* little last fixes
* remove unused logic
* fastapi documentation
fixup
* formatting and remove unused tests
* fix test
* fix swapstatus model
* Update lnbits/extensions/boltz/tasks.py
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
* Update lnbits/extensions/boltz/views_api.py
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
* balance check msg, format
* fix mypy data override
* fix swapstatus, remove can refund column
* Update lnbits/extensions/boltz/README.md
Co-authored-by: michael1011 <me@michael1011.at>
* empty lines
* fix error message when swap is not found
* remove preimage_hash from database
* fix api_docs html
fix api_docs html
* catch boltz network exceptions better
* formatting
* check for timeout on swap at get request
Co-authored-by: michael1011 <me@michael1011.at>
Co-authored-by: fusion44 <some.fusion@gmail.com>
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
* black and isort for tests
* black and isort for build
* use poetry in Makefile, update pyproject.toml dependencies and add configs for black, pytest, mypy, isort there
* switching github workflow to poetry
* set mininum version to python 3.7
* fix tests
* add types-protobuf to dev packages
* fix cln regtest
* update docs
* try fix 1
* mypy fix2
* fix isort formatting workflow
* add prettier to dev docs
* multiple valid python version for pyproject
* update poetry.lock
* remove development installation, not needed anymore
* fix migration workflows
* format into one test
* fix yaml
* fix pipeline
* fix pipeline
* fix again
* fix
* rename checks
* remove venv tests
* venv test once
Co-authored-by: dni <dni.khr@gmail.com>
* return error for wrong key
* payment check use key dependency
* more expressive error
* re-add optional key
* more tests
* more
* more granular
* more testing
* custom event_loop
* tests work
* fix lots of mypy errors
* test_public_api
* both files
* remove unused import
* tests
* tests working
* rm empty file
* minimal test
* set FAKE_WALLET_SECRET="ToTheMoon1"
* set FAKE_WALLET_SECRET="ToTheMoon1"
* trial and error
* trial and error
* test postgres
* test postgres
* test postgres
* test postgres
* test postgres
* test postgres
* test build
* skip mypy
a big refactor that:
- fixes some issues that might have happened (or not) with asynchronous
reactions to payments;
- paves the way to https://github.com/lnbits/lnbits/issues/121;
- uses more async/await notation which just looks nice; and
- makes it simple(r?) for one extension to modify stuff from other extensions.