Commit Graph
100 Commits
Author SHA1 Message Date
calleandGitHub d1302e4868 show progress (#987) 2022-10-11 08:52:39 +02:00
calleandGitHub 3bf3c91007 Add backend: ln.tips (LightningTipBot) wallet (#921)
* add ln.tips

* add wallet

* revert lnbits

* make format

* .env.example

* listener fix

* reconnect fixed

* make format

* make format
2022-10-10 16:12:06 +02:00
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
calleandGitHub 4ad3c84152 downgrade pyln from 0.12.0 to 0.11.1 (#1021) 2022-09-30 13:55:46 +02:00
calleandGitHub b0bedd53df Fix lndgrpc preimage (#998) 2022-09-22 11:15:28 +03:00
calleandGitHub c5cc65a736 Fix/admin extension exception (#984)
* check if wallet exists

* check wallet existence in key check

* return FORBIDDEN for LNBITS_ADMIN_USERS
2022-09-20 15:34:03 +03:00
calleandGitHub a9084a09f7 Docs/install docs (#983)
* check if wallet exists

* check wallet existence in key check

* update install docs
2022-09-20 15:08:45 +03:00
calleandGitHub 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
calleandGitHub 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
calleandGitHub 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
calleandGitHub 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
calleandGitHub 57fffa0c7f Revert "API key check: assert that wallet exists (#961)" (#962)
This reverts commit 0930fca7ec.
2022-09-12 18:41:27 +03:00
calleandGitHub 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
calleandGitHub f3a16a28cc Update installation.md (#955) 2022-09-11 13:06:55 +03:00
calleandGitHub 4662a79c3b little more logging (#953) 2022-09-09 16:46:27 +03:00
calleandGitHub d757154125 print time of expiration (#952) 2022-09-09 16:27:37 +03:00
calleandGitHub 54305c8f91 reuse db connection for pending and expired tasks (#951)
* reuse db connection for pending and expired tasks

* make format
2022-09-09 15:02:07 +03:00
calleandGitHub 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
calleandGitHub ae1a2ac383 Frontend: LNURLp/w icons with tooltips (#905)
* rename button to copy link

* icon buttons with tooltips
2022-08-18 13:24:34 +02:00
calleandGitHub 24de8f6611 isort api.py (#898) 2022-08-17 14:27:52 +02:00
callebtc 65f27afd76 upadte systemd docs to poetry 2022-08-17 14:25:19 +02:00
calleandGitHub 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
calleandGitHub 4ac73f1a79 Lnurlp/url_validation_fix (#883)
* dont assume field

* fix https check
2022-08-15 00:20:57 +02:00
calleandGitHub befe96257d Fix/header_check_fix_2 (#880)
* dont assume field

* check better
2022-08-14 23:17:53 +02:00
calleandGitHub 9bc99f796b Fix/header_lookup_none (#879)
* dont assume field

* fix header lookup
2022-08-14 22:59:02 +02:00
calleandGitHub 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
calleandGitHub c85be8dd22 dont assume field (#875) 2022-08-14 19:40:46 +02:00
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
calleandGitHub 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
calleandGitHub 8dfb4329d1 ssl cert creation method using openssl (#860) 2022-08-10 10:32:43 +02:00
calleandGitHub 05edd908f0 fix lnurlw balance_check (#854) 2022-08-09 12:48:10 +02:00
calleandGitHub 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
calleandGitHub b83fb1d5d8 VoidWallet: return PaymentStatus(None) (#845) 2022-08-04 18:40:46 +02:00
calleandGitHub 7fc1361475 cln invoice only int (#844) 2022-08-04 17:40:04 +02:00
calleandGitHub 9b27c2da01 argparser respect boolean arguments (#842) 2022-08-04 16:37:48 +02:00
8535d70d36 Poetry dev (#837)
* black and isort for tests

* black and isort for build

* use poetry in Makefile, update pyproject.toml dependencies and add configs for black, pytest, mypy, isort there

* switching github workflow to poetry

* set mininum version to python 3.7

* fix tests

* add types-protobuf to dev packages

* fix cln regtest

* update docs

* try fix 1

* mypy fix2

* fix isort formatting workflow

* add prettier to dev docs

* multiple valid python version for pyproject

* update poetry.lock

* remove development installation, not needed anymore

* fix migration workflows

* format into one test

* fix yaml

* fix pipeline

* fix pipeline

* fix again

* fix

* rename checks

* remove venv tests

* venv test once

Co-authored-by: dni <dni.khr@gmail.com>
2022-08-03 14:10:32 +02:00
2edaa0ee03 Poetry: uvicorn with .env and command line arguments (#836)
* fixed poetry logs

* make isort happy

* Poetry: uvicorn .env and command line arguments

* restore commands.py

* format

* own it

Co-authored-by: dni <dni.khr@gmail.com>
2022-08-03 13:16:50 +02:00
calleandGitHub 91fefdb83d migration for extensions (#835) 2022-08-03 11:27:08 +02:00
calleandGitHub b3c866fd1d Code health: Small linting fix (#813)
* small linting fix

* je lint therefore je suis
2022-08-02 16:17:47 +02:00
calleandGitHub d841690460 try except for check payment status (#820) 2022-08-01 16:51:19 +02:00
calleandGitHub 9c19b61e4a Mega-merge 3: CLN update client lib with descriptionhash support (WIP) (#792)
* CoreLightningWallet
2022-08-01 16:41:50 +02:00
calleandGitHub f1ec7e33f0 Mega-merge 2: Invoice/refactor description hash (WIP) (#814)
* description hashing in backend
2022-08-01 16:20:25 +02:00
calleandGitHub c88e6b0e62 Mega-merge 1: Test invoice creation with description hash (WIP) (#812)
* check for description hash

* remove unnecessary asserts for clarity

* assume that description_hash is a hash already

* no lock

* restore bolt11.py

* /api/v1/payments with hex of description

* comment
2022-08-01 16:12:25 +02:00
calleandGitHub c9c3dd3f66 add coverage report for regtest tests (#816) 2022-07-31 19:48:20 +02:00
f24d593f00 Fix docker staticfiles (#811)
* Fix staticfiles for docker install

* docker build instructions

* all tests python 3.9

Co-authored-by: cryptoteun <73664763+cryptoteun@users.noreply.github.com>
2022-07-30 17:09:14 +02:00
calleandGitHub f22e1e16af build instruction (#800) 2022-07-28 15:26:43 +02:00
callebtc 370a962528 use ours 2022-07-28 14:18:32 +02:00
callebtc 885c690cc6 Merge branch 'main' into SCRUB 2022-07-28 14:15:49 +02:00
callebtc 3d417bc40a merge 2022-07-28 14:14:59 +02:00
callebtc 51dac0275c Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-28 11:55:06 +02:00
calleandGitHub 730add5116 Core/tag check get (#797)
* safer tag checking

* annotate
2022-07-28 11:53:40 +02:00
callebtc dab109614d tag check 2022-07-28 11:41:55 +02:00
callebtc c1278dbef9 Merge branch 'main' into SCRUB 2022-07-28 11:20:44 +02:00
callebtc 521c821f6b Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-27 15:42:53 +02:00
calleandGitHub 0c5cb8cb9e Wallets: increase timeouts (#787)
* increase pay timeouts to infinite
2022-07-27 15:29:44 +02:00
callebtc 80dd330ec0 Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-26 12:26:34 +02:00
calleandGitHub 210edde08a Migration: Fix withdraw (#780) 2022-07-25 15:04:55 +02:00
callebtc d9849435a8 Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-25 14:32:38 +02:00
calleandGitHub 4bb184e08b CI: DB migration with real data (#776)
* fix migration conv.py

* migrate with mock data
2022-07-25 09:13:41 +02:00
callebtc 4e57b75fa1 Merge branch 'fix/migration_columns' 2022-07-25 07:32:17 +02:00
callebtc 20817df4de Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-25 07:32:08 +02:00
callebtc b17aed2d37 funzt 2022-07-24 22:13:05 +02:00
callebtc d93bd4bec1 print number of rows 2022-07-24 22:10:46 +02:00
callebtc dd7f622a67 db file 2022-07-24 22:07:19 +02:00
callebtc 923fad7382 migrate with mock data 2022-07-24 22:01:51 +02:00
callebtc 52c889f1d8 Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-24 01:12:56 +02:00
calleandGitHub 32a8736f32 CI: Test core/views/generic.py enabling and disabling extensions (#774) 2022-07-23 11:58:29 +02:00
callebtc 70d270bd69 Merge branch 'main' of github.com:lnbits/lnbits-legend 2022-07-23 11:26:48 +02:00
calleandGitHub bf2a3e9df2 fix tip link (#773) 2022-07-23 11:01:23 +02:00
callebtc 3b172630e3 fix tip link 2022-07-23 11:00:33 +02:00
calleandGitHub 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
calleandGitHub fd0d6bffce Update FUNDING.yml (#770) 2022-07-22 12:23:27 +02:00
calleandGitHub e4df8c52e2 add mkcert instructions (#768) 2022-07-21 14:01:16 +02:00
calleandGitHub 4feb45d745 LNURLp: NFC UI improvement (#767) 2022-07-21 13:39:21 +02:00
calleandGitHub 76a5196dbf LNURLp: Write NFC tags with LNURL-pay links (#766)
* NFC for LNURL-pay

* notification ui improvements
2022-07-21 12:38:30 +02:00
calleandGitHub 45c356cf6c change prefix to lightning: until wallets fix their bugs (#762) 2022-07-19 17:35:00 +02:00
calleandGitHub 0f73501a88 LNURLw: NFC fix uri prefix (#761)
* fix uri prefix

* prettier
2022-07-19 17:20:50 +02:00
calleandGitHub b8c99a15d1 do not mark payments as failed (#750) 2022-07-19 12:33: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
calleandGitHub f4580955b9 loguru warnings (#751) 2022-07-17 22:25:37 +02:00
calleandGitHub 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
calleandGitHub d4c30a1091 remove old files (#748) 2022-07-17 14:04:59 +02:00
calleandGitHub 2febb364ca lnurldevice migration: typo fix (#746)
* typo fix

* fix table name

* revert typo
2022-07-17 13:22:23 +02:00
calleandGitHub ad2aad05e0 CI: Migration SQLite to PostgreSQL (#719)
* migrate all extensions
* errors if migration is missing
2022-07-17 13:11:13 +02:00
calleandGitHub f4e7d62ca3 make format everything (#743) 2022-07-16 14:23:03 +02:00
calleandGitHub 69516bb751 regtest on push (#742) 2022-07-16 14:17:45 +02:00
calleandGitHub 99b6b9d71c CI: regtest with LndRestWallet and CLightningWallet (#738)
* add regtest
* test LndRestWallet
* test CLightningWallet
2022-07-16 14:10:43 +02:00
6a3a72b944 Uvicorn loguru format (#741)
* use loguru formatting for uvicorn logs

* remove depth from logging interceptor

* format for uvicorn

* black

* isort

* black again

* python3-dev

* python3-dev

* leaner pipeline

Co-authored-by: dni <dni.khr@gmail.com>
2022-07-15 19:54:12 +02:00
calleandGitHub 1f13bdeb2f Pipenv/fix install loguru (#732)
* update pipfile

* pipenv workflow

* pipfile jinja

* Pipfile installs dev files

* python3.8 tests only

* version tag yaml

* all tests

* pipenv with pip

* only 3.7

* activate env

* test-pipenv

* pipenv importlib_metadata

* importlib-metadata

* 3.8

* 3.7 only oops

* merge install guides

* install guide in README
2022-07-13 01:15:48 +02:00
calleandGitHub 357860d849 Spark: increase timeout and improved error handling (#718)
* increase timeout and more error handling

* more error handling

* add timeout exception
2022-07-12 13:22:55 +02:00
calleandGitHub 0825519361 None check (#720) 2022-07-07 21:58:39 +02:00
calleandGitHub 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
calleandGitHub 262bd32f44 debug format more expressive (#715) 2022-07-07 16:24:36 +02:00
calleandGitHub 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
calleandGitHub 92887ed169 Format: prettier (#707)
* format: prettier

* gh-actions: add prettier checkg

* actions
2022-07-05 21:14:56 +02:00
calleandGitHub d55f8dc36e readd prettier (#706) 2022-07-05 17:52:01 +02:00
calleandGitHub 17c79cd044 Makefile: remove prettier (#705)
* remove prettier

* black
2022-07-05 17:18:22 +02:00
calleandGitHub e7dd3ec64f reactivate actions (#682)
* reactivate other actions

* black

* codeql 2

* black only

* remove mock event loop

* do not follow grpc
2022-06-27 01:11:35 +02:00