-
Notifications
You must be signed in to change notification settings - Fork 89
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
Check quote expiry in outgoing payment worker #3141
Comments
Hi @mkurapov , I have made a change where if the quote expiresAt time is the same as the current time, then it handles the payment failure. Is this the desired effect? |
@CollinsMunene yes 👍 and to confirm, outgoing payment should not be retried. |
@mkurapov that's noted, so here is the implementation attached, Kindly confirm if this is okay. |
Hi @mkurapov, I also noticed on the webhooks, can we also add an error description. For example, when the outgoing_payment.failed is raised when the quote expiry time has reached. The webhook does not really say why it has failed. It would be nice to see a reason like "quote has expired" or even in any other instance of failure, makes it easy to debug. So same thing as the payment, we can have metadata for webhooks |
Hi @CollinsMunene,
Yes, agreed with this, would be much more helpful. I think by adding a new enum value to |
feat(backend):Check quote expiry in outgoing payment worker (interledger#3141)
Context
Currently, we check the
expiresAt
of the quote during outgoing payment creation. If it is valid, we create the outgoing payment, store it in the DB.Once the payment is funded, the outgoing payments worker starts processing the payment, whether that is local or over ILP. If the payment fails, it will stay in the SENDING state and the worker will keep retrying it (up to some maximum number of times).
In the worker, however, we do not check the expiry of the quote. The quote could expire between the time when we created the payment, and when it is being processed (or retried) in the worker. We should prevent processing an outgoing payment for an expired quote. (good spot would be in
lifecycle.ts > handleSending
)Todos
outgoing_payment.failed
webhook is correctly sent.The text was updated successfully, but these errors were encountered: