-
Notifications
You must be signed in to change notification settings - Fork 45
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
Yield call to send_payment after a timeout and return a pending payment #943
Draft
dangeross
wants to merge
2
commits into
main
Choose a base branch
from
savage-send-payment-yield
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
dangeross
commented
Apr 23, 2024
dangeross
force-pushed
the
savage-send-payment-yield
branch
from
April 23, 2024 13:19
772e7f7
to
1128f90
Compare
ok300
reviewed
Apr 25, 2024
dangeross
force-pushed
the
savage-send-payment-yield
branch
from
April 30, 2024 07:26
4a730da
to
fd46a2f
Compare
dangeross
force-pushed
the
savage-send-payment-yield
branch
from
April 30, 2024 08:11
fd46a2f
to
cd99a34
Compare
roeierez
requested changes
May 2, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small simplification suggested.
@@ -749,6 +750,7 @@ dictionary SendPaymentRequest { | |||
string bolt11; | |||
u64? amount_msat = null; | |||
string? label = null; | |||
u64? pending_timeout_sec = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? Why not using the payment_timeout from the config?
The failing tests would be fixed by #958 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This adds the following to the SDK:
send_payment()
request in a thread with a timeout to prevent the method call hanging too long. If it times out, the pending Payment is returned and the client can then use the PaymentSucceed / PaymentFailed events to handle the completion of the payment.lnurl_pay()
request (which usessend_payment()
) without a timeout.