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

Yield farming user deposit UI fix #1495

Merged
merged 7 commits into from
May 13, 2024
Merged

Conversation

abhishek-01k
Copy link
Collaborator

@abhishek-01k abhishek-01k commented Apr 23, 2024

Things to review:

  • User Deposit in Yield Farming gets null when the dapp reloads.
  • The dropdown on the header was not working, now its fixed. Check for mobile version too.
  • When you set chain to something else other than sepolia or ethereum, you get a modal in Yield Farming asking you to change the network, check if this is working fine or not. Also, check the dark mode for this modal.
  • When this modal appears, scroll the page and see if this overlaps the header or not.

Copy link

vercel bot commented Apr 23, 2024

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

Name Status Preview Comments Updated (UTC)
push-dapp ❌ Failed (Inspect) May 13, 2024 0:19am

Copy link

In the App.tsx file:

  1. dotenv.config(); is missing a required closing parentheses ().

  2. In the extendConsole function, there is a missing closing curly brace } after the window.console[level] = function () { }; line.

  3. In the same extendConsole function, there is a missing closing curly brace } after the } else { line.

  4. In the extendConsole function, the catch block is missing closing curly braces } after console.debug(e);.

  5. The Provess App comment should be spelled as Process App.

  6. In the GlobalStyle variable, setcurrentTime should be corrected to setCurrentTime.

  7. Inside the JSX structure, the <MasterInterfacePage /> and <SpaceWidgetSection /> components should be wrapped inside a closing and opening <div> tag respectively.

  8. In the HeaderContainer styled component, there is a missing closing curly brace }.

  9. In the ParentContainer styled component, there is a missing closing curly brace }.

  10. In the LeftBarContainer styled component, there is a missing closing curly brace }.

  11. In the ContentContainer styled component, there is a missing closing curly brace }.

In the YieldFarmChainError.tsx file:

  1. The useEffect hook at line 26 is missing a closing curly brace }.

  2. In the Container styled component at line 69, there is an unclosed template literal string.

  3. In the SecondaryText styled component at line 94, there is a missing closing curly brace }.

  4. In the ButtonContainer styled component at line 98, there are no styles defined inside it, consider removing it.

In the Profile.tsx file:

  1. In the anonymous arrow functions for defining variables within useContext, the type destructuring is incorrect. Use colon : instead of equal =.

  2. In the // Internal Components section, the import for Dropdown is incorrect. It should be imported from the correct path.

  3. In the useClickAway at line 171, it is missing a closing curly brace }.

  4. The ConnectWallet function at line 196 is missing a closing curly brace }.

  5. In the JSX structure, the closing curly brace } at the end of the useClickAway function at line 220 is missing.

  6. In the ToggleArrowImg component at line 269, the closing /> tag is missing.

  7. In the Wallet styled component at line 310, there is a missing closing curly brace }.

This is a detailed list of issues found in the provided files. Please make the necessary corrections.

Copy link

In the file src/App.tsx:

  1. There is a typo in the useState hook where 'setcurrentTime' should be 'setCurrentTime'.
  2. The extendConsole function is missing closing braces and parenthesis.
  3. The console.enable function inside the extendConsole function is missing a closing curly brace.
  4. The logic to check 'window.console' should be 'typeof window.console' instead of direct comparison with string 'undefined'.
  5. There is a typo in the useState hook where 'sidebarCollapsed' is used without being defined. It should be 'setSidebarCollapsed'.
  6. The 'SpacesUIProvider' component in the return statement is not properly closed with a closing tag.
  7. There is a typo in the 'setcurrentTime' function where it should be 'setCurrentTime'.
  8. The 'HeaderContainer' styled component is missing a closing curly brace.
  9. The 'ParentContainer' styled component is missing a closing curly brace.
  10. The 'LeftBarContainer' styled component is missing a closing curly brace.
  11. The 'ContentContainer' styled component is missing a closing curly brace.
  12. The component should be rendered inside the SpacesUIProvider component.

In the file src/components/YieldFarmChainError.tsx:

  1. The 'useEffect' hook is missing a closing parenthesis.
  2. The onClose function is missing a closing curly brace.
  3. The 'Container' styled component is missing a closing curly brace.
  4. The 'BodyContainer' styled component is missing a closing curly brace.
  5. The 'PrimaryText' styled component is missing a closing curly brace.
  6. The 'SecondaryText' styled component is missing a closing curly brace.
  7. The 'FilledButton' styled component is missing a closing curly brace.

In the file src/helpers/pushStaking/src/index.ts:

  1. In the 'getUserPushStakingInfo' function, there is a typo in 'avilableRewardHelper', it should be 'availableRewardHelper'.

Overall, some typos and missing closing braces need to be corrected in the code provided.

All looks good.

Copy link
Collaborator

@mishramonalisha76 mishramonalisha76 left a comment

Choose a reason for hiding this comment

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

Switching networks pops up the metamask to change the netowrk automatically, clicking on the switch network button dosnot do anything. Is it the rigth functionality?

Copy link

github-actions bot commented May 1, 2024

In the App.tsx file:

  1. There is a typo in the useEffect hook where setcurrentTime should be changed to setCurrentTime.
  2. The extendConsole function is missing closing curly braces at the end.
  3. In the App component, there are missing closing curly braces } for the if conditions within the JSX structure.
  4. There is a typo where setSidebarCollapsed should be changed to setSidebarCollapsed.
  5. There is a missing closing tag for the SpacesUIProvider component.
  6. The HeaderContainer and ParentContainer components have missing closing curly braces } at the end.
  7. The LeftBarContainer and ContentContainer components have missing closing curly braces } and ) respectively.

In the YieldFarmChainError.tsx file:

  1. The useEffect hook is missing a closing curly brace } at the end.
  2. In the BodyContainer component, there is a typo where font-family: Strawford; should be font-family: 'Strawford';.
  3. The ButtonContainer component is empty and can be removed as it's not being used.

In the pushStaking/src/index.ts file:

  1. There are typos in the variable names avilableRewardHelper should be availableRewardHelper and claimedR should be claimedRewards.

Overall there are quite a few typos and missing closing characters in the files mentioned above. The logic also needs to be checked thoroughly for bugs or improvements.

Please correct the identified issues and review the logic for any further optimizations.

Copy link

github-actions bot commented May 1, 2024

In the src/App.tsx file:

  1. There is a typo in the variable name setcurrentTime, it should be setCurrentTime.
  2. There are syntax errors in the extendConsole function. The closing curly braces are not matching properly.
  3. There is a misspelling in the setSidebarCollapsed variable, it should be setSidebarCollapsed.
  4. There is a logic issue in the GlobalStyle component where the padding-right property is set to 0. It should be padding
  5. In the SpacesUIProvider component, the closing > is missing after passing the theme prop.
  6. In the HeaderContainer styled component, the closing backtick for the template string is missing.
  7. In the ParentContainer styled component, the closing backtick for the template string is missing.
  8. In the LeftBarContainer styled component, the closing backtick for the template string is missing.
  9. In the ContentContainer styled component, the closing backtick for the template string is missing.
  10. In the PushLogo styled component, the closing backtick for the template string is missing.

In the src/components/YieldFarmChainError.tsx file:

  1. The useEffect hook is missing a closing curly brace.
  2. In the PrimaryText styled component, the font-family value is incomplete.
  3. In the YieldFarmChainError component, the ButtonContainer styled component is empty, it should be removed.

In the src/helpers/pushStaking/src/index.ts file:

  1. There is a typo in the variable name avilableRewardHelper, it should be availableRewardHelper.

File paths for src/primaries/Profile.tsx, src/sections/yield/NewYieldFarming.tsx, src/singletons/YieldFarmingDataStoreV2.js were provided but no content was shown for review.

Therefore, the summary of the corrections is:

  • Fix the typo in the setCurrentTime variable.
  • Correct the syntax errors in the extendConsole function.
  • Fix the misspelling in the setSidebarCollapsed variable.
  • Rectify the logic issue in the GlobalStyle component by changing the padding-right property to padding.
  • Add the missing closing > after passing the theme prop in the SpacesUIProvider component.
  • Add the missing closing backticks in the styled components HeaderContainer, ParentContainer, LeftBarContainer, ContentContainer, and PushLogo.
  • Add the missing closing curly brace in the useEffect hook in the YieldFarmChainError component.
  • Complete the font-family value in the PrimaryText styled component.
  • Remove the empty ButtonContainer styled component.
  • Correct the typo in the variable name avilableRewardHelper to availableRewardHelper.

After making these changes, the code should be ready for further testing.

Copy link
Collaborator

@mishramonalisha76 mishramonalisha76 left a comment

Choose a reason for hiding this comment

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

LGTM, but the merge conflict needs to be fixed

@@ -81,15 +81,15 @@ const extendConsole = () => {
window.console = {};
}
if (window.console[level] === 'undefined' || !window.console[level] || window.console[level] === null) {
window.console[level] = function () {};
window.console[level] = function () { };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we need this in the first place. Can't these be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I am not sure why this is present here.

}
if (enabled) {
if (disabledConsoles[level]) {
window.console[level] = disabledConsoles[level];
}
} else {
disabledConsoles[level] = window.console[level];
window.console[level] = function () {};
window.console[level] = function () { };
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same

src/components/YieldFarmChainError.tsx Outdated Show resolved Hide resolved
@@ -88,11 +88,11 @@ const Profile = ({ isDarkMode }) => {
setShowDropdown(false);
});

const ConnectWallet = ()=>{
const ConnectWallet = () => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const ConnectWallet = () => {
const handleConnectWallet = () => {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in new commit

src/primaries/Profile.tsx Outdated Show resolved Hide resolved
src/sections/yield/NewYieldFarming.tsx Outdated Show resolved Hide resolved
src/singletons/YieldFarmingDataStoreV2.js Outdated Show resolved Hide resolved
Copy link

In the src/App.tsx file:

  1. There is a typo in the variable name setcurrentTime should be setCurrentTime.
  2. In the extendConsole function, there are syntax errors. The closing curly braces are missing for multiple if statements.
  3. The comment // Provess App is a typo and should be // Process App.

In the src/components/YieldFarmChainError.tsx file:

  1. There is a missing closing curly brace for the useEffect.
  2. In the PrimaryText styled component, there is a typo in font-family: Strawford;, it should be font-family: 'Strawford';.
  3. The styles for Container, BodyContainer, PrimaryText, and SecondaryText are missing closing backticks.
  4. In the ButtonContainer styled component, the styles are missing.
  5. The ButtonContainer component needs to wrap the children components properly.

In the src/helpers/pushStaking/src/index.ts file:

  1. There seems to be no issue. Code looks correct.

In the src/primaries/Profile.tsx file:

  1. toggleArrowRef is used before being defined. It should be defined before using it.
  2. In the Wallet styled component, the onClick handler should be passed correctly.
  3. The ItemModal component needs to be wrapped inside the div.
  4. There seems to be a missing closing curly brace for the useClickAway function.
  5. In the Wallet styled component, there is a missing closing backtick for the styled component.
  6. The CSS styles are missing for DropdownItem and ProfileModal.

In the src/sections/yield/NewYieldFarming.tsx and src/singletons/YieldFarmingDataStoreV2.js files:

No content provided for the above two files.

Please make the necessary corrections based on the feedback provided above.

@HarshRajat HarshRajat merged commit 5076dcf into main May 13, 2024
2 of 3 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.

🐛 [BUG] - Yield Farming user Deposit Issue
4 participants