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

Enabled browser notif feature again #1475

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

Conversation

0xNilesh
Copy link
Member

No description provided.

Copy link

vercel bot commented Mar 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
push-dapp ❌ Failed (Inspect) Apr 3, 2024 1:41am

@0xNilesh 0xNilesh linked an issue Mar 27, 2024 that may be closed by this pull request
Copy link

All looks good.

@0xNilesh 0xNilesh marked this pull request as ready for review March 28, 2024 10:50
Copy link

In the src/App.tsx file:

  1. Line 81: Typo in variable name, change setcurrentTime to setCurrentTime.
  2. Line 86: useContext should be imported from 'react' at the top.
  3. Line 99: Typo in variable name, change pgpPvtKey to pgpPrvKey.
  4. Line 134: Typo in dispatch action, change resetSendSlice to resetCanSendSlice.
  5. Line 152: Typo in useEffect dependency array, change [account] to [account, dispatch].
  6. Line 161: Typo in function name, change useInactiveListener to useInactiveListeners.
  7. Lines 187-194: Incorrect comment termination for the useEffect hook causing syntax errors.
  8. Lines 198-204: Missing closing curly brace for the toggleDarkMode function block.
  9. Lines 205-218: 'if' condition block is not closed properly and there's missing indentation.
  10. Lines 205-218: 'localStorage.setItem('response')' should have a comma separated second parameter.
  11. Line 216: Typo 'Collapsable' should be 'Collapsible'.
  12. The code lacks proper indentation and formatting in some areas.

In the src/api/index.js file:

  1. Line 41: Typo in the comment section for postReq function.

In the src/helpers/CaipHelper.ts file:

  1. Line 40-51: Syntax error due to missing closing curly braces for the functions getCAIPObj and getCAIP.

In the src/helpers/RoutesHelper.ts file:

  1. Line 24: Missing closing curly brace for the channelsServiceEndpoints object.

Overall, there are several typos, syntax errors, and formatting issues in the code provided. Recommended actions have been listed above to address these observations.

Please make the necessary changes based on the suggestions provided.

Copy link

In the file src/App.tsx:

  1. There is a typo in the variable declaration setcurrentTime, it should be setCurrentTime instead.
  2. There is a missing closing curly brace } after setting the dark mode theme in the toggleDarkMode function.
  3. There is a missing closing curly brace } after setting the sidebar state in the else block of loading the theme from localStorage.
  4. The logic for setting the theme from localStorage is missing the closing curly brace } after checking if data exists.
  5. The code checks for appConfig.appEnv twice for 'prod', one of them can be removed as it's redundant.
  6. The usage of console.enable is not a standard JavaScript function, it may need to be replaced with something different based on the intended functionality.

In the file src/api/index.js:

  1. There is a typo in the variable name BASE_URL, it should be baseUrl for consistency.

In the file src/helpers/CaipHelper.ts:

  1. There is a missing closing curly brace } after the getCAIPObj function.
  2. The getCAIP function has two return statements, one of them should be removed.
  3. There is a missing closing curly brace } after the convertAddressToPartialCaip function.
  4. In the convertAddrCaipToAddress function, there is a missing closing curly brace } after the error handling.
  5. The convertChainCaipToChainId function returns a string but should return a number based on its usage.
  6. In the convertChainCaipToChainId function, there is a missing closing curly brace } after the return statement.

In the file src/services/deliveryNode/registerDeviceToken.ts:

  1. There is a missing closing curly brace } at the end of the registerDeviceToken function.

Please address these issues in the respective files to ensure the code is correct.

Copy link

github-actions bot commented Apr 1, 2024

In the App.tsx file, there are several issues and potential improvements:

  1. Typo in variable name setcurrentTime, it should be setCurrentTime for consistency.
  2. Typo in variable name react should be React in the import statement.
  3. The if condition for appConfig?.appEnv === 'prod' is repeated twice. You can remove the second occurrence.
  4. The SidebarCollapsable variable is missing a closing bracket and it's not being used anywhere in the code. You should either remove it or use it accordingly.
  5. The getLocalToken function is defined but not being used.
  6. In the getPushToken function, the parameter TOKEN_KEY is not required. You can remove it from the getLocalToken function.
  7. In the getCAIP function, there are two return statements, only one should be present.
  8. In the getCAIPObj function, the last return statement is missing a closing bracket }.

The api/index.js, config-dev.js, config-prod.js, config-staging.js, hooks/useBrowserNotification.ts are empty or incomplete and do not have any issues.

In the CaipHelper.ts file:

  1. There is a missing closing bracket } in the getCAIPObj function.
  2. There is an unreachable return statement in the getCAIP function. You can remove it.

Overall, the code has some typos, missing logic, and unused variables. After addressing the mentioned issues, please review the logic and functionality in the files. If everything works as intended after the adjustments, please mark with "All looks good."

@hrithik73 hrithik73 self-requested a review April 2, 2024 11:01
@HarshRajat HarshRajat self-requested a review April 2, 2024 12:40
Copy link

github-actions bot commented Apr 3, 2024

All looks good.

Copy link

github-actions bot commented Jun 3, 2024

The code looks good. All files are properly imported and structured with no evident errors or typos.

'All looks good.'

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.

Add web notifications in the dApp
5 participants