push-protocol / push-dapp

The Push Protocol Dapp
https://app.push.org
Other
45 stars 39 forks source link

Update BASE and LINEA support #1754

Closed corlard3y closed 1 month ago

corlard3y commented 2 months ago

Pull Request Template

1636

Description

Type of Change

Checklist

Frontend Guidelines

Build & Testing

Screenshots/Video with Explanation

Additional Context

Review & Approvals

Notes

github-actions[bot] commented 2 months ago

I will review the provided code files and provide feedback accordingly. Let's start with the files.

  1. File: public/svg/Linea.svg:

    • The SVG syntax appears to be correct.
    • Ensure the paths and clip paths are correctly defined and used in the SVG.
  2. File: src/components/ChannelDetails.jsx:

    • There are some logical errors and missing code blocks in the file.
    • There are issues with the handling of channel expiry dates and times. The logic for checking if the channel has expired seems incorrect.
    • Variable channelIsActive and channelIsDeactivated are derived from incorrect variables.
    • Typo in variable name CHANNNEL_DEACTIVATED_STATE.
    • Missing code block for addDelegate function.
    • Unhandled promise rejection in removeDelegate function.
    • Some unexpected closing braces in the file.
  3. File: src/components/ChannelSettingsDropdown.tsx:

    • The provided code snippet seems truncated. I can't provide feedback without seeing the complete code.
  4. File: src/components/NavigationButton.jsx:

    • Incorrect switch cases with missing break statements.
  5. Other files:

    • The rest of the files were not provided in full, hence I couldn't review them.

Overall, the code provided for review has various issues that need to be addressed. Please correct the identified mistakes and incomplete sections and then provide the full code for the remaining files to conduct a thorough review.

Let me know if you need further assistance or clarification on any specific part of the code.

github-actions[bot] commented 2 months ago

PR Preview Action v1.4.7 :---: Preview removed because the pull request was closed. 2024-08-20 14:57 UTC

github-actions[bot] commented 2 months ago

svg/Linea.svg file:

  1. A closing </g> tag is missing at the end of the file.
  2. There is a missing closing </svg> tag at the end of the file.

Faucets.tsx file:

  1. The array of objects is missing proper formatting with commas and correct object structures.
  2. Multiple object properties are defined with the same key (id, value, title, link).
  3. The spacing and alignment of the code seem inconsistent.

VerifyAlias.tsx file:

  1. The checkAlias function is missing a closing bracket after the submitAlias function call.
  2. Multiple objects within the Faucets object are missing closing curly braces.
  3. The checkAliasVerification function is missing closing brackets after the return { aliasVerified };.
  4. The submitAlias function has inconsistent logic for setting/loading states.
  5. There are missing closing brackets and inconsistent spacing in several places within the file.

YieldPoolCard.tsx file:

  1. The massClaimRewardsTokensAll function is missing a closing bracket after the } else {.
  2. The withdrawTokens function has a missing closing bracket for the if (txInProgressWithdraw) condition.
  3. The migrateToNewPool function is missing a closing bracket for the if (txInProgressMigrate) condition.
  4. The depositLpToken function is missing proper error handling for the tx.then function.
  5. The depositPushToken function is missing a closing bracket for the if (txInProgressMigrate) condition.
  6. There are missing closing brackets and inconsistent spacing in several places within the file.

config-prod.js file:

  1. The aliasRPC object has keys for chains 10, 1101, which do not have corresponding data defined.
  2. There are missing closing brackets for objects within the aliasRPC object.
  3. The label, name, chainid properties for certain chains within the config object are lowercase, while others are uppercase.

It seems like there are multiple syntax errors, missing brackets, and inconsistencies that need to be corrected in the provided files.

github-actions[bot] commented 2 months ago

In "public/svg/Linea.svg":

In "src/components/Faucets.tsx":

In "src/components/VerifyAlias.tsx":

In "src/components/yield/YieldPoolCard.tsx":

In "src/config/config-prod.js":

Please make the necessary corrections based on the above feedback.

github-actions[bot] commented 2 months ago

I found some mistakes in the code:

  1. In the Linea.svg file, there is a closing tag missing for the <g> element at the end of the file.
  2. In the ChangeNetwork.tsx file, there is a missing closing angle bracket '>' after setting the margin property in the <Box> component.
  3. In the Faucets.tsx file, the faucet objects are not correctly structured. Each object should have id, value, title, function, and link properties inside curly braces.
  4. In the VerifyAlias.tsx file, there are missing closing curly braces '}' for some of the objects inside the Faucets object.
  5. In the YieldPoolCard.tsx file, there are missing closing curly braces '}' for some of the functions like checkAlias, checkAliasVerification, and withdrawTokens.
  6. In the CaipHelper.ts file, there are missing closing curly braces '}' for some of the objects.

Please, make the necessary corrections.

github-actions[bot] commented 2 months ago

All looks good.

github-actions[bot] commented 1 month ago

In the given code snippets, I found several issues and potential improvements:

  1. In public/svg/Linea.svg:

    • There is a missing closing tag for <defs>.
    • The closing tag for path elements should not be self-closing. Correct it in both clipPath elements.
    • There is an extra double quote at the end of the first clipPath element.
    • The closing tag for the SVG <svg> element is missing.

    Code Review Findings:

    • Update the svg file according to the corrections above.
  2. In src/components/ChangeNetwork.tsx:

    • The <Button> component is not properly nested inside the Box component. Move the closing </Box> tag after the closing </Button> tag.

    Code Review Findings:

    • Rearrange the nesting structure so that the <Button> component is properly nested inside the Box component.
  3. In src/components/Faucets.tsx:

    • The faucet objects are not properly structured inside the array.
    • The structure for each faucet object needs to be corrected to have id, value, title, function, and link properties.

    Code Review Findings:

    • Correct the structure of the faucet objects so that each object follows the correct format with all necessary properties.
  4. In src/components/VerifyAlias.tsx:

    • The Faucets object has syntax errors. The objects within the Faucets object are not properly defined.
    • There are missing closing braces for some objects within the Faucets object.

    Code Review Findings:

    • Correct the structure of the Faucets object and ensure each object is properly defined with the necessary properties.
  5. In src/config/config-dev.js:

    • There are commented-out lines in the allowedNetworks array. Clean up the commented lines to improve readability.
    • Some object definitions within the Faucets object are missing closing braces.
    • There are missing commas between the faucet objects in the Faucets object.

    Code Review Findings:

    • Properly format the allowedNetworks array and ensure correct object syntax within the Faucets object.
  6. Overall, there are syntax errors, missing closing tags, and inconsistencies throughout the codebase. It's essential to review and correct these issues to ensure the code works as intended.

Please make the necessary corrections based on the feedback provided and recheck the code before deployment. Let me know if you need further assistance or more specific feedback on any particular section.

All looks good.