callebtc
3a653630f1
Wallets: add cln-rest ( #1775 )
...
* receive and pay works
* fix linter issues
* import Paymentstatus from core.models
* fix test real payment
* fix get_payment_status check in lnbits
* fix tests?
* simplify
* refactor AsyncClient
* inline import of get_wallet_class
fixes the previous cyclic import
* invoice stream working
* add notes as a reminder to get rid of labels when cln-rest supports payment_hash
* create Payment dummy classmethod
* remove unnecessary fields from dummy
* fixes tests?
* fix model
* fix cln bug (#1814 )
* auth header
* rename cln to corelightning
* add clnrest to admin_ui
* add to clnrest allowed sources
* add allowed sources to .env.example
* allow macaroon files
* add corelightning rest to workflow
* proper env names
* cleanup routine
* log wallet connection errors and fix macaroon clnrest
* print error on connection fails
* clnrest: handle disconnects faster
* fix test use of get_payment_status
* make format
* clnrest: add unhashed_description
* add unhashed_description to test
* description_hash test
* unhashed_description not supported by clnrest
* fix checking_id return in api_payments_create_invoice
* refactor test to use client instead of api_payments
* formatting, some errorlogging
* fix test 1
* fix other tests, paid statuses was missing
* error handling
* revert unnecessary changes (#1854 )
* apply review of motorina0
---------
Co-authored-by: jackstar12 <jkranawetter05@gmail.com>
Co-authored-by: jackstar12 <62219658+jackstar12@users.noreply.github.com>
Co-authored-by: dni ⚡ <office@dnilabs.com>
2023-08-23 08:59:39 +02:00
dni ⚡
511a0fd895
[CHORE] cln.py pyln-client is not optional ( #1859 )
...
* [refactor] pyln-client is not optional
some time ago we added pyln do main dependencies, its need for think like, saas or docker.
so this import was dead code
* stubs for pyln.client
2023-08-16 15:54:06 +02:00
dni ⚡
355806608b
[CHORE] E722 bare exception fix ( #1871 )
...
* [CHORE] E722 bare exception fix
remove all bare exceptions from codebase and change it in `.flake8`
2023-08-16 12:17:54 +02:00
callebtc
11fec7a889
[Wallets] CLN: fix pending state check ( #1770 )
...
* better checking
* flake8 fix
* make format
* invoices scope are function for tests
* invoice back to sessionbut keep real_invoice for now
* make format
* comment
* get payment by checking id and test
2023-07-24 12:00:41 +02:00
daywalker90
39066e4bc8
fix cln wallet for msat migration ( #1671 )
...
* fix cln wallet for msat migration
* status wants our funds only
2023-05-22 12:03:37 +01:00
Pavol Rusnak
a0cc55c5a1
fix pylint C0209 (consider-using-f-string)
2023-01-30 11:46:43 +00:00
Pavol Rusnak
15d7fbeace
run autoflake
...
```
autoflake -i --remove-unused-variables $(find . -name "*.py")
```
2023-01-30 11:46:43 +00:00
calle
f0d58a8365
Wallets: add custom invoice expiry ( #1396 )
...
* expiry for fakewallet
* expiry for lnd
* lnbits backend
* fix: eclair descriptionHash fixed and expiry added
* cln and sparko
* test expiry
* Eclair from AdminUI and bugfix for nonexistent payments
* add to settings and .env and remove lntxbot
* remove duplicate and format
* add invoice expiry
* add min max and step
* UI works now
* test should fail, sanity check, will revert
* revert, ready for merge
Co-authored-by: Tiago Vasconcelos <talvasconcelos@gmail.com>
2023-01-26 11:08:40 +01:00
Pavol Rusnak
3d0c66f0f6
remove unnecessary argument encoding from bytes.decode() and str.encode()
...
the encoding parameter defaults to utf-8, so it's not needed
2023-01-03 22:38:28 +01:00
dni ⚡
ad81bb322a
change settings in wallets
2022-10-05 13:05:11 +02: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
0f760bf39e
Lnurlp: use unhashed_description
instead of description_hash
( #878 )
...
* dont assume field
* pass unhashed_description instead of description_hash for LNURL stuff
* more
2022-08-14 21:59:36 +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
7fc1361475
cln invoice only int ( #844 )
2022-08-04 17:40:04 +02:00
calle
d841690460
try except for check payment status ( #820 )
2022-08-01 16:51:19 +02:00
calle
9c19b61e4a
Mega-merge 3: CLN update client lib with descriptionhash support (WIP) ( #792 )
...
* CoreLightningWallet
2022-08-01 16:41:50 +02:00