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

Snap UI fixes from QA-1 #1258

Merged
merged 6 commits into from
Sep 21, 2023
Merged

Snap UI fixes from QA-1 #1258

merged 6 commits into from
Sep 21, 2023

Conversation

abhishek-01k
Copy link
Collaborator

No description provided.

@github-actions
Copy link

File: src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx

  1. Line 4: Remove the extra closing parenthesis at the end of the import statement.
  2. Line 10: Change setConfigure to setConfigureSnap.
  3. Line 15: Add a closing parenthesis after the Method: 'wallet_getSnaps'.
  4. Line 20: Use strict equality operator (===) instead of loose equality operator (==) for snap == 'npm:@pushprotocol/snap'.
  5. Line 30: Remove the extra opening parenthesis before src={PushIcon}.
  6. Line 35: Remove the extra closing parenthesis at the end of the InstallButton component.
  7. Line 36: Remove the extra src and alt attributes before Push Browser Extension.
  8. Line 37: Remove the extra <InstallButton> component.
  9. Line 50: Remove the extra </SnapContainer> closing tag.
  10. Line 54: Remove the extra opening parenthesis before src={AppStoreQRCode}.
  11. Line 54: Add a closing parenthesis after the width='106px'.
  12. Line 59: Add a closing parenthesis after the alt='App store' />.
  13. Line 63: Remove the extra opening parenthesis before fontSize='8px'.
  14. Line 64: Add a closing parenthesis after the fontWeight='400'.
  15. Add the closing brace } after the export default ... line to close the component definition.

File: src/components/MetamaskSnap/MetamaskSnapConfigureModal.tsx

  1. Line 5: Add a closing parenthesis after the useClickAway() function call.
  2. Line 12: Add the missing type for useState() (<string> or <undefined>).
  3. Line 21: Add a closing parenthesis after the params object.
  4. Line 26: Add a missing opening brace { before the if (res) { line.
  5. Line 30: Add a closing parenthesis after the '_blank'.
  6. Add the closing brace } after the export default ... line to close the component definition.

File: src/components/MetamaskSnap/SnapInformationModal.tsx

  1. Line 40: Add a missing closing parenthesis after the 'pushproto_welcome' } object.
  2. Add the closing brace } after the export default ... line to close the component definition.

File: src/components/MobileNavButton.js

  • This file is empty. It can be removed.

File: src/contexts/AppContext.tsx

  1. Line 7: Add a missing closing angle bracket (>) after the useState function call.
  2. Line 23: Add a missing closing angle bracket (>) after the setState function call.

File: src/modules/receiveNotifs/MetamaskPushSnapModal.tsx

  • This file is missing. It should be checked or removed if not needed.

File: src/modules/snap/AboutSnapModal.tsx

  1. Line 23: Add a missing opening brace { after the InfoDetails array declaration.
  2. Line 24-27: Add a missing comma after each object in the InfoDetails array.
  3. Line 24: Add a closing parenthesis after the 'Install MetaMask Snaps by going to app.push.org/snap' string.
  4. Line 25: Add a missing opening brace { after the info: 'Connect your wallet using MetaMask to receive notifications' line.
  5. Line 26: Add a missing opening brace { after the info: 'Opt-in channels on app.push.org/channels and you’re all set.' line.
  6. Line 27: Add a missing opening brace { after the info: 'You can visit app.push.org/snap, click on Settings and Add Wallets, Show All to remove wallets, and Snooze Notification Pop-ups.' line.
  7. Line 29: Add a closing brace } after the map() function call.
  8. Line 40: Add a missing closing parenthesis after the })); line.
  9. Add the closing brace } after the export default ... line to close the component definition.

File

@github-actions
Copy link

File: src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx

  • Line 25: Missing closing parenthesis after the Object.keys() loop.
  • Line 35: Missing closing parenthesis after the first argument of the setSnapState() function call.

File: src/components/MetamaskSnap/MetamaskSnapConfigureModal.tsx

  • Line 11: useState hook is missing its generic type. It should be useState<any>() or better if the type definition is added.
  • Line 12: setWalletSelected should be defined before useClickAway hook.
  • Line 33: handleChange is not defined.
  • Line 35: toggleStatus is not defined.
  • Line 78: export default MetamaskSnapConfigureModal; is placed incorrectly. It should be moved to the end of the file.

File: src/components/MetamaskSnap/SnapInformationModal.tsx

  • Line 20: Missing closing parenthesis after the installSnap() function definition.
  • Line 21: Missing closing parenthesis after the if statement.

File: src/components/MobileNavButton.js

  • No issues found. All looks good.

File: src/contexts/AppContext.tsx

  • Line 12: createContext from react module should be destructured as React.createContext.

File: src/modules/receiveNotifs/MetamaskPushSnapModal.tsx

  • File not found.

File: src/modules/snap/AboutSnapModal.tsx

  • Line 13: InfoDetails array is not closed properly. Each object within the array should be a separate element.

File: src/modules/snap/SnapModule.tsx

  • File not found.

File: src/types/context.ts

  • No issues found. All looks good.

@github-actions
Copy link

File: src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx

  • Line 57: 'ItemVV2' component is not closed properly.
  • Line 66: There is a typo in the comment. It should be 'Extension' instead of 'Extention'.
  • Line 75-81: The code is not properly formatted with indentation.
  • Line 85: 'src' attribute is missing for 'Image' component.
  • Line 100-107: There is a missing closing parenthesis ')' after the 'Push Icon' text.
  • Line 111: There is an extra '' tag.
  • Line 119: 'src' attribute is missing for the first 'Image' component.
  • Line 124: 'ItemHV2' component is not closed properly.
  • Line 150: 'toolTipContent' should be 'tooltipContent'.
  • Line 158: Typo 'EnptyButton' should be 'EmptyButton'.
  • Line 196-197: 'const PrimaryText' and 'const SecondaryText' are not closed properly.
  • Line 222: 'AddressSubContainer' is missing a closing parenthesis ')' after the 'AddressesSubContainer' component.
  • Line 230-236: There is a missing closing parenthesis ')' after the 'RemoveDiv' component.
  • Line 305: 'background' property is missing the closing parenthesis '}' in 'InfoToolTip' component styling.
  • Line 331: 'PrimaryText' and 'SecondaryText' are not closed properly.
  • Line 388: 'font-weight' property is missing the closing parenthesis ')' in 'ToolTipText' component styling.
  • Line 495-497: 'Container' component is not closed properly.

File: src/components/MetamaskSnap/MetamaskSnapConfigureModal.tsx

  • Line 30: 'containerRef' is not defined.
  • Line 35: 'handleWalletSelect' is not typed properly. 'address' should have a type declaration.
  • Line 54: 'AddressesContainer' is missing a closing parenthesis ')' after the 'AddressesContainer' component.
  • Line 60: 'PrimaryText' and 'SecondaryText' are not closed properly.

File: src/components/MetamaskSnap/SnapInformationModal.tsx

  • Line 35: There is a missing closing parenthesis ')' after the 'lockSnap' object is defined.
  • Line 42: There is a missing closing parenthesis ')' after '}' in 'installSnap' function.
  • Line 48: There is a missing closing parenthesis ')' after '}' in 'SnapInformationModal' component.

File: src/components/MobileNavButton.js

  • File is empty. Please provide the code.

File: src/contexts/AppContext.tsx

  • Line 21: 'useState' should be imported from 'react' individually instead of being destructured from 'react'.

File: src/modules/snap/AboutSnapModal.tsx

  • Line 18-26: The elements of 'InfoDetails' object are not wrapped in a curly brace '{}'.

File: src/modules/snap/SnapModule.tsx

  • File is empty. Please provide the code.

File: src/types/context.ts

  • Line 7: There is a missing closing parenthesis ')' after 'setSnapState:any,'.

All looks good.

@github-actions
Copy link

File: src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx

  • Line 49: There is a missing closing parenthesis after snap == 'npm:@pushprotocol/snap'. It should be }) instead of }).
  • Line 64: There is an extra closing parenthesis after the closing brace. Remove the closing parenthesis } before the closing brace.
  • Line 65: There is an extra closing parenthesis after the closing brace. Remove the closing parenthesis } before the closing brace.
  • Line 74: There is an opening brace { without a closing brace }. Add a closing brace } before the closing parenthesis ).

File: src/components/MetamaskSnap/MetamaskSnapConfigureModal.tsx

  • Line 8: The initial value of useState is missing. It should be const [walletSelected, setWalletSelected] = useState(''); instead of const [walletSelected, setWalletSelected] = useState();.
  • Line 23: There is a missing closing parenthesis after the closing brace }. It should be }) instead of }.
  • Line 66: There is an extra closing parenthesis after removeWalletAddresses(walletSelected). Remove the closing parenthesis ) after walletSelected.

File: src/components/MetamaskSnap/SnapInformationModal.tsx

  • Line 23: There is a missing closing parenthesis after window.ethereum?.request({ method: 'wallet_invokeSnap',. It should be }); instead of }).
  • Line 24: The if statement is missing an opening brace {. Add an opening brace { before if (res) {.
  • Line 31: There is an extra closing parenthesis ) after 'https://app.push.org/snap', '_self');. Remove the closing parenthesis ).

File: src/components/MobileNavButton.js

  • No mistakes found. All looks good.

File: src/contexts/AppContext.tsx

  • Line 15: The AppContextProvider component is missing a closing brace }. Add a closing brace } before export default AppContextProvider.

File: src/modules/receiveNotifs/MetamaskPushSnapModal.tsx

  • No code provided. Unable to review.

File: src/modules/snap/AboutSnapModal.tsx

  • Line 12: There is a missing comma after the closing brace } on the previous line. Add a comma , after the closing brace } on line 11.
  • Line 16: There is a missing comma after the closing brace } on the previous line. Add a comma , after the closing brace } on line 15.
  • Line 19: There is a missing comma after the closing brace } on the previous line. Add a comma , after the closing brace } on line 18.
  • Line 22: There is a missing comma after the closing brace } on the previous line. Add a comma , after the closing brace } on line 21.

File: src/modules/snap/SnapModule.tsx

  • No code provided. Unable to review.

File: src/types/context.ts

  • No mistakes found. All looks good.

@github-actions
Copy link

File: src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx

  • Line 26: The closing parenthesis of the forEach function is missing a closing parenthesis. It should be: }).
  • Line 34: There is an unclosed tag starting at <InstallButton onClick={() => setSnapState(2)}>. It should be closed with </InstallButton>.
  • Line 41: There is an unclosed tag starting at src={PushIcon}. It should be closed with />.
  • Line 42: There is a text that is not wrapped in a tag. It should be inside a <SpanV2> tag.
  • Line 66: There is an opening curly brace '{' without a closing curly brace '}'. It should be closed before the return statement.

File: src/components/MetamaskSnap/MetamaskSnapConfigureModal.tsx

  • Line 54: The second if statement is missing the closing parenthesis. It should be if (mode == 2) {.
  • Line 71: There is a closing parenthesis ')' missing after console.log('Signature Validation Failed').
  • Line 81: The onClick attribute of the FilledButton is commented out. It should be uncommented.
  • Line 90: The width property of the Switch component is missing a closing parenthesis after '{44}'.
  • Line 82: The onClick attribute of the EnptyButton has a typo. It should be onClick={getWalletAddresses} instead of onClick={addAddresses}.
  • Line 99: The InfoToolTip component is not returned. It should have a return statement before the Tooltip component.
  • Line 157: The handleWalletSelect function is missing a closing parenthesis after (address) => {.
  • Line 202: The AddressesSubContainer component is missing a key prop. It should be added like key={wallet}.
  • Line 214: The RemoveDiv component is missing a closing parenthesis after <MinusCircle />.
  • Line 222: There is an error in the spelling of the EmptyButton component. It should be EmptyButton instead of EnptyButton.
  • Line 246: The maxWidth: 'fit-content' property in the placementProps should be a string, like maxWidth: 'fit-content'.

File: src/components/MetamaskSnap/SnapInformationModal.tsx

  • Line 32: The connectSnap function is missing a closing parenthesis after method: 'wallet_invokeSnap',.
  • Line 34: The if statement is missing an opening parenthesis after the equals sign. It should be if (res) {.

Overall, the code looks good with these fixes.

@github-actions
Copy link

File: src/components/MetamaskSnap/InstallMetamaskSnapModal.tsx

  • Line 33: It seems there is a typo in the props name. It should be setSnapState instead of setSnapSate.
  • Line 37: There is a missing closing parenthesis ")" after Object.keys(installedSnaps).
  • Line 41: It seems there is a typo in the comparison operator. It should be === instead of ==.
  • Line 70: There is a missing closing parenthesis ")" after the "Install" button component.

All looks good.

File: src/components/MetamaskSnap/MetamaskSnapConfigureModal.tsx

  • Line 12: There is a missing closing parenthesis ")" for the useEffect function.
  • Line 19: There is a missing closing parenthesis ")" after removeWalletAddresses(walletSelected).
  • Line 50: There is a missing closing parenthesis ")" after getSignature(2).
  • Line 58: There is a missing closing parenthesis ")" after {handleChange} on the Switch component.
  • Line 69: The closing parenthesis ")" is missing for the useClickAway function.
  • Line 73: There is a missing closing parenthesis ")" after handleWalletSelect(address).
  • Line 82: There is a missing closing parenthesis ")" after provider.getSigner(account).
  • Line 85: There is a missing closing parenthesis ")" after signer.signMessage(Remove address ${account} to stop receive notifications via Push Snap in MetaMask).

All looks good.

File: src/components/MetamaskSnap/SnapInformationModal.tsx

  • Line 28: There is a missing closing parenthesis ")" after the connectSnap function call.
  • Line 31: There is a missing closing parenthesis ")" after await connectSnap().

All looks good.

@0xNilesh 0xNilesh merged commit 784cc71 into main Sep 21, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done and Merged
Development

Successfully merging this pull request may close these issues.

3 participants