-
Notifications
You must be signed in to change notification settings - Fork 53
feat: add hold invoices support for LND & LDK #1298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit
Hold shift + click to select a range
5e00db3
feat: add LND hold invoices support
frnandu 1f37ce7
fix: add HOLD_INVOICE_ACCEPTED_NOTIFICATION to notifications list ret…
frnandu 47308d5
fix: revert
frnandu 6395c41
fix: remove unneeded null checks
frnandu 764d497
docs: add extra event type to README
rolznz e1cefb9
feat: add LND hold invoices support
frnandu 2d51cfb
fix: add HOLD_INVOICE_ACCEPTED_NOTIFICATION to notifications list ret…
frnandu c9ac1cf
fix: revert
frnandu 7772ab1
fix: remove unneeded null checks
frnandu 92b8008
docs: add extra event type to README
rolznz 3ad5a18
Merge remote-tracking branch 'origin/feat/hold-invoices' into feat/ho…
frnandu f754de4
fix: remove 0 expiry checking in the make_hold_invoice_controller
frnandu 5180ede
fix: use JSON logging
frnandu 16207ec
revert fly.toml
frnandu 1ea6ef6
fix: duplicated check
frnandu 92b6433
fix: move publishing nwc_hold_invoice_accepted out of the transaction
frnandu 5f3cc17
fix: move publishing nwc_hold_invoice_accepted out of the transaction
frnandu a3caf37
fix: check the invoice state ACCEPTED before calling the lnClient.Set…
frnandu 0a59793
fix: check the invoice state ACCEPTED before calling the lnClient.Set…
frnandu 4fce7fb
fix: check the invoice state ACCEPTED before calling the lnClient.Set…
frnandu 36fee98
fix: check the invoice state ACCEPTED before calling the lnClient.Set…
frnandu 0360dc5
fix: cancel hold invoice tests
frnandu f56f9a4
fix: make hold invoice tests
frnandu 589ce25
fix: make hold invoice tests
frnandu 228901f
fix: settle hold invoice tests
frnandu d0b4836
fix: resubscribe to pending hold invoices
frnandu bc252ec
fix: missing WatchHoldInvoice
frnandu 2555f89
feat: add LDK impl
frnandu 81c785c
fix: cleanup
frnandu 848fb39
fix: payment_hash
frnandu d3041f4
fix: remove unneeded update
frnandu 2fd58c8
feat: add support for self payments for hold invoices (#1304)
rolznz 9c4949a
fix: remove hold invoices scope
frnandu 75d8b8e
fix: remove hold invoices scope
frnandu 22b6138
fix: mock hold bolt11 expiry to 10 years
frnandu 7586bf6
fix: sleep 1 second to give a change of lookupinvoice to read cancelled
frnandu 616db22
Merge branch 'master' into feat/hold-invoices
frnandu 4e58ac4
fix: missing timeout param
frnandu f875992
feat: add hold invoice settle deadline to transactions (#1324)
rolznz d11533d
Merge remote-tracking branch 'origin/master' into feat/hold-invoices
rolznz 4f26d2f
chore: update mockery, remove unused hold invoice method
rolznz bedadc3
chore: remove unnecessary comment
rolznz 8695f69
chore: remove unused code
rolznz 6ba5e3c
fix: do not return hold transaction if lookup failed
rolznz 8aa27d0
chore: remove unused code
rolznz 6cd6e91
fix: return correct errors from nip47 controllers, remove unused code
rolznz eaf3890
fix: failing test
rolznz 3a5649a
chore: remove unnecessary code
rolznz 1832158
fix: make error message more general
rolznz ea669d2
chore: remove unused code
rolznz 4bbd148
fix: use correct context in lnd service
rolznz 16032c9
fix: unstable hold payments test
rolznz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
filename: "{{.InterfaceName}}.go" | ||
dir: tests/mocks | ||
outpkg: mocks | ||
|
||
# Fix deprecation warnings: | ||
issue-845-fix: True | ||
resolve-type-alias: False | ||
|
||
pkgname: mocks | ||
template: testify | ||
packages: | ||
github.com/getAlby/hub/service: | ||
github.com/getAlby/hub/config: | ||
interfaces: | ||
Service: | ||
|
||
Config: {} | ||
github.com/getAlby/hub/lnclient: | ||
interfaces: | ||
LNClient: | ||
github.com/getAlby/hub/config: | ||
LNClient: {} | ||
github.com/getAlby/hub/service: | ||
interfaces: | ||
Config: | ||
Service: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package migrations | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/go-gormigrate/gormigrate/v2" | ||
"gorm.io/gorm" | ||
) | ||
|
||
var _202505091314_hold_invoices = &gormigrate.Migration{ | ||
ID: "202505091314_hold_invoices", | ||
Migrate: func(db *gorm.DB) error { | ||
|
||
if err := db.Exec(` | ||
ALTER TABLE transactions ADD COLUMN hold BOOLEAN; | ||
ALTER TABLE transactions ADD COLUMN settle_deadline integer; | ||
`).Error; err != nil { | ||
return err | ||
} | ||
|
||
return nil | ||
}, | ||
Rollback: func(tx *gorm.DB) error { | ||
return nil | ||
}, | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.