Commit Graph

1151 Commits

Author SHA1 Message Date
Fmar
c60461be39 Merge pull request #478 from getAlby/frnandu-patch-1
Update workflow.yaml
2024-01-17 18:52:23 +01:00
Fmar
ca01e0b3c4 Update workflow.yaml 2024-01-17 18:51:44 +01:00
Michael Bumann
8deabc56be Add support for service fees (#474)
* Add support for service fees

This introduces a new transaction type "service_fee"
Each outgoing payment is charged a service fee of x/1000.
The service fee entries is added with the routing fee reserve entry.
For failed payments the service fee is reversed.

* Add service_fee migration

* No service fee by default

* Fee reserve and service fee is optional

ignore NoRows errors

* Update Makefile

* Unify setting the fee on the invoice

* Proper error check

* ups

* Add service fee tests to outgoing payment tests

* Save parant id to fee tx entries

* Optionally load test DB from env variable

* Add config for free transactions

payment amounts up to NO_SERVICE_FEE_UP_TO_AMOUNT don't get a service fee charged

* Update readme

* cleanup

* fix: only charge service fees for amounts > free limit

* fix: format

* Save service fee on invoice

* naming

* Also save the payment hash where we save the preimage

we already do exactly that when in the normal PayInvoice flow.
Normally the RHash is already set here, but I guess it does not hurt to have
it consistent everywhere.

* Use the invoice routing fee field to check if a routing fee must be charged

It feels a bit indirect to check if we have set a FeeReserve.
We save the routing fee on the invoice thus we should be able to use that information

* remove nullzero from fee columns

we want those to be 0 by default

* add columns only if not existent

---------

Co-authored-by: René Aaron <rene@twentyuno.net>
2024-01-13 14:07:11 +00:00
Fmar
eeb46ee76a Merge pull request #471 from getAlby/split-values-simnet-deployment
update simnet yaml files inside values
2024-01-11 20:18:52 +01:00
Michael Bumann
e33693398e Soft delete users (#476)
* Update Makefile

* Optionally load test DB from env variable

* Add option to soft-delete a user

This allows users to be marked as deleted.
An additional middleware checks if a user is deleted or deactivated and rejects
requests for those as StatusUnauthorized.

note: the middelware adds an additional DB query to load the user.
2024-01-09 19:38:01 +02:00
Michael Bumann
a6f493ec20 Merge pull request #475 from getAlby/feat/json-logging
fix: migrating payment failed errors to json logging
2024-01-09 00:07:24 +02:00
René Aaron
f48f0f3aab fix: add invoice data to old endpoint logs 2023-12-30 12:38:12 +01:00
René Aaron
7c965305fb fix: migrating payment failed errors to json logging 2023-12-30 12:35:50 +01:00
Fmar
feac6b4166 update simnet yaml files inside values 2023-12-27 00:53:03 +01:00
René Aaron
4eb9f0923a fix: exclude erroneous payments (#467)
* fix: exclude errorneous payments

* fix: add invoicesfor in tests

---------

Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
2023-12-12 17:47:55 +01:00
kiwiidb
110d09ac48 Merge pull request #465 from getAlby/task-limits-jwt
feat: fetch and use the limits from the JWT Token
2023-12-08 12:09:38 +01:00
kiwiidb
478bc3b93d move limits struct out of lnd package 2023-12-08 12:07:54 +01:00
kiwiidb
dbc599397f Merge pull request #437 from getAlby/fix/no-errored-invoices
legacy endpoint: no errored invoices
2023-12-08 11:41:14 +01:00
im-adithya
8f4c74e7bb chore: remove blank space 2023-12-07 16:47:05 +05:30
im-adithya
b494219071 chore: further refactoring 2023-12-07 16:44:47 +05:30
kiwiidb
786439ba68 Merge pull request #464 from getAlby/task-refactor-checks
chore: refactor payment checks
2023-12-07 12:13:54 +01:00
im-adithya
0385c17d2b Merge branch 'task-refactor-checks' into task-limits-jwt 2023-12-07 14:56:27 +05:30
im-adithya
5fd0d66a54 chore: further refactoring 2023-12-07 14:46:12 +05:30
im-adithya
d3208f2bb1 chore: refactor 2023-12-07 14:29:18 +05:30
im-adithya
bd92e6ff85 chore: remove check volume allowed function 2023-12-07 14:15:47 +05:30
im-adithya
e681e69fa2 chore: use limits from JWT if available 2023-12-05 15:58:45 +05:30
im-adithya
62d7ffb7fe fix: outgoing exceeding tests 2023-12-05 12:29:49 +05:30
im-adithya
f542466811 chore: split volume for send and receive 2023-12-05 12:22:38 +05:30
im-adithya
401cd4a458 chore: refactor payment checks 2023-12-04 16:21:06 +05:30
kiwiidb
c5812503c7 Merge pull request #463 from getAlby/task-out-exceeding-checks
chore(addoutgoinginvoice): add exceeding checks for send
2023-12-01 14:40:07 +01:00
kiwiidb
e58e6ac6ec Merge pull request #462 from getAlby/task-in-exceeding-checks
chore: add exceeding checks for volume, balance, receive
2023-12-01 14:36:29 +01:00
im-adithya
29957edad0 chore(addoutgoinginvoice): add exceeding checks for send 2023-12-01 16:01:56 +05:30
im-adithya
b84bf01e0e chore: add readme for max_volume 2023-12-01 00:28:44 +05:30
im-adithya
fb8c4784d6 chore(addincominginvoice): add exceeding checks for volume, balance, receive 2023-12-01 00:25:38 +05:30
kiwiidb
6db26d487e Merge pull request #454 from getAlby/task-optimize-keysend-check
chore: optimize keysend/multikeysend balance checks
2023-11-24 14:12:09 +01:00
im-adithya
aa9bae8a8f fix: typo 2023-11-24 18:28:17 +05:30
im-adithya
484f7ab07d chore: log error 2023-11-24 18:26:55 +05:30
im-adithya
8951fd08f7 chore: remove unnecessary function 2023-11-24 16:32:02 +05:30
im-adithya
1a85e673cc chore: dry up code 2023-11-24 16:30:11 +05:30
im-adithya
37270cd23a chore: optimize keysend/multikeysend balance checks 2023-11-24 16:14:08 +05:30
kiwiidb
8944d65e7f reconciliation job: error handling 2023-11-20 10:16:36 +01:00
kiwiidb
9090f6073e Merge pull request #447 from getAlby/refactor-reconciliation
Refactor reconciliation
2023-11-08 14:23:28 +09:00
kiwiidb
58d9c3de22 add comment about what it does 2023-11-08 14:19:36 +09:00
kiwiidb
a64cd2d184 move log line 2023-11-07 16:09:53 +09:00
kiwiidb
1482240d0a add timestamp 2023-11-07 16:03:46 +09:00
kiwiidb
1b067a751f write new func for finding payments 2023-11-07 16:01:55 +09:00
kiwiidb
8477a22f04 more flexible checkpending func signature 2023-11-07 15:57:08 +09:00
kiwiidb
4e7d0de7cc legacy endpoint: no errored invoices 2023-10-09 14:07:19 +02:00
kiwiidb
5880dfe27f Merge pull request #436 from getAlby/task-timeout
feat: introduce timeout in cluster status check
2023-10-03 12:00:33 +02:00
im-adithya
0d11c9a3f6 feat: introduce timeout in cluster status check 2023-10-03 15:19:37 +05:30
kiwiidb
d2d9b0372a Merge pull request #434 from getAlby/remove-getinfo-lnd-cluster
remove getinfo call when initializing cluster
2023-10-02 13:46:44 +02:00
kiwiidb
c87ded78a3 Merge branch 'main' into remove-getinfo-lnd-cluster 2023-10-02 13:17:57 +02:00
kiwiidb
5273f45b3f fix merge issue 2023-10-02 10:20:27 +02:00
kiwiidb
d1f31f3989 Merge pull request #435 from getAlby/task-multi-keysend
feat: use background context in multikeysend
2023-09-29 15:56:13 +02:00
kiwiidb
a5cfd0d739 fix merge conflict 2023-09-29 15:55:51 +02:00