Commit Graph

1175 Commits

Author SHA1 Message Date
Michael Bumann
dbd6a3fa17 Update build_binaries.yaml 1.0.1 2024-06-18 14:05:40 +03:00
Michael Bumann
8716b62e1c Go v1.20 in GH action 2024-06-17 21:26:35 +03:00
Michael Bumann
a7e0ab1d03 Merge pull request #492 from getAlby/publish-fees
Publish invoice service and routing fees to the rabbitmq/webhook
2024-06-17 20:55:18 +03:00
Michael Bumann
75c3f5efb1 Merge pull request #479 from getAlby/fix/migration-service-fee-db
fix: enable data migration
2024-06-17 20:53:22 +03:00
Michael Bumann
15ecc979d2 correct go build 2024-06-16 21:36:52 +03:00
Michael Bumann
c5df0922b8 Build proper main file 2024-06-16 21:28:40 +03:00
Michael Bumann
9e8ace8868 Try to run binary build on release publish 2024-06-16 21:25:01 +03:00
Michael Bumann
144c5cd666 Merge pull request #485 from getAlby/payment-responses
Return correct Amount and Fee on the payment responses
1.0.0
2024-06-14 14:46:23 +03:00
Michael Bumann
d552238f16 Publish invoice service and routing fees to the rabbitmq/webhook 2024-06-14 13:41:50 +02:00
Michael Bumann
692efdc545 Merge pull request #490 from getAlby/invoice-republishing-by-hash
added single invoice by hash support for republishing
2024-06-07 13:00:10 +03:00
Michael Bumann
ba5057cb74 Merge pull request #487 from getAlby/limit-logs
Add logs to outgoing/incoming limit checks
2024-06-07 12:35:27 +03:00
Michael Bumann
87804203e1 Merge pull request #491 from getAlby/feat/index-invoice-state
fix: index invoice state
2024-06-07 12:34:33 +03:00
Michael Bumann
8fe603cc39 Merge pull request #488 from getAlby/rate-limit-response
Use proper JSON response for rate limit error
2024-06-07 12:13:37 +03:00
René Aaron
102076d86b fix: index invoice state 2024-06-06 10:26:04 +02:00
Fmar
47333ebf8e added single invoice by hash support for republishing 2024-05-09 19:01:58 +02:00
Michael Bumann
0b8c8e0cc2 Use proper JSON response for rate limit error 2024-04-17 15:53:18 +02:00
Michael Bumann
806e8477b1 tmp fix for alby limits 2024-04-07 01:51:12 +02:00
Michael Bumann
a239f23749 Log JWT details 2024-04-06 22:00:45 +02:00
Michael Bumann
8704dd1a07 Add logs to outgoing/incoming limit checks
this helps debugging potential issues
2024-04-06 20:58:58 +02:00
Adithya Vardhan
badb700837 chore: allow 0 limits for send/receive amount/volume (#486)
* chore: allow 0 limits for send/receive amount/volume

* fix: use pointers for claims

* fix: tests to set default as -1

* chore: add 0 check in outgoing exceeded tests

* chore: also default max account balance to -1

* chore: remove dbUri :P

* chore: remove print statements

* chore: add more tests for limits
2024-04-05 09:21:08 +02:00
Fmar
5abcb5384e valueFile: 'alby-mainnet-deployment/values/lndhub.yaml' 2024-03-05 16:19:57 +01:00
Michael Bumann
30eb3511ca Return correct Amount and Fee on the payment responses
So far we have returned the total amount (which includes the fee) and the fee.
This information was taken from the payment route response now we directly return it from the invoice data.
This is consistent with the other transaction responses
2024-03-01 22:07:09 +01:00
René Aaron
23604060f7 feat: include amount in index (#453)
* feat: include amount in index

* fix: split migrations into multiple transactions
2024-01-19 09:27:15 +00:00
René Aaron
12cbcec1f3 fix: enable data migration 2024-01-18 20:37:43 +00:00
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