dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

    chatHomeItemIcon: {
        borderWidth: 1,
        borderColor:commonColors.primaryDarkColor,
        backgroundColor:commonColors.primaryDarkColor,
        height: hp('5.54%'),
Severity: Major
Found in client-reactnative/src/components/RoomList/ChatDragItem.tsx and 1 other location - About 2 hrs to fix
client-reactnative/src/components/RoomList/RoomListItemIcon.tsx on lines 88..100

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

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

export const gettingCoinsHandler = (data) => {
    logCurrentHandler('gettingCoinsHandler', data.userJID, data.message);
    const coinAmount = 7;

    if (messageCheck(data.message, botOptions.botData.firstName + ' ' + botOptions.botData.lastName)) {
Severity: Major
Found in bots/raffle/handlers/coins/gettingCoinsHandler.js - About 2 hrs to fix

Function ManageTabPanel has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const ManageTabPanel = (props: ManageTabPanelProps) => {
  const {
    handleChangeTab,
    sharedLinks,
    loading,
Severity: Major
Found in client-web/src/pages/Privacy/ManageProfileTabPanel.tsx - About 2 hrs to fix

Function TransactionsTable has 57 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function TransactionsTable(props: TProps) {
  const history = useHistory();

  return (
    <TableContainer style={{ flex: 1, marginTop: "10px" }} component={Paper}>
Severity: Major
Found in client-web/src/pages/Profile/TransactionsTable.tsx - About 2 hrs to fix

File DebugScreen.tsx has 261 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, {useEffect, useState} from 'react';
import {
  ScrollView,
  Text,
  TextInput,
Severity: Minor
Found in client-reactnative/src/Screens/System/DebugScreen.tsx - About 2 hrs to fix

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

    if (
        !process.env.MONGO_USERNAME &&
        !process.env.MONGO_PASSWORD &&
        !process.env.MONGO_HOSTNAME &&
        !process.env.MONGO_PORT &&
Severity: Major
Found in bots/questionnaire/config/connect.js and 3 other locations - About 2 hrs to fix
bots/merchantBot/config/connect.js on lines 9..17
bots/merchantBot/config/connect.js on lines 19..27
bots/questionnaire/config/connect.js on lines 6..14

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

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

    if (
        !process.env.MONGO_USERNAME &&
        !process.env.MONGO_PASSWORD &&
        !process.env.MONGO_HOSTNAME &&
        !process.env.MONGO_PORT &&
Severity: Major
Found in bots/merchantBot/config/connect.js and 3 other locations - About 2 hrs to fix
bots/merchantBot/config/connect.js on lines 9..17
bots/questionnaire/config/connect.js on lines 6..14
bots/questionnaire/config/connect.js on lines 16..24

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

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

    if (
        !process.env.TYPE ||
        !process.env.BOT_ADDRESS ||
        !process.env.CONFERENCE_ADDRESS ||
        !process.env.APP_USERNAME ||
Severity: Major
Found in bots/questionnaire/config/connect.js and 3 other locations - About 2 hrs to fix
bots/merchantBot/config/connect.js on lines 9..17
bots/merchantBot/config/connect.js on lines 19..27
bots/questionnaire/config/connect.js on lines 16..24

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

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

    if (
        !process.env.TYPE ||
        !process.env.BOT_ADDRESS ||
        !process.env.CONFERENCE_ADDRESS ||
        !process.env.APP_USERNAME ||
Severity: Major
Found in bots/merchantBot/config/connect.js and 3 other locations - About 2 hrs to fix
bots/merchantBot/config/connect.js on lines 19..27
bots/questionnaire/config/connect.js on lines 6..14
bots/questionnaire/config/connect.js on lines 16..24

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

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 [uploadedFile, setUploadedFile] = useState({
    _id: "",
    createdAt: "",
    expiresAt: 0,
    filename: "",
Severity: Major
Found in client-web/src/pages/UploadDocument/UploadDocument.tsx and 1 other location - About 2 hrs to fix
client-reactnative/src/Screens/Profile/ProfileScreen.tsx on lines 77..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 80.

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

                    {isAudioMimetype(filePickResult.type) ? (
                      <AntIcon
                        name={'playcircleo'}
                        color={commonColors.primaryColor}
                        size={hp('5%')}
Severity: Major
Found in client-reactnative/src/Screens/Actions/MintScreen.tsx and 1 other location - About 2 hrs to fix
client-reactnative/src/Screens/MintScreen.tsx on lines 242..261

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

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

                    {audioMimetypes[filePickResult.type] ? (
                      <AntIcon
                        name={'playcircleo'}
                        color={commonColors.primaryColor}
                        size={hp('5%')}
Severity: Major
Found in client-reactnative/src/Screens/MintScreen.tsx and 1 other location - About 2 hrs to fix
client-reactnative/src/Screens/Actions/MintScreen.tsx on lines 206..225

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

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 [uploadedAvatar, setUploadedAvatar] = useState({
    _id: '',
    createdAt: '',
    expiresAt: 0,
    filename: '',
Severity: Major
Found in client-reactnative/src/Screens/Profile/ProfileScreen.tsx and 1 other location - About 2 hrs to fix
client-web/src/pages/UploadDocument/UploadDocument.tsx on lines 13..27

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

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

export default function BlockDetails(props) {
  const [blockDetails, setBlockDetails] = useState<IBlock | {}>({});
  const [loading, setLoading] = useState(false);
  const params = useParams<{ blockNumber: string }>();
  const getDetails = async () => {
Severity: Major
Found in client-web/src/pages/Explorer/BlockDetails.tsx - About 2 hrs to fix

Function helloMessageHandler has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const helloMessageHandler = (data) => {
    console.log('=> helloMessageHandler || Message received from ', data.userJID, data.message);
    userData('setData', data.userJID, '', 'deleteItem');

    getUserData(data.userJID).then(userData => {
Severity: Major
Found in bots/merchantBot/handlers/helloMessage.js - About 2 hrs to fix

Function transferTokens has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  async transferTokens(
    bodyData: any,
    token: string,
    fromWallet: string,
    senderName: string,
Severity: Major
Found in client-reactnative/src/stores/walletStore.ts - About 2 hrs to fix

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

          {!!item.value && (
            <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>
              <span style={{ fontWeight: "bold" }}>Value:</span>
              {item.value}
            </ListItem>
Severity: Major
Found in client-web/src/pages/Transactions/Provenance.tsx and 7 other locations - About 2 hrs to fix
client-web/src/pages/Transactions/Provenance.tsx on lines 151..156
client-web/src/pages/Transactions/Provenance.tsx on lines 157..162
client-web/src/pages/Transactions/Provenance.tsx on lines 169..174
client-web/src/pages/Transactions/Provenance.tsx on lines 175..180
client-web/src/pages/Transactions/Provenance.tsx on lines 181..186
client-web/src/pages/Transactions/Provenance.tsx on lines 187..192
client-web/src/pages/Transactions/Provenance.tsx on lines 193..198

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

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

          {!!item.toFirstName && (
            <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>
              <span style={{ fontWeight: "bold" }}>Receiver First Name:</span>
              {item.toFirstName}
            </ListItem>
Severity: Major
Found in client-web/src/pages/Transactions/Provenance.tsx and 7 other locations - About 2 hrs to fix
client-web/src/pages/Transactions/Provenance.tsx on lines 151..156
client-web/src/pages/Transactions/Provenance.tsx on lines 157..162
client-web/src/pages/Transactions/Provenance.tsx on lines 175..180
client-web/src/pages/Transactions/Provenance.tsx on lines 181..186
client-web/src/pages/Transactions/Provenance.tsx on lines 187..192
client-web/src/pages/Transactions/Provenance.tsx on lines 193..198
client-web/src/pages/Transactions/Provenance.tsx on lines 199..204

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

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

          {!!item.type && (
            <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>
              <span style={{ fontWeight: "bold" }}>Type:</span>
              {item.type}
            </ListItem>
Severity: Major
Found in client-web/src/pages/Transactions/Provenance.tsx and 7 other locations - About 2 hrs to fix
client-web/src/pages/Transactions/Provenance.tsx on lines 151..156
client-web/src/pages/Transactions/Provenance.tsx on lines 157..162
client-web/src/pages/Transactions/Provenance.tsx on lines 169..174
client-web/src/pages/Transactions/Provenance.tsx on lines 175..180
client-web/src/pages/Transactions/Provenance.tsx on lines 181..186
client-web/src/pages/Transactions/Provenance.tsx on lines 187..192
client-web/src/pages/Transactions/Provenance.tsx on lines 199..204

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

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

          {!!item.transactionIndex && (
            <ListItem disablePadding disableGutters style={{ paddingLeft: 25 }}>
              <span style={{ fontWeight: "bold" }}>Transaction Index:</span>
              {item.transactionIndex}
            </ListItem>
Severity: Major
Found in client-web/src/pages/Transactions/Provenance.tsx and 7 other locations - About 2 hrs to fix
client-web/src/pages/Transactions/Provenance.tsx on lines 151..156
client-web/src/pages/Transactions/Provenance.tsx on lines 157..162
client-web/src/pages/Transactions/Provenance.tsx on lines 169..174
client-web/src/pages/Transactions/Provenance.tsx on lines 175..180
client-web/src/pages/Transactions/Provenance.tsx on lines 181..186
client-web/src/pages/Transactions/Provenance.tsx on lines 193..198
client-web/src/pages/Transactions/Provenance.tsx on lines 199..204

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

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