Commit Graph

25 Commits

Author SHA1 Message Date
callebtc
fa5193cd8f index on db and read spent proofs from db (#370)
* index on db and read spent proofs from db

* add benchmark for testing

* remove benchmark

* add option to disable cached secrets

* disable python 3.9 tests
2023-11-26 06:07:38 -03:00
callebtc
75e8428af7 Mint/add_cors_to_error_response (#312)
* add cors to error response and log validation errors

* shorten hash for invoices to avoid base64 escape characters
2023-09-08 15:21:14 +02:00
dni ⚡
e374d32df7 [CHORE] updating dependencies, mainly fastapi (#302)
* [CHORE] updating dependencies, mainly fastapi

i updated all lib that i could. :) test seem to pass

downgrade uvicorn for mypy to pass

chore

fixup

formatting

* make flake8 didnt flake tests
2023-08-24 11:09:07 +02:00
dni ⚡
88393fa4c4 [DEV] add ruff and remove isort and flake (#300)
* [DEV] add ruff and remove isort and flake
- precommit
- workflow
- Makefile

updated black

* configure black to use default line-length

* reformat to 88 chars line-length

* fix ugly comments
2023-08-24 09:47:47 +02:00
dni ⚡
e3ed00640f FEAT: Add flake8 (#267)
* init flake8

* exclude nostr client, and add ds_store to gitignore

* fix flake8 F811 issue, redefinition of unused variables

* add flake8 to workflow

* F401 unused imports

* F541 f-string is missing placeholders

* E501 line too long > 150 characters

* E722 no bare except

* E402 module level import not at top of file

* F405 no star imports

* E712 comparison to False should be 'if cond is False:'

* F841 local variable is assigned to but never used

* E266 too many leading '#' for block comment

* E265, E261

* E713 test for membership should be 'not in'

* E711, E741

E741 ambiguous variable name 'l'
E711 comparison to None should be 'if cond is None:'

* flake config

* isort

* refactor makefile flake8 usage

* reflaking the rebase

* black

* fix tests?

* black

* fix line lenght it test_cli

* sort out makefile

* fix strings

* reintroduce black-check

* reflake and mypy

* isort

* Update cashu/wallet/wallet.py

Co-authored-by: Angus Pearson <angus@toaster.cc>

* Update cashu/mint/ledger.py

Co-authored-by: Angus Pearson <angus@toaster.cc>

---------

Co-authored-by: Angus Pearson <angus@toaster.cc>
2023-07-28 18:42:16 +02:00
callebtc
3d676dd35f Add custom error types (#290)
* add error types

* better subclassing

* add response models

* fix comments

* add response_description to mint endpoints
2023-07-25 23:26:50 +02:00
callebtc
defcf7aac4 [Wallet] DB optimization for faster payments (#250)
* get rid of redundant proof loads

* fix test?

* fix one test?

* api: load_mint for invoice

* clean up tests
2023-06-11 00:10:07 +02:00
callebtc
68d9020cb3 mint: add trace logs (#213) 2023-05-14 23:06:35 +02:00
calle
89fb2787e6 Python/relative_import (#186)
* relative import all the things

* make format

* add __init__.py to cli/

* fix mypy errors

* get rid of more mypy

* mypy fix crud.py

* fix another mypy error
2023-05-01 22:39:23 +02:00
calle
f3a31fd09e use settings module (#136)
* use settings module
2023-03-16 00:59:50 +01:00
callebtc
f2327409c4 allow cors 2023-01-15 10:03:37 +01:00
calle
56e78de78a adds cors (#96)
* adds cors

* make format
2023-01-15 09:57:55 +01:00
callebtc
6f913e3cc9 make format 2022-10-15 00:59:21 +02:00
callebtc
ee16b3e0f9 disable starlette_context 2022-10-15 00:19:44 +02:00
callebtc
fe9de4cbca restart imports 2022-10-11 10:08:05 +02:00
callebtc
7c93daa05a make format 2022-10-10 21:53:25 +02:00
callebtc
370fe3b02b clean 2022-10-10 21:52:52 +02:00
callebtc
13b9cd17bd set context version in http middleware 2022-10-10 21:36:29 +02:00
callebtc
0cd24fcf31 remove unused imports 2022-10-10 21:26:09 +02:00
callebtc
080ae4b224 context 2022-10-10 21:17:53 +02:00
callebtc
af54161cb3 isort 2022-10-02 19:27:14 +02:00
callebtc
6789a87c14 pay to secret 2022-09-30 03:10:47 +02:00
callebtc
376d6a1772 swagger 2022-09-29 01:53:56 +02:00
callebtc
68bae0d1cf isort and flask remove 2022-09-28 17:57:45 +02:00
callebtc
001b5e24a0 refactor 2022-09-28 17:42:48 +02:00