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

add internet connection checker and handler #41

Merged
merged 3 commits into from
Apr 29, 2024
Merged

add internet connection checker and handler #41

merged 3 commits into from
Apr 29, 2024

Conversation

mmpotulo28
Copy link
Member

No description provided.

Copy link

Visit the preview URL for this PR (updated for commit 239ed67):

https://brainiacwiz--pr41-mmpotulo-xtfkt25f.web.app

(expires Mon, 06 May 2024 20:43:29 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: aff57accd7fb79ba1d7bf7e70bd8fcad77b0db3f

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @mmpotulo28 - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟡 Testing: 1 issue found
  • 🟢 Complexity: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@@ -3,12 +3,62 @@ import { getState, metaConnection } from './metamask.js';

class Navbar {
constructor() {
this.checkInternetConnection();
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion (testing): Missing tests for the new checkInternetConnection method.

The PR introduces a new method checkInternetConnection which handles internet connectivity checks and UI updates. It's crucial to ensure this functionality works as expected under different scenarios (online, offline, transitioning between states). Please add unit tests to verify the behavior of this method, including edge cases such as rapid switching between online and offline states.

@mmpotulo28 mmpotulo28 merged commit dfbb7e5 into main Apr 29, 2024
6 checks passed
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