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

fix: mark push-create-02 as deprecated #1147

Merged
merged 2 commits into from
Mar 6, 2024
Merged

fix: mark push-create-02 as deprecated #1147

merged 2 commits into from
Mar 6, 2024

Conversation

Aman035
Copy link
Member

@Aman035 Aman035 commented Mar 5, 2024

Fixes Issue

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

Copy link

github-actions bot commented Mar 5, 2024

In the file packages/restapi/src/lib/progressHook.ts:

  1. Typo in the comment "PUSH-CREATE PROGRESSHOOKS". It should be corrected to "PUSH-CREATE PROGRESS HOOKS".
  2. Typo in one of the progress items 'PUSH-CREATE-02'. The progress title is missing. It should be added similar to other progress items.
  3. Typo in one of the progress items 'PUSH-CREATE-04'. The progress info should be added similar to other progress items.

In the file packages/restapi/src/lib/user/createUser.ts:

  1. Typo in the imports section. 'isValidETHAddress' is not properly imported. It should be fixed.
  2. Typo in the imports section. 'validatePssword' should be 'validatePassword'.
  3. Missing comma between imports in the imports section.
  4. Typo in the function signature 'export const create = async ()'. The closing parenthesis should be followed by a curly brace '}'. It's missing and should be fixed.
  5. Typo in 'progressHook?: (progress: ProgressHookType) => void;' The parameters should be 'progress: ProgressHookTypeFunction'.
  6. Typo in 'export const createUserCore = async (options: CreateUserProps, pgpHelper: IPGPHelper'. The closing parenthesis after 'IPGPHelper' is missing. It should be corrected.
  7. Typo in the variable declaration 'const passPrefix = '$0Pc';'. The comment mentioning it as a password prefix is missing. It should be added.
  8. Typo in 'const caip10: string = walletToPCAIP10(address);'. The semicolon at the end is missing. It should be fixed.
  9. Typo in 'validatePssword(additionalMeta.NFTPGP_V1.password);'. The function should be 'validatePassword'.
  10. Typo in 'const encryptedPrivateKey: encryptedPrivateKeyType = await encryptPGPKey('. The closing parenthesis is missing. It should be fixed.
  11. Typo in 'if (encryptionType === Constants.ENC_TYPE_V4) {'. The closing parenthesis is missing. It should be corrected.
  12. Typo in 'const encryptedPrivateKey: encryptedPrivateKeyType = await encryptPGPKey('. The closing parenthesis is missing. It should be fixed.
  13. Typo in 'const body = {'. The closing curly brace should be followed by a comma. It's missing.
  14. Typo in ' const createdUser: ICreateUser = await createUserService(body);'. The semicolon at the end is missing. It should be fixed.
  15. Typo in ' const encryptedPassword: encryptedPrivateKeyTypeV2 = await encryptPGPKey('. The closing parenthesis is missing. It should be fixed.
  16. Typo in 'const errorProgressHook = PROGRESSHOOK['PUSH-ERROR-00'] as ProgressHookTypeFunction;'. The closing square bracket should be followed by a semicolon. It's missing and should be added.

All other parts of the code look good.

I recommend addressing the mentioned issues.

Copy link

github-actions bot commented Mar 6, 2024

In the file packages/restapi/src/lib/progressHook.ts:

  1. Line 14 to 30: The comments starting with // are incorrect and should be removed as they are not valid comments in this context.
  2. Some objects are missing the progressInfo field, which may cause issues in the data structure.
  3. The object under 'PUSH-CREATE-02' key has an incorrect structure. It should be modified to have the correct keys and values.

In the file packages/restapi/src/lib/user/createUser.ts:

  1. There are missing imports in the code block starting from line 9. Make sure to include them correctly.
  2. Line 75: The closing parenthesis for the function create is missing.
  3. Line 134: The validatePssword function should be corrected to validatePassword.
  4. Line 153: The if block starting from validatePssword is missing a closing curly brace }.
  5. Line 204: The assignment of encryptedPrivateKey is missing a closing parenthesis.
  6. Line 212: The closing curly brace } is missing for the block if (encryptionType === Constants.ENC_TYPE_V4).
  7. Line 217: The line encryptedPrivateKey.encryptedPassword = encryptedPassword; is trying to access a property on an undefined variable encryptedPrivateKey. It should be assigned to encryptedPrivateKey instead.
  8. Line 228: The object body should have a closing curly brace }.
  9. Line 243: The throw Error() statement should provide a more descriptive error message for easier debugging.

Other than the mentioned issues, the code in both files looks good.

Let me know if you need further assistance.

@Aman035 Aman035 merged commit 46e119e into main Mar 6, 2024
1 check passed
@Aman035 Aman035 deleted the remove-push-create-02 branch March 6, 2024 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants