Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

Sdk lightning actions #2107

Merged
merged 16 commits into from
Mar 4, 2020
Merged

Sdk lightning actions #2107

merged 16 commits into from
Mar 4, 2020

Conversation

D4nte
Copy link
Contributor

@D4nte D4nte commented Feb 27, 2020

Proof that comit-network/comit-js-sdk#141 works.

Adds a test that does the flow as expected by HALight using hold invoices.

Ready for review.

@mergify

This comment has been minimized.

@D4nte D4nte force-pushed the sdk-lightning-actions branch 5 times, most recently from 0e34835 to 9dd23ac Compare March 3, 2020 04:34
bors bot added a commit to comit-network/comit-js-sdk that referenced this pull request Mar 3, 2020
141: Add Lightning support for actions r=D4nte a=D4nte

This allows the use of comit-sdk to make current comit-rs e2e lnd tests pass.

See comit-network/comit-rs#2107 for the e2e side.

Resolves #118.

Co-authored-by: Franck Royer <[email protected]>
@D4nte D4nte force-pushed the sdk-lightning-actions branch from 9dd23ac to 0b63a61 Compare March 3, 2020 22:52
@D4nte D4nte marked this pull request as ready for review March 3, 2020 22:53
api_tests/lib/actors/actor.ts Outdated Show resolved Hide resolved
);

const satAmount = "10000";
const finalCltvDelta = 40; // This MUST be 40 to match Bob's invoice. Further investigation needed.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to investigate that in a follow-up PR as we would need to play with AddHoldInvoice and understand whether we can manipulate the finalCtlvDelta of an invoice when adding it or whether it's a global lnd parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this is now resolved locally. The cltvExpiry of addHoldInvoice needs to match the finalCltvDelta on sendPayment when paying the invoice.

Which means that we need to add this cltvExpiry to the ln-add-hold-invoice action payload.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Draft PR is coming :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #2155

@D4nte D4nte force-pushed the sdk-lightning-actions branch from 3e782d7 to 7e0dcc7 Compare March 3, 2020 23:50
Copy link
Contributor

@thomaseizinger thomaseizinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

One blocking comment :)

api_tests/lib/actors/actor.ts Show resolved Hide resolved
api_tests/lib/actors/actor.ts Show resolved Hide resolved
api_tests/lib/ledgers/lnd_instance.ts Outdated Show resolved Hide resolved
api_tests/lib/ledgers/lnd_instance.ts Outdated Show resolved Hide resolved
api_tests/lib/ledgers/lnd_instance.ts Outdated Show resolved Hide resolved
api_tests/lib/ledgers/lnd_instance.ts Show resolved Hide resolved
api_tests/lib/wallets/lightning.ts Outdated Show resolved Hide resolved
);

const satAmount = "10000";
const finalCltvDelta = 40; // This MUST be 40 to match Bob's invoice. Further investigation needed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue.

D4nte added a commit to comit-network/spikes that referenced this pull request Mar 4, 2020
@mergify

This comment has been minimized.

@tcharding tcharding added the no-mergify Stop mergify to merge this automatically label Mar 4, 2020
@D4nte
Copy link
Contributor Author

D4nte commented Mar 4, 2020

bors r+

@D4nte D4nte removed the no-mergify Stop mergify to merge this automatically label Mar 4, 2020
@mergify
Copy link
Contributor

mergify bot commented Mar 4, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 4, 2020

Already running a review

@bors
Copy link
Contributor

bors bot commented Mar 4, 2020

Build succeeded

@bors bors bot merged commit c346b4e into dev Mar 4, 2020
@mergify mergify bot deleted the sdk-lightning-actions branch March 4, 2020 04:57
bors bot added a commit that referenced this pull request Mar 5, 2020
2155: Follow-up of #2107 r=mergify[bot] a=D4nte

Also integrates changes from comit-network/comit-js-sdk#145.

2168: Upgrade node to version 12 r=mergify[bot] a=bonomat

@thomaseizinger found an issue describing incompatibility of the node version we are using on circleCI and jest: jestjs/jest#9453.

The tests are running locally. So let's upgrade circleCI as well. 

Co-authored-by: Franck Royer <[email protected]>
Co-authored-by: Philipp Hoenisch <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants