Commit Graph

482 Commits

Author SHA1 Message Date
blackcoffeexbt
c0c26fb98e
Extension list UI improvements (#769)
* Extensions list is now sorted alphabetically

* Added extension list search

* Prettified changes

* Removed console.log

* Code improvements based on motorina0 feedback

* Remove console.log from lnbits/templates/base.html

Run prettier
2022-07-23 10:46:30 +02:00
calle
96af5fc3a7
CI: Test core/views/generic.py (#772)
* Adds tests for GET /wallet

* Update `httpx` to `0.23.0` and `http-core` to `0.15.0` in `venv` installation path

* Fix `secp256k1 = "==0.14.0"` and `cffi = "==1.15.0"`
2022-07-23 10:39:58 +02:00
Tiago Vasconcelos
ed2c5cc586
Fix/lnurl auth (#757)
* remove g() and add wallet

* wallet type

* add wallet object

* send wallet as param

* make lnurlauth work

* remove g() and add wallet

* wallet type

* add wallet object

* send wallet as param

* make lnurlauth work

* black'ed

* blacked

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
2022-07-19 11:35:28 +02:00
callebtc
694124b5d6 require admin 2022-07-19 11:27:32 +02:00
callebtc
b2a0faf9de error check for pr 2022-07-19 11:21:54 +02:00
callebtc
8d52b1b359 check description hash 2022-07-19 11:15:11 +02:00
calle
f4580955b9
loguru warnings (#751) 2022-07-17 22:25:37 +02:00
calle
6646fce549
Core: add internal flag for invoice creation to use FakeWallet (#646)
* add internal flag for invoice creation to use FakeWallet
2022-07-17 14:34:25 +02:00
calle
f4e7d62ca3
make format everything (#743) 2022-07-16 14:23:03 +02:00
calle
63d4e60542
Testing: postgres db backend (#711)
* try postgres run

* fix yaml

* test with postgres

* check with postgres

* inkey_from

* remove trio

* add coverage

* add coverage

* more python testing

* use @pytest_asyncio.fixture

* remove unused imports

* fix api_payment payment lookup

* measure durations
2022-07-07 18:29:26 +02:00
calle
089313f613
Logging with loguru (#708)
* logging

* requirements

* add loguru dependency

* restore it

* add loguru

* set log level in .env file

* remove service fee print

* set log level

* more logging

* more logging

* more logging

* pyament.checking_id

* fix
2022-07-07 14:30:16 +02:00
Lee Salminen
94e4495026 run prettier 2022-07-05 16:16:46 -06:00
Lee Salminen
aa51d85d65 Merge branch 'main' into improved-pwa 2022-07-05 15:10:57 -06:00
Lee Salminen
ebeb3d213b alter injection of tpos to match 2022-07-05 15:09:04 -06:00
Lee Salminen
2cb87d96f2 better way of handling injection of webmanifests 2022-07-05 15:05:31 -06:00
calle
92887ed169
Format: prettier (#707)
* format: prettier

* gh-actions: add prettier checkg

* actions
2022-07-05 21:14:56 +02:00
Lee Salminen
56c60587a1 fix prettier 2022-07-05 09:14:24 -06:00
Lee Salminen
52b8506d0a reduce noise 2022-07-04 16:10:31 -06:00
Lee Salminen
d88ffeb237 segregate cache by api key header 2022-07-04 12:32:28 -06:00
Lee Salminen
d0ba5c6f30 Improved support for Progressive Web Apps (PWA)
- modify webmanifest to use LNBITS_SITE_TITLE and LNBITS_CUSTOM_LOGO env vars
- modify webmanifest to have a more accurate description, start_url and set theme_color to match default lnbits theme
- add service worker to cache requests (chrome requires a registered service worker to activate some pwa functionality)
- move webmanifest to <head> (chrome acts weird with it in the body)
2022-07-04 11:01:08 -06:00
Tiago vasconcelos
6154454f15 hotfix api_payments failing 2022-06-29 10:55:54 +01:00
calle
f6da260464
Automated tests (#566)
* 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
2022-06-27 00:11:46 +02:00
calle
2c68f53c91
/api/v1/payments with limit and offset (#594) 2022-06-26 19:05:34 +02:00
Arc
b90eb0a3ba
Merge pull request #648 from lnbits/black_formatting
Code cleanup: black formatting
2022-06-20 20:57:44 +01:00
ben
2ff282ce4c Chnaged to primary 2022-06-13 21:27:24 +01:00
calle
906f0166bd
Core: fix internal webhooks (#649)
* fix internal webhooks

* argument annotation
2022-06-03 14:33:31 +02:00
callebtc
f8400512f7 black formating 2022-06-01 14:53:05 +02:00
Arc
b4ad0e101d
Revert "Check invoice status outgoing" 2022-05-20 14:35:00 +01:00
Arc
313c40dc2b
Merge pull request #609 from ashkanjalaliQ/patch-1
Update _api_docs.html
2022-05-17 14:20:20 +01:00
Arc
2337471e45
Merge pull request #619 from lnbits/check_invoice_status_outgoing
Check invoice status outgoing
2022-05-17 14:17:41 +01:00
Tiago vasconcelos
98891b7680 get bookmark promp fired on new wallet 2022-05-17 12:16:41 +01:00
Tiago vasconcelos
c8aaf3377f clean logs 2022-05-16 11:23:34 +01:00
Tiago vasconcelos
caa23e6c9d key issues fixed 2022-05-16 11:21:30 +01:00
callebtc
ebd6d6d58b key check 2022-05-10 22:00:50 +02:00
callebtc
f08fbc2487 core: check_invoice_status for outgoing payments 2022-05-10 21:48:24 +02:00
Ashkan Jalali
d77e304e12
Update _api_docs.html
add "webhook" and "unit" arguments to api document
2022-04-28 17:07:58 +04:30
benarc
829e220096 another dependency 2022-04-16 11:18:27 +01:00
benarc
b5703e0dfc added dependency 2022-04-16 11:17:03 +01:00
benarc
c7322fd071 correct route 2022-04-16 11:15:42 +01:00
benarc
a6c84ceb61 Geberic QRcode maker
Added generic qrcode maker endpoint extensions can use to make embedable qrcodes
2022-04-16 11:14:34 +01:00
Tiago vasconcelos
13f490b586 Merge branch 'main' into fix/renameWallet 2022-04-12 10:19:31 +01:00
Tiago vasconcelos
950408ef64 Merge branch 'main' into fix/renameWallet 2022-04-01 10:42:16 +01:00
calle
b1c75813a0
fix decodepay (#568) 2022-03-24 12:50:57 +01:00
Tiago vasconcelos
c59d0a51ff change key on PUT request 2022-03-18 20:58:47 +00:00
calle
1209526147
remove get_payment_status (#562)
* remove get_payment_status

* remove comments
2022-03-18 18:51:28 +01:00
calle
0f97f8f18b
Fee reserve for lightning backends (#557)
* preparing fees

* fee_limit_msat

* await resp result

* clightning

* fix tests

* fix test

* add fee to test

* mypy

* invoice_status

* checking id fix

* fee reserve error message

* only for external payments
2022-03-16 07:20:15 +01:00
Ben Arc
435b4056fd fixed conversion api 2022-03-10 12:16:51 +00:00
Ben Arc
52ef2da76d added wrong key type 2022-03-08 22:22:51 +00:00
Ben Arc
e4dd0972a5 Wrong key int being returned 2022-03-08 22:15:45 +00:00
Ben Arc
c708cb1e2b Important fix to payment check 2022-03-07 18:27:03 +00:00
benarc
9bbf78e026 Assigned wallet var 2022-03-07 08:19:14 +00:00
benarc
d62ef0bb80 Added extra pay details 2022-03-07 08:08:08 +00:00
benarc
72f2ec0be8 Merge remote-tracking branch 'origin/main' into main 2022-03-07 04:26:40 +00:00
Arc
ef6d12fe10
Merge pull request #545 from talvasconcelos/fix/paymentsDecode
fix payments decode
2022-03-07 04:24:32 +00:00
benarc
5f52658626 Merge remote-tracking branch 'origin/main' into main 2022-03-07 04:05:43 +00:00
Joseph Pentland
baf55afc28
api: Fix conversion from fiat to satoshis (#516)
Conversion to satoshis incorrectly used data.to as fiat currency rather
than data._from.
2022-03-01 23:11:39 +03:00
benarc
e96701cb59 Added template banner 2022-02-24 16:03:10 +00:00
benarc
4a588dda1b Added ad space and option to turn off api docs 2022-02-23 13:51:30 +00:00
Tiago vasconcelos
eb7b369b6d fix payments decode 2022-02-22 16:45:35 +00:00
Tiago vasconcelos
a5a3331106 revert to fallback scheme + make request case insensitive 2022-02-22 16:23:50 +00:00
Arc
88df4266b7
Merge pull request #524 from lnbits/docs_api_add_unit_to_invoice
Fix fiat amount entry in invoice creation
2022-02-18 11:44:05 +00:00
callebtc
6496fac35f fill mask for fiat 2022-02-18 12:35:25 +01:00
Tiago vasconcelos
251ecb8f1d url_for params 2022-02-17 21:01:14 +00:00
calle
c626e12fa3
LNDHhub for fastapi with LIMIT (#499)
* add limit to get_payments

* add limit to lndhub

* fix defaults

* default memo

* add offset cluase

* offset for the api
2022-02-17 13:10:34 +01:00
callebtc
13a72d9a41 replace string with LNBITS_SITE_TITLE 2022-02-17 11:42:08 +01:00
callebtc
15c8557459 allow empty memo 2022-02-17 10:16:11 +01:00
callebtc
d559c604fa invoice without memo 2022-02-17 09:29:10 +01:00
callebtc
cd84623305 amount label adaptive to uni - look at me Im a frontent dev now 2022-02-17 09:14:07 +01:00
callebtc
9fb30080ab black 2022-02-16 22:42:27 +01:00
callebtc
30ab519c3a amount is float and sats are int 2022-02-16 22:41:12 +01:00
callebtc
914b9f3ffe allow amounts >0 2022-02-16 22:23:26 +01:00
Ben Arc
0367ee85a7 removed dense from lower buttons 2022-02-14 15:51:45 +00:00
Ben Arc
0aef9d4d9a Made dense to save space 2022-02-14 15:48:56 +00:00
Ben Arc
682226c4b6 chnaged button names 2022-02-14 15:36:10 +00:00
Ben Arc
c7e501ac08 Adds lower buttons to wallet UI for smaller screens 2022-02-14 15:29:10 +00:00
Arc
155c32504a
Update api.py 2022-02-14 11:31:42 +00:00
Arc
728ab517f5
Merge branch 'main' into fix/disapearingAdminExt 2022-02-11 11:17:37 +00:00
Tiago vasconcelos
6d58027147 remove print 2022-02-10 17:06:15 +00:00
Tiago vasconcelos
4a35f84e95 fix admin default false 2022-02-10 16:44:47 +00:00
benarc
b5aad94ecd rolled back admin fix 2022-02-10 13:55:45 +00:00
benarc
0f79213b0f Tals admin extension fix 2022-02-10 10:09:44 +00:00
Arc
da6a2e772b
Revert "fix disapearing admin extension" 2022-02-10 09:56:02 +00:00
Tiago vasconcelos
d1d62583c4 fix for whitespace in admin users list 2022-02-09 11:16:13 +00:00
Tiago vasconcelos
4c18eb0b34 fix disapearing admin extension 2022-02-09 10:57:24 +00:00
benarc
a7c65d5d60 Fixed admin debit input 2022-02-03 13:15:43 +00:00
benarc
50fcb15725 typo 2022-02-03 13:00:56 +00:00
benarc
75e78d2ab6 FakeWallet own denomination now working 2022-02-02 17:28:00 +00:00
benarc
568a1be91f Adding denomination for alternative currencies 2022-02-02 13:07:12 +00:00
Ben Arc
dab943baad fixed internal lnurl 2022-02-01 23:11:26 +00:00
Ben Arc
db734d4acd added hex 2022-02-01 23:04:40 +00:00
Ben Arc
3927545e32 fixed buggy lnurl checks 2022-02-01 21:22:20 +00:00
Ben Arc
3f0a855526 Black 2022-02-01 20:51:40 +00:00
Ben Arc
d2879aa80c added value to avoid error 2022-02-01 20:05:58 +00:00
Ben Arc
d1b390b929 Use scope instead of prop 2022-02-01 20:02:21 +00:00
Ben Arc
382622d5ac Fixed balance update not showing properly 2022-01-31 16:47:58 +00:00
Ben Arc
dbab181759 Admin users can credit accounts 2022-01-31 16:29:42 +00:00
benarc
228717195b back 2022-01-30 19:43:30 +00:00
calle
b4d00a490b
remove restriction for positive amount to check outgoing payments (#500) 2022-01-27 22:58:35 +01:00
Tiago Vasconcelos
918e9be7ed
Upgrade conversion endpoint (#491) 2022-01-14 09:19:30 -03:00
benarc
4e0e5b9956 Added conversion endpoint
Exposes fiat_amount_as_satoshis
2022-01-11 15:11:48 +00:00
Tiago vasconcelos
a00e46f629 Change _asdict() to dict() 2022-01-05 07:36:10 -03:00
mrbitcoiner
cdeccec01b 2% reserve only for external payments 2021-12-29 11:55:52 -03:00
calle
32ea1106f9
Crud webhook amount (#474)
* get_standalone_payment selects only incoming tx
2021-12-28 14:05:25 +00:00
benarc
4408f30285 removed print 2021-12-19 23:13:15 +00:00
benarc
fa23be7657 Added check fixed LNURL decode 2021-12-03 00:17:32 +00:00
benarc
907714838b Added check to explain fee reserve 2021-12-02 21:22:30 +00:00
benarc
69a4583203 wos debugging
lnurl debug

text identifier

text

try1

try2

debugging

more debug

...

....

hard code indentifier

.

more hard code

.

trying

revert

remove identifier

adding identifier...again

.

stupid

return text instead of json

htmlresponse

on more spin

.

added tag

revert to JSON return

.

ditch lnurl lib

.

..

..

clean prints
2021-12-01 21:55:04 +00:00
benarc
b9bc36fabf Merge remote-tracking branch 'origin/FastAPI' into FastAPI 2021-11-30 10:08:46 +00:00
Arc
b4ad8cb5b2
Merge pull request #443 from lnbits/fastapi_fix_lndrestwallet_fee_limit
(FastAPI) LNDRest fee limit
2021-11-30 09:04:01 +00:00
callebtc
12c2a04b2a LNDRest fee limit 2021-11-29 18:10:11 +01:00
Stefan Stammberger
3831bca9e2
fix: cleanup core/views/generic.py
* Fixed withdraw endpoint query params access
    was: request.query_params.get("usr")
    corrected: request.query_params.get("usr")
* Added missing response classes
* Removed old comments and commeted out code
* Deleted the unused auth_bearer.py file
2021-11-27 10:13:32 +01:00
Arc
ed198d3e7d
Merge pull request #435 from arcbtc/FastAPI
Cleanup and black
2021-11-26 05:59:10 +00:00
benarc
56397026c8 Chore, applied black 2021-11-26 05:58:20 +00:00
Stefan Stammberger
efec7cb8f0 Revert "chore: apply black to all .py files"
This reverts commit 83b7779972.
2021-11-26 05:56:30 +00:00
Tiago vasconcelos
2b0bd43974 clean prints 2021-11-25 17:26:46 +00:00
Tiago vasconcelos
b33f0ecae2 request issues again 2021-11-25 17:24:03 +00:00
Tiago vasconcelos
ae50b909eb again 2021-11-25 17:19:49 +00:00
Tiago vasconcelos
98a55bf0df request client 2021-11-25 17:12:41 +00:00
Tiago vasconcelos
4fff5c3b7a missing request 2021-11-25 17:08:20 +00:00
Stefan Stammberger
83b7779972
chore: apply black to all .py files 2021-11-24 14:31:55 +01:00
Arc
09ccf01fbb
Merge pull request #429 from arcbtc/FastAPI
added lnaddresss for testing
2021-11-24 08:56:13 +00:00
benarc
b122debd8c Merge remote-tracking branch 'arcbtc/lnaddress' into FastAPI 2021-11-24 08:42:14 +00:00
Arc
a3d2e43a4c
Merge pull request #418 from arcbtc/FastAPI
Posgres support
2021-11-15 20:46:49 -06:00
Tiago vasconcelos
e8882645c4 remove IF NOT EXISTS in CREATE VIEW 2021-11-15 21:45:13 +00:00
callebtc
bec0b1d1fe fix db connect 2021-11-13 11:42:11 +01:00
fiatjaf
0331861cc6 prevent pay_invoice from locking sqlite for the entire app. 2021-11-12 13:05:10 -03:00
benarc
267dea4f75 black 2021-11-12 04:14:55 +00:00
Ben Arc
cbc24a8fa5 Changed optional unit to sat 2021-11-09 22:25:20 +00:00
Ben Arc
1b46b61da9 changed see endpoint key back 2021-11-09 20:50:00 +00:00
Ben Arc
81d8d4e218 plugged few key issues 2021-11-09 17:44:05 +00:00
Ben Arc
a50c7b6e3a Added some IF NOT EXISTS to avoid errors on startup 2021-11-09 15:17:44 +00:00
benarc
114a6f1fed Made memo optional in model 2021-11-04 12:57:28 +00:00
benarc
43e016633b fixed unit check 2021-11-03 12:09:39 +00:00
benarc
3750dcfd0e fixed descrhash check 2021-11-03 12:03:48 +00:00
benarc
afbe46be8b reverted memo default 2021-11-03 11:49:13 +00:00
benarc
0c0e6e9275 chnaged memo back from optional 2021-11-03 11:23:16 +00:00
benarc
4fe45b34d1 added default memo value 2021-11-03 11:19:51 +00:00
benarc
3336767057 made default meme 2021-11-03 11:14:41 +00:00
benarc
97e4ced2f4 fixed bug 2021-11-03 11:07:01 +00:00
benarc
52455e14cd tweaked create_invoice 2021-11-03 11:02:33 +00:00
benarc
abff990ec3 Changed lnbits wallet check to detail from message 2021-11-03 10:29:39 +00:00
benarc
c734526bc1 reverted exception 2021-11-03 10:12:14 +00:00
benarc
00ec6f2af3 added NOT_FOUND to check payment endpoint, rather than OK 2021-11-03 09:49:52 +00:00
benarc
9630d8b363 restored create invoice api endpoint 2021-11-02 16:29:15 +00:00
Tiago vasconcelos
aff29663af lnaddress_ext proposal untested 2021-10-29 16:43:26 +01:00
Tiago vasconcelos
a276764f12 wallet fiat conversion fix 2021-10-29 13:06:59 +01:00
Tiago vasconcelos
55023fa85b fix delete wallet 2021-10-25 19:26:21 +01:00
benarc
e03370188a Fixed payment checking 2021-10-22 00:41:30 +01:00
Ben Arc
19df2f888b Added decode lnurl and extra payment check 2021-10-20 03:59:24 +01:00
Ben Arc
b6f5052da0 trying to fix payment check 2021-10-20 03:28:31 +01:00