Commit graph

225 commits

Author SHA1 Message Date
benarc
2eed8b620c removed header 2021-11-03 22:55:44 +00:00
benarc
a4ca6910fa tidied spark 2021-11-03 22:35:01 +00:00
benarc
7af0b786d1 cln sse should be working 2021-11-03 19:15:02 +00:00
benarc
92ea0635d7 another cln rpc sse try 2021-11-03 16:14:47 +00:00
benarc
a486cbe278 broken cln sse rpc 2021-11-03 16:07:04 +00:00
benarc
13bec714d5 lighningd payment stream not working 2021-11-03 15:24:24 +00:00
benarc
abff990ec3 Changed lnbits wallet check to detail from message 2021-11-03 10:29:39 +00:00
benarc
573ad3fb73 Added a try to fix lnbits funding source errors 2021-11-03 10:02:21 +00:00
benarc
1d3bb016a2 I want them to turn black 2021-10-17 18:33:29 +01:00
Stefan Stammberger
63d0242685
fix: more return types 2021-09-11 11:02:48 +02:00
Stefan Stammberger
d9849d43d2
refactor: replace Trio with asyncio/uvloop 2021-08-30 19:55:02 +02:00
Stefan Stammberger
3e5af8c1d1
refactor: purge Quart from the codebase
Most functionality is still broken
2021-08-27 20:54:42 +02:00
Tiago vasconcelos
a32e43b2bb fix having LND_GRPC_MACAROON as HEXSTRING issue #268 2021-08-06 12:37:30 -03:00
fiatjaf
e0496fb244 fix postgres type translation bug and add some logs. 2021-08-01 10:30:27 -03:00
fiatjaf
2f309c9863 postgres support. 2021-07-02 17:34:31 -03:00
Tiago vasconcelos
756b121105 print errors for tracking/debugging 2021-06-25 10:15:50 +01:00
Tiago vasconcelos
4585d97324 small fix on paid_invoices_stream 2021-06-23 18:50:01 +01:00
Tiago vasconcelos
021cf64c1e Added eclair backend 2021-06-23 16:13:48 +01:00
fiatjaf
688149fade add trio typing. 2021-06-20 21:17:32 -03:00
fiatjaf
232de067a4 expect more errors from SSE connection. 2021-04-21 23:27:57 -03:00
fiatjaf
3d489bf2ee make it so LNbitsWallet reconnects if the listener stream goes off. 2021-04-18 10:29:22 -03:00
fiatjaf
42b3359d12 fix invoice listener for LNbitsWallet. 2021-04-18 00:05:45 -03:00
fiatjaf
fdf4f6c1ae catch errors in multiple places that might be destroying the async flow and causing lnbits to die silently. 2021-04-10 17:37:48 -03:00
fiatjaf
59aaea47fd lndrest: capture the pay error properly. 2021-04-06 10:22:37 -03:00
fiatjaf
e112258c39 improve checking routine.
check pending invoices only once on startup,
then check outgoing payments every 30 minutes,
and delete outgoing payments that return False (meaning they have failed).

also fix a bug on sparko.
2021-03-28 00:11:45 -03:00
fiatjaf
3215b5d2bb catch some errors on spark. 2021-03-27 21:24:08 -03:00
fiatjaf
a787d60d93 be extra safe when failing a payment if pay_invoice throws on sparko. 2021-03-24 02:02:54 -03:00
fiatjaf
d4d069fc77 make all methods from all wallets async. 2021-03-24 01:01:09 -03:00
fiatjaf
42bd5ea989 remove exception to black line-length and reformat. 2021-03-24 00:40:32 -03:00
fiatjaf
e6ea77e682 catch exception on invalid hash passed to sparko. 2021-03-21 18:12:26 -03:00
fiatjaf
9dd040186d fix fee on lntxbot wallets. 2021-01-05 19:50:06 -03:00
fiatjaf
a67b93108b log errors on faulty lnpay webhooks. 2020-11-12 15:33:02 -03:00
fiatjaf
8f1ae1646e opennode: fix webhook handling (json -> urlencoded data). 2020-11-09 09:38:06 -03:00
benarc
d75c69cd10 fixed first opennode bug
Opennode funding source isnt working, there are a few bugs. This fixes the first
2020-11-08 23:15:27 +00:00
fiatjaf
f02ec67f35 add lntxbot invoices listener. 2020-10-14 23:58:57 -03:00
fiatjaf
0dc60d4795 increase timeouts for http wallets when stuff may take more than 5 seconds.
before we were using requests which had no default timeouts, but httpx has a
default timeout of 5 seconds. should have noticed that earlier.

when the timeout expires we are left with a pending payment on the db with a
temporary checking_id so we can never know if it was completed or not.

this is still an issue, because technically a lightning payment may take 2 weeks
or more, and we must have a way to dispatch a payment and check for it later.

that should be the default (and we already do check for the payment status later,
so half of the work is done), but on the other hand backends like lnpay and
opennode do not give us a checking_id before the thing is already settled.
2020-10-13 20:39:24 -03:00
fiatjaf
bcdc065cc0 mypy fixes. 2020-10-13 14:46:23 -03:00
fiatjaf
cf0bd7ece8 displaying lnurlpay success_actions. 2020-10-13 13:57:26 -03:00
fiatjaf
b1f30390b0 retrieve preimage from wallet backends, save it and show on UI dialog.
closes https://github.com/lnbits/lnbits/issues/77
2020-10-12 23:19:16 -03:00
fiatjaf
f2ea8a0c74 fix lndrest payment checking: b64/hex mismatch.
finally fixes https://github.com/lnbits/lnbits/issues/55
and https://github.com/lnbits/lnbits/issues/110
2020-10-12 23:18:58 -03:00
fiatjaf
b5a07c7ae7 add status() method to wallets to be used in initial check. 2020-10-12 22:30:19 -03:00
fiatjaf
d5d85d16e6 fix: auth headers variable name on opennode.py 2020-10-12 20:59:09 -03:00
fiatjaf
1d00060419 harden sse connections to backends a little. 2020-10-09 20:55:58 -03:00
fiatjaf
7f41d73a84 SSE-based invoices stream for LNbitsWallet. 2020-10-09 17:06:50 -03:00
fiatjaf
6f72f1fe6d fix typo: LND_MACAROON -> LND_REST_MACAROON 2020-10-08 16:24:23 -03:00
fiatjaf
76633fb71f lndrest: check last 20 payments instead of first 20.
fixes https://github.com/lnbits/lnbits/issues/110
2020-10-08 16:08:13 -03:00
fiatjaf
9185342c72 simplify environment variables required.
instead of multiple keys/macaroons with different permissions we request only one.
if someone wants to use lnbits with an invoice macaroon they're free to do it and
we will just fail on 'pay' methods, as before.

this also grandfathers the previous environment variables names so everything keeps
working without people having to change their setups.

in the meantime some bugs with lntxbot and c-lightning were fixed and the `requests`
dependency was eliminated because I can't organize myself into meaningful chunks of
changes.
2020-10-08 16:03:21 -03:00
fiatjaf
0b1f3c22e0 lndhub: fix "token" -> "refresh_token". 2020-10-06 21:53:43 -03:00
fiatjaf
4e68a0e7e6 lndrest: two small fixes. 2020-10-05 22:43:49 -03:00
fiatjaf
bb965e4119 lndrest: account for when there are pending checking_ids from other sources. 2020-10-05 22:16:28 -03:00