Commit Graph

70 Commits

Author SHA1 Message Date
Tiago Vasconcelos
4549190e86 abstract get latest payments for extensions 2022-11-17 12:59:40 +00:00
calle
d1302e4868
show progress (#987) 2022-10-11 08:52:39 +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
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
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
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
dni
808bd36e23 some more mypy fixes 2022-07-25 12:02:59 +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
906f0166bd
Core: fix internal webhooks (#649)
* fix internal webhooks

* argument annotation
2022-06-03 14:33:31 +02: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
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
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
calle
32ea1106f9
Crud webhook amount (#474)
* get_standalone_payment selects only incoming tx
2021-12-28 14:05:25 +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
Stefan Stammberger
83b7779972
chore: apply black to all .py files 2021-11-24 14:31:55 +01:00
benarc
1d3bb016a2 I want them to turn black 2021-10-17 18:33:29 +01:00
Stefan Stammberger
f119053953
fix: main page and creating a user and a wallet
The wallet page will still not renders correctly, but the backend does
create the user his first wallet.
2021-08-24 21:23:18 +02:00
Tiago vasconcelos
b3856d5aff allow wallet rename issue #141 2021-08-06 12:37:30 -03:00
fiatjaf
ffadce02b0 support cockroachdb. 2021-07-02 18:32:58 -03:00
fiatjaf
2f309c9863 postgres support. 2021-07-02 17:34:31 -03:00
fiatjaf
5dbbca0ffb improve invoice deleting code. 2021-05-14 13:13:42 -03:00
fiatjaf
efd9c6917f lnurl balanceCheck and balanceNotify. 2021-04-17 23:21:19 -03:00
fiatjaf
76199c66a1 livestream extension.
(except docs)
2021-04-11 00:44:55 -03:00
fiatjaf
85011d23c3 fix sqlite database locked issues by using an async lock on the database and requiring explicit transaction control (or each command will be its own transaction). 2021-03-26 19:10:30 -03:00
fiatjaf
aabe3364f4 only check pending from the last 15 days. 2021-03-24 01:41:19 -03:00
fiatjaf
42bd5ea989 remove exception to black line-length and reformat. 2021-03-24 00:40:32 -03:00
fiatjaf
7e4a42e7ff stop doing the check_invoices thing on each call. do it once on lnbits starup and then rely on the invoices listener. 2021-03-21 17:57:33 -03:00
fiatjaf
1630a28da0 prettier and black stuff. 2021-03-07 19:18:02 -03:00
fiatjaf
63ae553565 QR codes, printing, success-action and other fixes. 2021-03-07 16:13:20 -03:00
fiatjaf
732d06c1e5 basic offlineshop functionality. 2021-03-07 00:08:36 -03:00
Kristjan
c082c953f3 black formatting 2020-12-31 18:50:16 +01:00
fiatjaf
1c922a5ddc finish webhooks for normal invoices with two extra columns. 2020-12-24 09:39:46 -03:00
fiatjaf
d3fc52cd49 migrate to sqlalchemy-aio.
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.
2020-11-21 23:02:14 -03:00
fiatjaf
04222f1f01 basic invoice listeners. 2020-10-04 12:04:47 -03:00
fiatjaf
f01028eac7 migrate from flask to quart.
also remove all flaskiness from static file serving.
and reference all vendored scripts on the base tempĺate for simplicity.
2020-09-14 16:03:25 -03:00
fiatjaf
6210305791 checking pending invoices and payments from lndhub interface. 2020-09-12 21:55:13 -03:00
fiatjaf
4855e2cd3d make every request a database transaction. 2020-09-11 14:17:09 -03:00
fiatjaf
487f082eb2 take extra care on check_internal() 2020-09-11 14:17:09 -03:00