dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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 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

Function ChangeBackgroundScreen has 133 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ChangeBackgroundScreen = observer((props: any) => {
  const navigation = useNavigation();
  const {chatStore, loginStore, apiStore} = useStores();
  const roomJID = props.route.params.roomJID;

Severity: Major
Found in client-reactnative/src/Screens/Chat/ChangeBackgroundScreen.tsx - About 5 hrs to fix

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

const refreshToken = async () => {
    if (loginData.length <= 0) {
        console.log('=> Bot not logged in')
        return false;
    }
Severity: Major
Found in bots/huthut/api.js and 1 other location - About 5 hrs to fix
bots/questionnaire/api.js on lines 38..57

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 141.

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 refreshToken = async () => {
    if (loginData.length <= 0) {
        console.log('=> Bot not logged in')
        return false;
    }
Severity: Major
Found in bots/questionnaire/api.js and 1 other location - About 5 hrs to fix
bots/huthut/api.js on lines 72..91

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 141.

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
                fullWidth
                error={
                  formik.touched.password && formik.errors.password
                    ? true
Severity: Major
Found in client-web/src/pages/Owner/NewUserModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Owner/NewUserModal.tsx on lines 145..164
client-web/src/pages/Owner/NewUserModal.tsx on lines 165..184
client-web/src/pages/Owner/NewUserModal.tsx on lines 185..204
client-web/src/pages/Profile/TransferItemsModal.tsx on lines 109..122

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 141.

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
                fullWidth
                error={
                  formik.touched.lastName && formik.errors.lastName
                    ? true
Severity: Major
Found in client-web/src/pages/Owner/NewUserModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Owner/NewUserModal.tsx on lines 145..164
client-web/src/pages/Owner/NewUserModal.tsx on lines 185..204
client-web/src/pages/Owner/NewUserModal.tsx on lines 205..224
client-web/src/pages/Profile/TransferItemsModal.tsx on lines 109..122

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 141.

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
                fullWidth
                error={
                  formik.touched.lastName && formik.errors.username
                    ? true
Severity: Major
Found in client-web/src/pages/Owner/NewUserModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Owner/NewUserModal.tsx on lines 145..164
client-web/src/pages/Owner/NewUserModal.tsx on lines 165..184
client-web/src/pages/Owner/NewUserModal.tsx on lines 205..224
client-web/src/pages/Profile/TransferItemsModal.tsx on lines 109..122

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 141.

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
                fullWidth
                error={
                  formik.touched.firstName && formik.errors.firstName
                    ? true
Severity: Major
Found in client-web/src/pages/Owner/NewUserModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Owner/NewUserModal.tsx on lines 165..184
client-web/src/pages/Owner/NewUserModal.tsx on lines 185..204
client-web/src/pages/Owner/NewUserModal.tsx on lines 205..224
client-web/src/pages/Profile/TransferItemsModal.tsx on lines 109..122

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 141.

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
              fullWidth
              error={formik.touched.to && formik.errors.to ? true : false}
              helperText={
                formik.touched.to && formik.errors.to ? formik.errors.to : ""
Severity: Major
Found in client-web/src/pages/Profile/TransferItemsModal.tsx and 4 other locations - About 5 hrs to fix
client-web/src/pages/Owner/NewUserModal.tsx on lines 145..164
client-web/src/pages/Owner/NewUserModal.tsx on lines 165..184
client-web/src/pages/Owner/NewUserModal.tsx on lines 185..204
client-web/src/pages/Owner/NewUserModal.tsx on lines 205..224

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 141.

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 Referrals has 132 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const Referrals: React.FC<IReferrals> = ({}) => {
  const link = useStoreState((state) => state.user._id);
  const walletAddress = useStoreState((state) => state.user.walletAddress);

  const setBalance = useStoreState((state) => state.setBalance);
Severity: Major
Found in client-web/src/pages/Referrals/Referrals.tsx - About 5 hrs to fix

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

export const transferToken = async (tokenId, tokenName, amount, wallet) => {
    try {
        return await axios.post(botOptions.apiUrl + 'tokens/transfer', {
            tokenId: tokenId,
            tokenName: tokenName,
Severity: Major
Found in bots/questionnaire/api.js and 1 other location - About 5 hrs to fix
bots/huthut/api.js on lines 35..52

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 140.

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 const transferToken = async (tokenId, tokenName, amount, wallet) => {
    try {
        return await axios.post(botOptions.apiUrl + 'tokens/transfer', {
            tokenId: tokenId,
            tokenName: tokenName,
Severity: Major
Found in bots/huthut/api.js and 1 other location - About 5 hrs to fix
bots/questionnaire/api.js on lines 19..36

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 140.

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 EmailSignUpForm has 131 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function EmailSignUpForm(props: TProps) {
  const [showPassword, setShowPassword] = useState(false);
  const [openSnack, setOpenSnack] = useState(false);
  const [errorMsg, setErrorMsg] = useState("");
  const history = useHistory();
Severity: Major
Found in client-web/src/pages/Signon/EmailSignUpForm.tsx - About 5 hrs to fix

Function TransactionsListItem has 131 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const TransactionsListItem = (props: TransactionListProps) => {
  const {
    transactionReceiver,
    transactionSender,
    transactionAmount,

File index.tsx has 384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import * as React from "react";
import Container from "@mui/material/Container";
import Tabs from "@mui/material/Tabs";
import Tab from "@mui/material/Tab";
import Typography from "@mui/material/Typography";
Severity: Minor
Found in client-web/src/pages/Statistics/index.tsx - About 5 hrs to fix

File NftItemHistoryScreen.tsx has 384 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, {Fragment, useEffect, useState} from 'react';
import {ActivityIndicator, StyleSheet, TouchableOpacity} from 'react-native';
import {HStack, Image, ScrollView, Text, View, VStack} from 'native-base';
import SecondaryHeader from '../../components/SecondaryHeader/SecondaryHeader';
import AntIcon from 'react-native-vector-icons/AntDesign';
Severity: Minor
Found in client-reactnative/src/Screens/Profile/NftItemHistoryScreen.tsx - About 5 hrs to fix

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

          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>
            <span style={{ fontWeight: "bold" }}>From:</span>{" "}
            <span>
              <span
                onClick={() => history.push("/explorer/address/" + item.from)}
Severity: Major
Found in client-web/src/pages/Transactions/Provenance.tsx and 1 other location - About 5 hrs to fix
client-web/src/pages/Transactions/Transactions.tsx on lines 74..84

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 138.

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

          <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>
            <span style={{ fontWeight: "bold" }}>From:</span>{" "}
            <span>
              <span
                onClick={() => history.push("/explorer/address/" + item.from)}
Severity: Major
Found in client-web/src/pages/Transactions/Transactions.tsx and 1 other location - About 5 hrs to fix
client-web/src/pages/Transactions/Provenance.tsx on lines 129..139

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 138.

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 6 locations. Consider refactoring.
Open

const refresh = () => {
    return new Promise((resolve, reject) => {
        http.post('/users/login/refresh', {}, {headers: {'Authorization': loginData.refreshToken}})
            .then(response => {
                loginData.token = response.data.token;
Severity: Major
Found in bots/merchantBot/api.js and 5 other locations - About 5 hrs to fix
bots/autoResponder/api.js on lines 29..41
bots/botTemplate/api.js on lines 29..41
bots/gptBot/api.js on lines 29..41
bots/raffle/api.js on lines 29..41
bots/translateBot/api.js on lines 29..41

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 136.

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