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) #3173

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

CollinsMunene
Copy link

Check quote expiry in outgoing payment worker (#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

@github-actions github-actions bot added pkg: backend Changes in the backend package. type: source Changes business logic labels Dec 11, 2024
Copy link

netlify bot commented Dec 11, 2024

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
🔨 Latest commit a458568
🔍 Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/67592e044700a10008f7c3ee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: backend Changes in the backend package. type: source Changes business logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant