dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  const onImage = (event: any) => {
    const input = event.target as HTMLInputElement;

    if (input.files) {
      const reader = new FileReader();
Severity: Major
Found in client-web/src/pages/Profile/NewItemModal.tsx and 1 other location - About 5 hrs to fix
client-web/src/pages/MintNft/MintNft.tsx on lines 29..46

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 150.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  const onImage = (event: any) => {
    const input = event.target as HTMLInputElement;

    if (input.files) {
      const reader = new FileReader();
Severity: Major
Found in client-web/src/pages/MintNft/MintNft.tsx and 1 other location - About 5 hrs to fix
client-web/src/pages/Profile/NewItemModal.tsx on lines 32..49

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 150.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File ProfileScreen.tsx has 404 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
Copyright 2019-2021 (c) Dappros Ltd, registered in England & Wales, registration number 11455432. All rights reserved.
You may not use this file except in compliance with the License.
You may obtain a copy of the License at https://github.com/dappros/ethora/blob/main/LICENSE.
*/
Severity: Minor
Found in client-reactnative/src/Screens/Profile/ProfileScreen.tsx - About 5 hrs to fix

Function ChatDragItem has 142 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ChatDragItem = (props: ChatDragItemProps) => {

    const ref = useRef();

    const [animation, setAnimation] = useState(new Animated.Value(0));
Severity: Major
Found in client-reactnative/src/components/RoomList/ChatDragItem.tsx - About 5 hrs to fix

File Message.tsx has 399 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useMemo, useState } from "react";
import {
  Message as KitMessage,
  MessageModel,
  MessageSeparator,
Severity: Minor
Found in client-web/src/components/Chat/Messages/Message.tsx - About 5 hrs to fix

Function MainHeader has 139 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const MainHeader = observer(() => {
  const {chatStore, apiStore, loginStore} = useStores();
  const navigation = useNavigation<HomeStackNavigationProp>();
  const route = useRoute();
  const buttons = [
Severity: Major
Found in client-reactnative/src/components/MainHeader/MainHeader.tsx - About 5 hrs to fix

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export async function repeatMessage(
  participant: Participant,
  questions: Question[],
  participants: { [key: string]: Participant },
  onEnd: (p: Participant, client: Client, walletAddress: string) => Promise<void>,
Severity: Major
Found in bots/createBot/src/utils.ts and 1 other location - About 5 hrs to fix
bots/exportToUSDC/src/utils.ts on lines 48..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 145.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

export async function repeatMessage(
  participant: Participant,
  questions: Question[],
  participants: { [key: string]: Participant },
  onEnd: (p: Participant, client: Client, walletAddress: string) => Promise<void>,
Severity: Major
Found in bots/exportToUSDC/src/utils.ts and 1 other location - About 5 hrs to fix
bots/createBot/src/utils.ts on lines 48..63

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 145.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function UsernameSignUpForm has 137 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function UsernameSignUpForm(props: TProps) {
  const history = useHistory();
  const setUser = useStoreState((state) => state.setUser);

  const [showPassword, setShowPassword] = useState(false);
Severity: Major
Found in client-web/src/pages/Signon/UsernameSignUpForm.tsx - About 5 hrs to fix

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export const defaultChatBackgroundThemes = [
  {
    value:
      'https://etofs.com/ipfs/QmaRpkWFgMhxjp6kkugCYNTF9rE4vmXdfHE4DVNDvzwTvK',
    isSelected: false,
Severity: Major
Found in client-web/src/config/config.ts and 1 other location - About 5 hrs to fix
client-reactnative/docs/config.ts on lines 94..143

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 143.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

const defaultChatBackgroundTheme = [
  {
    value:
      'https://etofs.com/ipfs/QmaRpkWFgMhxjp6kkugCYNTF9rE4vmXdfHE4DVNDvzwTvK',
    isSelected: false,
Severity: Major
Found in client-reactnative/docs/config.ts and 1 other location - About 5 hrs to fix
client-web/src/config/config.ts on lines 105..154

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 143.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

            <TextField
              margin="dense"
              inputProps={{
                autoComplete: "off",
              }}
Severity: Major
Found in client-web/src/pages/Signon/OwnerLogin.tsx and 3 other locations - About 5 hrs to fix
client-web/src/pages/Signon/MetamaskModal.tsx on lines 92..112
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 659..679
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 142..160

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

            <TextField
              margin="dense"
              inputProps={{
                autoComplete: "off",
              }}
Severity: Major
Found in client-web/src/pages/Signon/MetamaskModal.tsx and 3 other locations - About 5 hrs to fix
client-web/src/pages/Signon/OwnerLogin.tsx on lines 92..110
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 659..679
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 142..160

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            <TextField
              margin="dense"
              label="Company Name"
              name="companyName"
              type="text"
Severity: Major
Found in client-web/src/pages/Signon/OwnerRegistrationModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Signon/MetamaskModal.tsx on lines 113..131
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 680..698
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 699..717
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 161..179

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                <TextField
                  margin="dense"
                  label="Last Name"
                  name="lastName"
                  variant="standard"
Severity: Major
Found in client-web/src/pages/Profile/EditProfileModal.tsx and 1 other location - About 5 hrs to fix
client-web/src/pages/Profile/EditProfileModal.tsx on lines 114..132

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                <TextField
                  margin="dense"
                  label="First Name"
                  name="firstName"
                  variant="standard"
Severity: Major
Found in client-web/src/pages/Profile/EditProfileModal.tsx and 1 other location - About 5 hrs to fix
client-web/src/pages/Profile/EditProfileModal.tsx on lines 133..151

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            <TextField
              margin="dense"
              label="Last Name*"
              name="lastName"
              type="text"
Severity: Major
Found in client-web/src/pages/Signon/OwnerRegistrationModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Signon/MetamaskModal.tsx on lines 113..131
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 699..717
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 718..738
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 161..179

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

      <TextField
        margin="dense"
        label="Last Name"
        name="lastName"
        type="text"
Severity: Major
Found in client-web/src/pages/Signon/UsernameSignUpForm.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Signon/MetamaskModal.tsx on lines 113..131
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 680..698
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 699..717
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 718..738

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

      <TextField
        margin="dense"
        inputProps={{
          autoComplete: "off",
        }}
Severity: Major
Found in client-web/src/pages/Signon/UsernameSignUpForm.tsx and 3 other locations - About 5 hrs to fix
client-web/src/pages/Signon/MetamaskModal.tsx on lines 92..112
client-web/src/pages/Signon/OwnerLogin.tsx on lines 92..110
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 659..679

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

            <TextField
              margin="dense"
              label="Email*"
              name="email"
              type="text"
Severity: Major
Found in client-web/src/pages/Signon/OwnerRegistrationModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Signon/MetamaskModal.tsx on lines 113..131
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 680..698
client-web/src/pages/Signon/OwnerRegistrationModal.tsx on lines 718..738
client-web/src/pages/Signon/UsernameSignUpForm.tsx on lines 161..179

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 142.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language