Skip to content
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

feat(backend):Check quote expiry in outgoing payment worker (#3141) #1

Merged
merged 1 commit into from
Dec 11, 2024

Conversation

CollinsMunene
Copy link
Owner

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)

Also, so as to enable better error handling and debugging, we should add a new lifecycle error for showing quote has expired.

Checklist

  • Related tasks linked at issue #3141
  • Add check if payment quote has expired under lifecycle.handleSending
  • Add QuoteExpired error under LifecycleError enum

@CollinsMunene CollinsMunene merged commit a9c7234 into main Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant