dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

export async function sendMessage(p: Participant, message: Message, client: Client, walletAddress: string, repeat = false): Promise<void> {
  if (repeat === true) {
    for (const [index, msg] of message.messages.entries()) {
      await sleep(100)
      if (msg.repeat === true) {
Severity: Major
Found in bots/exportToUSDC/src/utils.ts and 1 other location - About 1 wk to fix
bots/createBot/src/utils.ts on lines 65..245

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

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 sendMessage(p: Participant, message: Message, client: Client, walletAddress: string, repeat = false): Promise<void> {
  if (repeat === true) {
    for (const [index, msg] of message.messages.entries()) {
      await sleep(100)
      if (msg.repeat === true) {
Severity: Major
Found in bots/createBot/src/utils.ts and 1 other location - About 1 wk to fix
bots/exportToUSDC/src/utils.ts on lines 65..245

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

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

const ChatContainer = observer((props: ChatContainerProps) => {
  //props
  const {
    containerType,
    roomDetails,
Severity: Major
Found in client-reactnative/src/components/Chat/ChatContainer.tsx - About 5 days to fix

File Tnc.tsx has 1866 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import "./Tnc.scss";

type TProps = {
Severity: Major
Found in client-web/src/pages/Signon/Tnc.tsx - About 5 days to fix

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

      <Modal
        onBackdropPress={() => setModalVisible(false)}
        isVisible={isModalVisible}>
        <View
          style={{
Severity: Major
Found in client-reactnative/src/Screens/UploadDocumentsScreen.tsx and 1 other location - About 4 days to fix
client-reactnative/src/Screens/MintScreen.tsx on lines 367..430

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

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

      <Modal
        onBackdropPress={() => setModalVisible(false)}
        isVisible={isModalVisible}>
        <View
          style={{
Severity: Major
Found in client-reactnative/src/Screens/MintScreen.tsx and 1 other location - About 4 days to fix
client-reactnative/src/Screens/UploadDocumentsScreen.tsx on lines 382..445

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

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

      <Box>
        <form onSubmit={formik.handleSubmit}>
          <Box>
            <TextField
              error={
Severity: Major
Found in client-web/src/pages/CreateApp/index.tsx and 1 other location - About 3 days to fix
client-web/src/pages/Owner/NewAppModal.tsx on lines 94..186

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

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

        <Box sx={{ width: "100%", typography: "body1", padding: 1 }}>
        <form onSubmit={formik.handleSubmit}>
          <Box>
            <TextField
              error={
Severity: Major
Found in client-web/src/pages/Owner/NewAppModal.tsx and 1 other location - About 3 days to fix
client-web/src/pages/CreateApp/index.tsx on lines 73..165

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

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

export function ChatInRoom() {
  const messages = useStoreState((state) => state.historyMessages);
  const user = useStoreState((store) => store.user);
  const userChatRooms = useStoreState((store) => store.userChatRooms);
  const currentThreadViewMessage = useStoreState(
Severity: Major
Found in client-web/src/pages/ChatInRoom/Chat.tsx - About 3 days to fix

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

          <View style={{paddingHorizontal: 20}}>
            {/* <Text style={styles.detailsItemTextBold}>Details:</Text> */}
            <View style={styles.detailsItem}>
              <Text style={styles.detailsItemTextBold}>TX hash: </Text>
              <Text style={{textAlign: 'left', color: 'black'}}>
client-reactnative/src/components/Transactions/NftTransactionItem.tsx on lines 218..262

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

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

        <View style={{paddingHorizontal: 20, paddingVertical: 10}}>
          {/* <Text style={styles.detailsItemTextBold}>Details:</Text> */}
          <View style={styles.detailsItem}>
            <Text style={styles.detailsItemTextBold}>TX hash: </Text>
            <Text style={{textAlign: 'left', color: 'black'}}>
client-reactnative/src/components/Transactions/TransactionsListItem.tsx on lines 123..167

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

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 ChatContainer.tsx has 1260 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, {useCallback, useEffect, useRef, useState} from 'react';
import {Actions, GiftedChat, Send} from 'react-native-gifted-chat';
import {AudioSendButton} from './AudioSendButton';
import {
  ActivityIndicator,
Severity: Major
Found in client-reactnative/src/components/Chat/ChatContainer.tsx - About 3 days to fix

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

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Major
Found in bots/translateBot/config/connect.js and 2 other locations - About 3 days to fix
bots/botTemplate/config/connect.js on lines 6..56
bots/raffle/config/connect.js on lines 6..56

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

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

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Major
Found in bots/botTemplate/config/connect.js and 2 other locations - About 3 days to fix
bots/raffle/config/connect.js on lines 6..56
bots/translateBot/config/connect.js on lines 6..56

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

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

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Major
Found in bots/raffle/config/connect.js and 2 other locations - About 3 days to fix
bots/botTemplate/config/connect.js on lines 6..56
bots/translateBot/config/connect.js on lines 6..56

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

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 getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Major
Found in bots/gptBot/config/connect.js and 1 other location - About 2 days to fix
bots/autoResponder/config/connect.js on lines 6..54

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

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 getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');
    let dataBaseStatus = false;
    if (
        !process.env.TYPE ||
Severity: Major
Found in bots/autoResponder/config/connect.js and 1 other location - About 2 days to fix
bots/gptBot/config/connect.js on lines 6..54

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

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 chatStore.ts has 1090 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//@ts-ignore
import {client, xml} from '@xmpp/client';
import {makeAutoObservable, runInAction, toJS} from 'mobx';
import {
  defaultChatBackgroundTheme,
Severity: Major
Found in client-reactnative/src/stores/chatStore.ts - About 2 days to fix

Function getTnc has 537 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function getTnc(
  company: string,
  fname: string,
  lname: string,
  email: string,
Severity: Major
Found in client-web/src/pages/Signon/OwnerRegistrationModal.tsx - About 2 days to fix

File ChatExperimental.tsx has 1004 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import {observer} from 'mobx-react-lite';
import React, {useEffect, useRef, useState} from 'react';
import {GiftedChat, Send, Actions} from 'react-native-gifted-chat';
import {useStores} from '../../stores/context';
import {
Severity: Major
Found in client-reactnative/src/Screens/Chat/ChatExperimental.tsx - About 2 days to fix
Severity
Category
Status
Source
Language