Commit Graph

785 Commits

Author SHA1 Message Date
Vlad Stan
7e2b1e65a0 fix: super-user is a special read-only value that is logged to the console 2022-12-12 10:12:35 +02:00
Vlad Stan
bed2eff7fb fix: send_admin_user_to_saas is not a settings method 2022-12-12 09:45:08 +02:00
calle
5d6d1fb87f
Merge pull request #1033 from lnbits/startup/skip_invoice_expriy_check
On-the-fly invoice expiry check
2022-12-11 11:54:11 +01:00
Vlad Stan
e28dea97d8 fix: update the in-memory settings object when the DB is updated 2022-12-09 14:53:51 +02:00
Vlad Stan
6252119485 fix: add super_user to the lnbits_admin_users list 2022-12-09 14:53:09 +02:00
Vlad Stan
99e7bf5cd0 chore: code format 2022-12-09 14:09:16 +02:00
Vlad Stan
4cd2fe7ee1
Merge branch 'main' into FinalAdminUI 2022-12-09 14:06:47 +02:00
Vlad Stan
d6d42250a9 refactor: use JSON for settings 2022-12-09 13:14:22 +02:00
Vlad Stan
0d4954c01a chore: temp commit (does not work); don't want to lose changes 2022-12-09 09:46:30 +02:00
Vlad Stan
d15782521d refactor: include admin extension into core 2022-12-08 15:41:52 +02:00
callebtc
0538035084 msat values are ints 2022-12-08 14:33:52 +01:00
Tiago Vasconcelos
61c3476ba7 fix display columns for hide api and or ad space 2022-12-08 11:46:44 +00:00
callebtc
ab4a9370e7 style: make format 2022-12-07 14:57:10 +01:00
callebtc
5f4fa61310 refactor:depend_admin_user 2022-12-07 14:56:45 +01:00
dni ⚡
c189ec49e5 add superuser class to obscure superuser_id for admin in the ui 2022-12-07 11:00:48 +01:00
callebtc
e15cfeb943 print only if migration takes place 2022-12-06 21:05:09 +01:00
callebtc
6eb9c5d9ee better sort sql clause 2022-12-06 21:04:10 +01:00
callebtc
6f5f7753ef fix audit endpoint 2022-12-06 20:58:09 +01:00
callebtc
3bb11dc487 separate migrations 2022-12-06 16:21:19 +01:00
callebtc
36cebffbf5 clean migration 2022-12-06 13:23:51 +01:00
callebtc
07724eaa0f clean up if clause 2022-12-06 13:21:34 +01:00
callebtc
269ea0f975 optional expiry (float now) in Payment model 2022-12-06 13:08:36 +01:00
callebtc
8c324d8634 make format 2022-12-06 10:48:34 +01:00
callebtc
441d5337a3 fix expiry integer 2022-12-06 10:48:16 +01:00
dni ⚡
c56a31e6f5 add superuser and refactor check_admin function, also put it into satspay 2022-12-05 20:41:23 +01:00
dni ⚡
12b0ec138d removed unused file 2022-12-05 15:37:01 +01:00
callebtc
32448c4b0c on-the-fly deletion 2022-12-02 18:55:53 +01:00
callebtc
167c2ce9f1 make format 2022-12-02 18:51:52 +01:00
callebtc
7a6450f032 add expiry to Payment model 2022-12-02 18:51:18 +01:00
callebtc
2134b63cea readd comments 2022-12-02 17:48:47 +01:00
callebtc
1a98f15d48 remove STARTUP_INVOICE_EXPIRY_CHECK 2022-12-02 17:39:56 +01:00
callebtc
4e69924c9c fix datetime conversion 2022-12-02 17:38:36 +01:00
Tiago Vasconcelos
fe5e1241bf fix some of Vlad's review comments 2022-12-02 14:52:31 +00:00
Tiago Vasconcelos
4410968bf5 enable disable ads and display ads 2022-12-02 14:36:09 +00:00
callebtc
79ffbb7bc2 merge main 2022-12-02 11:23:20 +01:00
ben
8ca390e0b0 format 2022-12-01 18:41:58 +00:00
benarc
a220acb583 Removed id, using param instead 2022-12-01 14:41:57 +00:00
benarc
4aeb7683e5 Added Response 2022-12-01 13:15:46 +00:00
Tiago Vasconcelos
3ff14cb71b change status code to 400 on exception 2022-12-01 12:21:25 +01:00
dni ⚡
86d2780c9f fix template typos and also update settings in memory after a admin PUT 2022-11-30 23:47:52 +01:00
ben
9a9733c1ce Auto stash before merge of "universalwebsocket" and "origin/universalwebsocket" 2022-11-29 11:23:34 +00:00
Arc
a7fd44f4ca
Merge branch 'main' into universalwebsocket 2022-11-29 11:12:28 +00:00
ben
31d9f2e2ee Removed returns and reverted socket check so multiple clients can join 2022-11-29 11:09:54 +00:00
Tiago Vasconcelos
b68172696d change status code to 400 on exception 2022-11-29 10:28:19 +00:00
ben
187d709098 isort 2022-11-28 13:28:11 +00:00
ben
bb84f6b0e8 Black 2022-11-28 13:24:10 +00:00
ben
aefd1fad69 isort 2022-11-28 13:13:45 +00:00
ben
746e119046 added vlads suggestion 2022-11-28 13:04:35 +00:00
ben
00123d6c16 Merge remote-tracking branch 'origin/main' into universalwebsocket 2022-11-28 12:29:34 +00:00
dni ⚡
a92bb03664 merge from main 2022-11-24 14:37:50 +01:00
dni ⚡
74eece78de merge from master 2022-11-24 14:35:32 +01:00
ben
3cea3a0ba8 Removed payments websocket example
To be prob added back at a later date
2022-11-24 11:18:38 +00:00
Arc
e1b44a000b
Merge pull request #1140 from motorina0/fix_cln_unhashed_description
fix: allow both `description_hash` and `unhashed_description` to be present
2022-11-24 02:57:42 -08:00
ben
dce4da96b7 fixed function name clash 2022-11-24 00:46:39 +00:00
ben
c2a737ab84 Black 2022-11-24 00:34:46 +00:00
ben
f876f0659f Moved into correct files, and added payment example 2022-11-24 00:21:39 +00:00
ben
fde128e961 Better naming 2022-11-23 23:35:02 +00:00
ben
cea4f9350c black 2022-11-23 22:42:32 +00:00
ben
152991fbec added try for return 2022-11-23 22:31:11 +00:00
ben
2f08255e92 added get option 2022-11-23 22:27:09 +00:00
ben
4b707b5a30 updated function names 2022-11-23 22:22:33 +00:00
ben
51ca515d26 renamed for clarity 2022-11-23 21:51:32 +00:00
ben
5a96bcd558 Adds universal websocket manager any extension can use
Connect to the `ws://<your-lnbits>/api/v1/ws/{item_id}` endpoint

POST data to the websocket with `https://<your-lnbits>/api/v1/ws/{item_id}`
2022-11-23 21:47:26 +00:00
ben
390d74eaf6 prettier 2022-11-23 16:57:27 +00:00
Vlad Stan
3edbe1b895 fix: allow both description_hash and unhashed_description to be present 2022-11-22 11:52:29 +02:00
ben
27ad32eede slight ui tweak for mobile 2022-11-20 18:06:29 +00:00
ben
0836ba6c77 Added to homescreen 2022-11-20 17:59:43 +00:00
ben
0c94b159e2 Improved ad space function 2022-11-20 17:29:07 +00:00
Vlad Stan
ea1d9eb088
Merge pull request #1116 from lnbits/add/add_tpos_last_tx_list
Add the ability to check for last (5) transactions
2022-11-18 13:13:55 +02:00
Tiago Vasconcelos
4549190e86 abstract get latest payments for extensions 2022-11-17 12:59:40 +00:00
ChuckNorrison
1971b9a24b
fix integer out of range for apipayments
related to #1030, this was missing
2022-11-16 23:06:21 +01:00
dni ⚡
e670b53412 fix WALLET initialisation 2022-10-25 09:24:14 +02:00
dni ⚡
f9de542361 use new settings and remove unused amdin extension stuff 2022-10-25 09:23:30 +02:00
dni ⚡
cede3317f3 prettier 2022-10-25 09:20:16 +02:00
dni ⚡
bfff5f3775 fix ADMIN_UI=false errors 2022-10-25 09:20:16 +02:00
dni ⚡
11393ef7e9 fix AD_SPACE 2022-10-25 09:20:16 +02:00
dni ⚡
a6bdd8c575 format 2022-10-25 09:20:16 +02:00
ben
3129692ab1 reverted other try 2022-10-25 09:20:16 +02:00
ben
429217f5a4 Had to add a couple of tries 2022-10-25 09:20:16 +02:00
Tiago vasconcelos
a07fbf0187 allow user settings without restart 2022-10-25 09:20:16 +02:00
Tiago vasconcelos
2a63fb1914 allow html to be passed to description 2022-10-25 09:20:16 +02:00
Tiago vasconcelos
48d6a89e5b remove core admin.html 2022-10-25 09:20:16 +02:00
Tiago vasconcelos
b4885de9e2 remove core admin html (renamed for now) 2022-10-25 09:20:16 +02:00
benarc
a3b1d9528c old admin setup UI 2022-10-25 09:20:16 +02:00
dni ⚡
09cf654427
Proper Error Handling for qrcode-stream components (#1076)
* proper errorhandling for camera

* fix javascript for calle
2022-10-24 12:32:20 +02:00
Anton Kovalenko
193d037ad6
Allow more than 2-nd level domain in incoming ln-addresses (#914) 2022-10-24 12:23:11 +02:00
calle
d1302e4868
show progress (#987) 2022-10-11 08:52:39 +02:00
Arc
00667badfd
Merge pull request #1022 from tehelsper/main
Add MYNODE Image
2022-10-06 17:50:31 +01:00
callebtc
efc024e1c0 check expiry upon payment creation 2022-10-05 14:17:23 +02:00
calle
5a12f4f237
Improved SSE listeners (#865)
* logging listeners

* comments

* generate privkey upon init

* listener queue

* remove duplicate check

* make format

* reuse channel

* error handling in sse listener

* uuid for listeners

* register named invoices

* uuid for listeners and listener list

* fix poetry lock

* setuptools

* requirements asyncio timeout

* setuptool;s

* make format

* remove async-timeout

* async_timeout readd

* try lower setuptools version

* try lower lower setuptools version

* back to current version + fix, maybe

* fix worflows to use poetry 1.2.1

* remove uneeded setuptools from build-system

* fix up formatting workflow

* debug to trace

* more traces

* debug logs to trace

Co-authored-by: dni  <office@dnilabs.com>
2022-10-04 09:51:47 +02:00
Taylor Helsper
148789a86f
Fix formatting 2022-09-30 10:19:17 -05:00
Taylor Helsper
04cfdc2bf3
Update index.html 2022-09-29 23:06:45 -05:00
dni ⚡
325139066c
fix service-worker.js issue #1009 (#1017)
* service-worker.js fix for issue #1009

fixup

* remove weird comment
2022-09-29 20:40:58 +02:00
Gene Takavic
e75610a04f
API auditor (#1002)
* just quick auditor

* fix for none balance

* handle node down case

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2022-09-23 16:33:51 +03:00
dni ⚡
a98c5f9a85
fixes issue #977 (#999)
* fixes issue #977

* fix prettier formatting, when pre-commit
2022-09-23 11:00:45 +03:00
calle
b0bedd53df
Fix lndgrpc preimage (#998) 2022-09-22 11:15:28 +03:00
calle
e7a6e86e7a
Fix/duplicate payments (#973)
* check if wallet exists

* check wallet existence in key check

* fix duplicate removal
2022-09-18 16:27:03 +03:00
calle
232d50baaa
Fix: tasks.py reuse db connection for invoice deletion (#971)
* check if wallet exists

* check wallet existence in key check

* reuse db connection for payment deletion
2022-09-15 14:48:59 +03:00
Arc
2782a92aaa
Merge pull request #957 from iWarpBTC/fix/withdrawQR
fix for uppercase QR
2022-09-13 15:49:27 +01:00
Arc
9e652d98ea
Merge pull request #958 from AaronDewes/patch-1
Change message about login functionality
2022-09-13 15:48:37 +01:00
calle
d0ca0b18da
Fix/db reuse connection mark pending (#964)
* check if wallet exists

* check wallet existence in key check

* reuse connection for stataus update

* make format
2022-09-12 20:57:23 +03:00
calle
1660b9dcf1
Revert "Revert "API key check: assert that wallet exists (#961)" (#962)" (#963)
This reverts commit 57fffa0c7f.
2022-09-12 18:49:57 +03:00
calle
57fffa0c7f
Revert "API key check: assert that wallet exists (#961)" (#962)
This reverts commit 0930fca7ec.
2022-09-12 18:41:27 +03:00
calle
0930fca7ec
API key check: assert that wallet exists (#961)
* check if wallet exists

* check wallet existence in key check
2022-09-12 18:39:53 +03:00
dni ⚡
d6e3eb5837
Fix donate link on start page 2022-09-12 14:38:37 +02:00
Aaron Dewes
b8531f9e0e
Change message about login functionality
According to the README, Lnbits is already at 0.9. Claiming a feature will be added in 0.2 doesn't make sense.
2022-09-12 12:32:03 +02:00
Gene Takavic
8c75ea600f
fix for uppercase QR 2022-09-12 10:17:45 +02:00
calle
4662a79c3b
little more logging (#953) 2022-09-09 16:46:27 +03:00
calle
d757154125
print time of expiration (#952) 2022-09-09 16:27:37 +03:00
calle
2ee10e28c5
Backend: Unstuck outgoing payments (#857)
* first attempts

* lndrest works

* fix details

* optional fee update

* use base64.urlsafe_b64encode

* return paymentstatus

* CLN: return pending for pending invoices

* grpc wip

* lndgrpc works

* cln: return pending for pending invoices really this time

* retry wallet out of exception

* wip eclair

* take all routines into try except

* cliche: return error

* rename payment.check_pending() to payment.check_status()

* rename payment.check_pending() to payment.check_status()

* eclair: works

* eclair: better error check

* opennode: works

* check payment.checking_id istead of payment.ok

* payment.ok check as well

* cln: works?

* cln: works

* lntxbot: works

* lnbits/wallets/lnpay.py

* cln: error handling

* make format

* lndhub full detail update

* spark: wip

* error to False

* wallets: return clean PaymentResponse

* opennode: strict error

* cliche: works

* lnbits: works

* cln: dont throw error

* preimage not error

* fix cln

* do not add duplicate payments

* revert cln

* extra safety for cln

* undo crud changes until tests work

* tasks: better logging and 0.5s sleep for regular status check

* 0.1 s

* check if wallet exists

* lnbits unhashed description

* remove sleep

* revert app.py

* cleanup

* add check

* clean error

* readd app.py

* fix eclaid
2022-08-30 13:28:58 +02:00
dni ⚡
5fecb02b8d
fix typo in view api.py (#933) 2022-08-29 17:32:36 +02:00
Tiago Vasconcelos
551c75c2cf
set focus on amount (#916) 2022-08-21 23:07:18 +02:00
calle
24de8f6611
isort api.py (#898) 2022-08-17 14:27:52 +02:00
calle
790f0efda7
Chore/unhashed description expressive error (#894)
* dont assume field

* expressive error for desciprion_hash and unhashed_description in format that isnt hex
2022-08-17 00:59:11 +02:00
dni ⚡
3dc00f67db
add pending column to CSV export on wallet page, issue #887 (#889)
* add pending, isPaid columns to CSV export on wallet page, issue #887

* prettier formatting

* remove isPaid from csv export

* added comment

Co-authored-by: dni <dni.khr@gmail.com>
2022-08-16 17:01:32 +02:00
Tiago Vasconcelos
197ff7d054
Core: reserve fee as an .env variable (#631)
* reserve fee as an .env variable

* fixed bad import

* Update .env.example

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* Update lnbits/core/services.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* Update lnbits/core/services.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* Update lnbits/settings.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>

* variable consistent names

* fix services.py variable names

* percent default fix

* Update lnbits/settings.py

int to float

* Update lnbits/settings.py

int to float

* Update .env.example

int to float

* make format

* fixed failing bleskomat test, expecting 2000 msats fee

* Update tests/extensions/bleskomat/test_lnurl_api.py

revert to 2 sat

* Update .env.example

* Update lnbits/settings.py

Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2022-08-13 20:19:08 +02:00
calle
28661903b6
return http error UNAUTHORIZED instead of BAD_REQUEST if key is missing (#869)
* return http error UNAUTHORIZED instead of BAD_REQUEST if key is missing

* fix regtest (#867)

Co-authored-by: dni <dni.khr@gmail.com>

* return http error UNAUTHORIZED instead of BAD_REQUEST if key is missing

Co-authored-by: dni  <office@dnilabs.com>
Co-authored-by: dni <dni.khr@gmail.com>
2022-08-13 14:41:44 +02:00
calle
e5d8c500d2
Wallets/unhashed_description (#870)
* new argument: unhashed_description

* accept in api

* set unhashed_description for memo case

* bolt11.py: dont be like CLN, accept the hash

* send hash to lnd in b64

* fix cln

* skip descr_hash for cln

* skip

* format
2022-08-13 14:29:04 +02:00
calle
05edd908f0
fix lnurlw balance_check (#854) 2022-08-09 12:48:10 +02:00
calle
4fc0a25d41
Mega-merge 4: Reenable LndWallet gRPC and use TrackPaymentV2 (#745)
* readd lndgrpc

* debug logging

* Use TrackPaymentV2

* /v2/router/track

* lnd_router_grpc

* flag for blocking check

* error handling

* fix name

* regtest lndgrpc

* new test pipeline

* fix env

* check for description hash

* remove unnecessary asserts for clarity

* assume that description_hash is a hash already

* no lock

* description hashing in backend

* restore bolt11.py

* /api/v1/payments with hex of description

* comment

* refactor wallets

* forgot eclair

* fix lnpay

* bytes directly

* make format

* mypy check

* make format

* remove old code

* WIP status check

* LND GRPC docs

* restore cln to main

* fix regtest

* import

* remove unused import

* format

* do not expect ok

* check ok

* delete comments
2022-08-09 11:49:39 +02:00
calle
b3c866fd1d
Code health: Small linting fix (#813)
* small linting fix

* je lint therefore je suis
2022-08-02 16:17:47 +02:00
calle
f1ec7e33f0
Mega-merge 2: Invoice/refactor description hash (WIP) (#814)
* description hashing in backend
2022-08-01 16:20:25 +02:00
Tiago Vasconcelos
925a7735da
change z-index for wallet tab (#818) 2022-08-01 12:56:56 +02:00
ben
618717b529 Merge branch 'main' into qrcodemaker 2022-07-28 12:40:25 +01:00
ben
4199f1bf98 Make format 2022-07-28 11:02:49 +01:00
calle
730add5116
Core/tag check get (#797)
* safer tag checking

* annotate
2022-07-28 11:53:40 +02:00
ben
4c8641fe00 Merge remote-tracking branch 'origin/main' into qrcodemaker 2022-07-28 10:48:12 +01:00
dni
c72834e47e revert attribute check 2022-07-27 09:50:16 +02:00
dni
7da496dbb4 remove asserts and add ignore instead for now 2022-07-27 09:39:52 +02:00
dni
347baa076a Merge branch 'main' into fix/mypy 2022-07-26 13:00:06 +02:00
dni
36cb1eb47b fix int type by changing the order 2022-07-26 12:46:43 +02:00
dni
00dba54ac8 remove FIXME add couple of ignores 2022-07-26 12:21:21 +02:00
dni
e4078910c4 fix another fastapi type 2022-07-26 09:38:31 +02:00
dni ⚡
5810a4993b
Update lnbits/core/views/api.py
Co-authored-by: calle <93376500+callebtc@users.noreply.github.com>
2022-07-26 09:08:16 +02:00
Arc
2d46eda5f5
Revert "Revert "LNURLp: check description hash"" 2022-07-25 15:54:49 +01:00
Arc
b708950b93
Revert "LNURLp: check description hash" 2022-07-25 15:32:59 +01:00
Arc
1da7c9b349
Merge pull request #758 from lnbits/lnurl/check_description_hash
LNURLp: check description hash
2022-07-25 15:19:20 +01:00
dni
5779243d3e blacked 2022-07-25 13:30:45 +02:00
dni
3d1abfa35a last mypy fails 2022-07-25 13:27:31 +02:00
dni
0bf4457c2f fixup types 2022-07-25 13:19:35 +02:00
dni
a7c10dde4a fixup types 2022-07-25 13:13:50 +02:00
dni
9cecd42467 ignore Body type 2022-07-25 12:09:29 +02:00
dni
df00a018f0 added FIXME tags and fix WalletTypeInfo 2022-07-25 12:05:16 +02:00
dni
4dfa0873e5 fix isort check 2022-07-25 12:03:06 +02:00
dni
463fbb39bd make test run again, introduce mypy again 2022-07-25 12:03:06 +02:00
dni
a80fd5de7a black formating 2022-07-25 12:03:06 +02:00
dni
9a17e4896b fix last views api bug, thanks calle 2022-07-25 12:03:06 +02:00
dni
25d19244be mypy fixes, api, eclair 2022-07-25 12:03:06 +02:00
dni
704b572349 fix PaymentKwargs class for mypy 2022-07-25 12:03:06 +02:00
dni
56560fca02 mypy fixes for generic.py, decurators.py, eclair.py 2022-07-25 12:03:06 +02:00
dni
7ad9ad799e assert Optional[str] 2022-07-25 12:03:06 +02:00
dni
808bd36e23 some more mypy fixes 2022-07-25 12:02:59 +02:00
calle
32a8736f32
CI: Test core/views/generic.py enabling and disabling extensions (#774) 2022-07-23 11:58:29 +02:00
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