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(PE-5031): Block network calls when no network and show banner #400

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

atticusofsparta
Copy link
Contributor

adds service handler wrapper to control method access when no network is detected

Copy link

github-actions bot commented Jan 11, 2024

Visit the preview URL for this PR (updated for commit 91fe7ea):

https://arns-portal--pr400-pe-5031-no-network-h-1p3xz41r.web.app

(expires Thu, 25 Jan 2024 14:33:18 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 1f59769442cb89cf2a92042a342e51fe94047b94

warpDataProvider,
contractCacheProviders,
),
) as any as ArweaveCompositeDataProvider;
Copy link
Contributor

Choose a reason for hiding this comment

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

I wouldn't do this. Need to review more to offer a suggestion but you're force casting the type of the class to another class.

Copy link
Contributor

@dtfiedler dtfiedler Jan 11, 2024

Choose a reason for hiding this comment

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

can we wrap fetch with an interceptor that checks for connection before sending an HTTP request? Also, not sure you entirely need to go down this route. I agree with the UI showing lack of connection but the way this implemented is not how/where I'd expect. I believe it should be at the HTTP client level.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed the service controller wrapper, will just do the UI notification for now.

@atticusofsparta atticusofsparta merged commit bf557e2 into develop Jan 11, 2024
5 checks passed
@atticusofsparta atticusofsparta deleted the PE-5031-no-network-handling branch January 11, 2024 22:31
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