kiwiidb
e3960b6903
Merge pull request #216 from prusnak/editorconfig
...
Add .editorconfig + fix whitespace issues
2022-08-01 10:25:22 +02:00
Pavol Rusnak
9dc300a6cf
Add .editorconfig + fix whitespace issues
2022-07-22 00:03:48 +02:00
Pavol Rusnak
487524c236
Enable "unix:" prefix for PostgreSQL connection string
2022-07-21 17:34:52 +02:00
kiwiidb
c8bdddc013
remove all sqlite dependencies and mentions
2022-06-17 08:56:00 +02:00
Pavol Rusnak
1adea74429
Implement fee-reserve
2022-06-15 23:06:53 +02:00
Michael Bumann
6173dcac09
Fix SQLite error in inital migration
...
'initialized'::character varying is not supported in SQLite
2022-05-27 20:37:01 +02:00
kiwiidb
26944ae515
add destination custom records column
2022-05-18 09:08:15 +02:00
kiwiidb
ac472e4d79
update json schema invoice
2022-05-03 09:18:47 +02:00
kiwiidb
be8a5a4acc
feature: allow custom records to keysend
2022-03-18 12:19:19 +01:00
Stefan Kostic
64c77d4ebb
Add new migration to alter check balance trigger
2022-03-08 18:51:16 +01:00
Stefan Kostic
f68ca7ac6e
Revert constraint migration
2022-03-08 18:38:53 +01:00
kiwiidb
a3c6f294e0
fix merge conflict
2022-03-08 14:57:46 +01:00
Stefan Kostic
6dc4e608fb
Fix invoice keysend spelling
2022-03-08 01:09:43 +01:00
Stefan Kostic
a881131b8d
Adapt balance constraint
2022-03-04 18:29:31 +01:00
Stefan Kostic
90e90dc79c
Merge branch 'main' into fee-handling
2022-03-04 17:46:36 +01:00
kiwiidb
3d8ecd425f
keysend: low-level work and instructions
2022-03-04 11:08:27 +01:00
Stefan Kostic
cd6a08690c
Fix PR comments
2022-03-01 23:22:45 +01:00
kiwiidb
735cd6a839
fee handling should come from payment response
2022-03-01 10:06:29 +01:00
Stefan Kostic
de823e478a
Fix migration according to PR comments
2022-02-23 18:41:58 +01:00
Stefan Kostic
b25c1cb1c4
Use sql for init migration
2022-02-22 15:52:21 +01:00
Michael Bumann
4a3c93bb17
Fix typo
2022-02-18 16:42:42 +02:00
Stefan Kostic
a071b3bd1a
Fix error message bun struct tag
2022-02-18 12:46:06 +01:00
Stefan Kostic
130760bbb1
Add error message field to invoice
2022-02-17 20:29:45 +01:00
kiwiidb
20610aef06
remove btcec dependency
2022-02-15 17:24:57 +01:00
Michael Bumann
f6367b33a0
Merge pull request #69 from getAlby/bugfix/fix-invoices-without-description
...
Do not fail if invoice does not have a description
2022-01-24 20:12:29 +02:00
Michael Bumann
9435f75d1f
Merge pull request #66 from getAlby/db/better-pg-constraints
...
Trying to get the PG constraints working
2022-01-23 00:23:07 +02:00
Michael Bumann
edd2abedfb
Do not fail if invoice does not have a description
2022-01-22 23:05:21 +01:00
Michael Bumann
af8c72d2c9
Store invoice expiry and use search for not expired invoices in the invoice subscription
...
When subscribing for invoice updates we only subscribe to not expired invoices.
We assume expired invoices will never get paid.
2022-01-22 21:11:19 +01:00
Michael Bumann
0de0ed18b4
Missing fix
2022-01-22 15:19:30 +01:00
Michael Bumann
319524ea4c
Trying to get the PG constraints working
...
This uses row level locking on the accounts. If two transactions access the same account one fails
2022-01-22 13:00:46 +01:00
Michael Bumann
43aba70dd8
Fix invoice preimages for internal payments
...
We create the preimage on incoming invoices. If it is an internal incoming payment (meaning from one user to another user) we use that preimage and save it on the outgoing invoice.
This makes sure we can give wallets the correct preimage for a payment request even though no lightning transaction happened
2022-01-21 13:56:02 +01:00
Michael Bumann
55fbaeea92
nullzero entry for the parent txn
2022-01-21 11:17:19 +01:00
Michael Bumann
a5d1c3f4ed
Add constraint to invoices DB to make sure settled invoices have a preimage saved
...
We just try to store as much potential relevant information as possible.
This could help debugging and verifiying payments if there is an issue
2022-01-21 11:16:48 +01:00
Michael Bumann
7d955a1d7b
Support self-payments
...
If the destination of the invoice is our node we only create internal transaction entries and do not call the underlaying lightning node
2022-01-20 16:50:26 +01:00
Michael Bumann
90a686677f
Save invoice destination
...
And save the node pubkey in the service to make it usable
2022-01-20 15:41:50 +01:00
Michael Bumann
3a67f86a34
Merge main
2022-01-20 14:15:40 +01:00
Michael Bumann
c06a749b8d
Merge pull request #51 from getAlby/no-panic
...
Panic less
2022-01-20 14:52:31 +02:00
kiwiidb
7c51383feb
replace all panics with log.Fatal
2022-01-20 13:44:59 +01:00
Michael Bumann
70a7e1a8eb
Add DB constraints to check for user balances
2022-01-20 02:03:51 +01:00
Michael Bumann
d4183c100b
Add payinvoice endpoint
2022-01-20 01:57:31 +01:00
Michael Bumann
f625ef7efc
Implement addinvoice call
2022-01-19 19:43:29 +01:00
kiwiidb
ecd4894673
refactor balance
2022-01-19 14:18:34 +01:00
Michael Bumann
a07aa749f0
Move balance calculationo to User model
2022-01-19 13:16:25 +01:00
Michael Bumann
b38357091d
Add DB view for easier balance calculation and extend model associations
2022-01-19 10:57:50 +01:00
Viktor Patchev
919affa2db
Update package name to new repo
2022-01-18 10:42:53 +01:00
Michael Bumann
7f8f8a9028
Add Bun debugger
2022-01-17 10:19:27 +01:00
Roman Useinov
e7e5904829
UserMiddleware added
2022-01-16 14:02:58 +00:00
Roman Useinov
628071160c
Cleanup ( #25 )
...
* remove cmd folder as we are going to have only one entrypoint
* get rid of pkg directory
* rename test -> integration_tests as unit tests should reside next to the actual files they are testing
* database migration WIP
* reinstate gorm boilerplate in the addinvoice for now to make it compile
* introduce migrations
* add Makefile
* don't use unsigned types for database mappings
* migrations work now
* add build target
* use echo groups
* gorm removed
* add envconfig
* fix comments
2022-01-16 00:49:19 +01:00