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

fix: timeout http requests to Milkomeda backend #937

Merged
merged 1 commit into from
Jun 23, 2024

Conversation

rhyslbw
Copy link
Member

@rhyslbw rhyslbw commented Jun 23, 2024

Context

Nami has an integration with Milkomeda, a Cardano EVM sidechain, that involves making at least two HTTP requests to external service, run by Flint Wallet, in the send form on each load. If this service is not responding, sending funds is blocked, even for users not intending to use the sidechain. The current application design is not resilient to this outage, disabling form fields until a response is received. #880 improved error handling, but to handle hanging requests, a client side timeout is required.

Solution

Abort the HTTP requests after 500ms, which should be sufficient time to receive a response without impacting UX.

Screencasts

Server timing out
Requests received

Copy link

sonarcloud bot commented Jun 23, 2024

@rhyslbw rhyslbw requested review from AngelCastilloB and DominikGuzei and removed request for AngelCastilloB June 23, 2024 20:39
Copy link
Member

@DominikGuzei DominikGuzei left a comment

Choose a reason for hiding this comment

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

LGTM 🚢

@rhyslbw rhyslbw merged commit 48b94f5 into main Jun 23, 2024
2 checks passed
@rhyslbw rhyslbw deleted the fix/milkomeda-http-req-timeouts branch June 23, 2024 21:08
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.

2 participants