Commit Graph

87 Commits

Author SHA1 Message Date
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
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
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
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
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
00dba54ac8 remove FIXME add couple of ignores 2022-07-26 12:21:21 +02:00
dni
df00a018f0 added FIXME tags and fix WalletTypeInfo 2022-07-25 12:05:16 +02:00
dni
704b572349 fix PaymentKwargs class for mypy 2022-07-25 12:03:06 +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
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
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
Arc
b4ad0e101d
Revert "Check invoice status outgoing" 2022-05-20 14:35:00 +01:00
callebtc
f08fbc2487 core: check_invoice_status for outgoing payments 2022-05-10 21:48:24 +02: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
benarc
228717195b back 2022-01-30 19:43:30 +00:00
mrbitcoiner
cdeccec01b 2% reserve only for external payments 2021-12-29 11:55:52 -03:00
benarc
907714838b Added check to explain fee reserve 2021-12-02 21:22:30 +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
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
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
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
e03370188a Fixed payment checking 2021-10-22 00:41:30 +01:00
Ben Arc
b6f5052da0 trying to fix payment check 2021-10-20 03:28:31 +01:00
benarc
cf6fae2ca7 Added internal payment listener to paid invoices and splitpayments 2021-10-18 13:24:32 +01:00
Tiago vasconcelos
19a50e3638 add default memo 2021-10-18 12:23:57 +01:00
benarc
1d3bb016a2 I want them to turn black 2021-10-17 18:33:29 +01: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
fiatjaf
688149fade add trio typing. 2021-06-20 21:17:32 -03:00
fiatjaf
64c4b97ec9 catch error on redeem_lnurl_withdraw call. 2021-06-17 13:26:09 -03:00
fiatjaf
bcecf6d431 handle invalid lnurl-w responses on redeem_lnurl_withdraw. 2021-04-23 19:24:04 -03:00
fiatjaf
2aa4a93da1 handle empty lnurl-withdraws to redeem. 2021-04-21 23:27:57 -03:00
fiatjaf
cbeb888761 fix lnurlwallet flow. 2021-04-17 23:44:26 -03:00
fiatjaf
a413685160 fix redeem_lnurl_withdraw code. 2021-04-17 23:30:26 -03:00
fiatjaf
efd9c6917f lnurl balanceCheck and balanceNotify. 2021-04-17 23:21:19 -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
82731dc901 a special error for when payments fail. 2021-04-06 14:57:51 -03:00
fiatjaf
11679a4fa7 actually do the fee abs() thing on the balances view. 2021-03-31 20:22:34 -03:00