dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

Function createMessageObject has 114 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const createMessageObject = (messageDetails = []) => {
  const message: IMessage = {
    _id: '',
    text: '',
    createdAt: '',
Severity: Major
Found in client-reactnative/src/helpers/chat/createMessageObject.ts - About 4 hrs to fix

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

  const onUserAvatarPress = (avatarProps: {
    _id: string;
    name: string;
    avatar: string;
  }) => {
Severity: Major
Found in client-reactnative/src/components/Chat/ChatContainer.tsx and 1 other location - About 4 hrs to fix
client-reactnative/src/Screens/Chat/ChatDetailsScreen.tsx on lines 173..189

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

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 onUserAvatarPress = (props: roomMemberInfoProps) => {
    //to set the current another user profile
    // otherUserStore.setUserData(firstName, lastName, avatar);
    const xmppID = props.jid.split('@')[0];
    const userWalletAddress = reverseUnderScoreManipulation(xmppID);
Severity: Major
Found in client-reactnative/src/Screens/Chat/ChatDetailsScreen.tsx and 1 other location - About 4 hrs to fix
client-reactnative/src/components/Chat/ChatContainer.tsx on lines 728..748

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

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

export const AddTabPanel = (props: AddTabPanelProps) => {

    const {getSharedLinks} = props
    const [expiration, setExpiration] = React.useState((-1).toString());
    const [memo, setMemo] = React.useState('');
Severity: Major
Found in client-web/src/pages/Privacy/AddProfileTabPanel.tsx - About 4 hrs to fix

Function QRCodeGenerator has 113 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const QRCodeGenerator = (props: QRCodeGeneratorProps) => {
  const svg = useRef(null);
  const {apiStore} = useStores();
  const {shareKey, close} = props;

Severity: Major
Found in client-reactnative/src/components/QRCodeGenerator.tsx - About 4 hrs to fix

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

          <TouchableOpacity
            onPress={setNewName}
            style={{
              backgroundColor: commonColors.primaryColor,
              borderRadius: 5,
client-reactnative/src/components/Modals/Profile/ProfileModal.tsx on lines 67..83

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

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

export const assignModerator = (from: string, to: string, xmpp: any) => {
  // <iq from='crone1@shakespeare.lit/desktop'
  //     id='mod1'
  //     to='coven@chat.shakespeare.lit'
  //     type='set'>
Severity: Major
Found in client-reactnative/src/xmpp/stanzas.ts and 1 other location - About 4 hrs to fix
client-reactnative/src/xmpp/stanzas.ts on lines 1026..1058

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

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

          <TouchableOpacity
            onPress={setDescription}
            style={{
              backgroundColor: commonColors.primaryColor,
              borderRadius: 5,
client-reactnative/src/components/Modals/Profile/ProfileModal.tsx on lines 120..136

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

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

export const unAssignModerator = (from: string, to: string, xmpp: any) => {
  //   <iq from='crone1@shakespeare.lit/desktop'
  //     id='mod2'
  //     to='coven@chat.shakespeare.lit'
  //     type='set'>
Severity: Major
Found in client-reactnative/src/xmpp/stanzas.ts and 1 other location - About 4 hrs to fix
client-reactnative/src/xmpp/stanzas.ts on lines 992..1024

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

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

const ScanScreen = () => {

  //mobx stores
  const {loginStore, chatStore, apiStore} = useStores();
  //mobx stores
Severity: Major
Found in client-reactnative/src/Screens/Actions/ScanScreen.tsx - About 4 hrs to fix

Function ProfileModal has 112 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ProfileModal = (props: ProfileModalProps) => {
  const {
    isVisible,
    onBackdropPress,
    modalType,
Severity: Major
Found in client-reactnative/src/components/Modals/Profile/ProfileModal.tsx - About 4 hrs to fix

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

      <Box
        style={{
          display: "flex",
          alignItems: "flex-start",
          flexDirection: "column",
Severity: Major
Found in client-web/src/pages/Explorer/BlockDetails.tsx and 1 other location - About 4 hrs to fix
client-web/src/pages/Explorer/TransactionDetails.tsx on lines 77..97

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

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

  useEffect(() => {
    if (
      chatStore.isComposing.chatJID === roomDetails.jid &&
      chatStore.isComposing.manipulatedWalletAddress !==
        manipulatedWalletAddress
Severity: Major
Found in client-reactnative/src/components/Chat/ChatContainer.tsx and 1 other location - About 4 hrs to fix
client-reactnative/src/components/Chat/ChatContainer.tsx on lines 837..853

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

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

  useEffect(() => {
    if (
      chatStore.isComposing.chatJID === roomDetails.jid &&
      chatStore.isComposing.manipulatedWalletAddress !==
        manipulatedWalletAddress
Severity: Major
Found in client-reactnative/src/components/Chat/ChatContainer.tsx and 1 other location - About 4 hrs to fix
client-reactnative/src/components/Chat/ChatContainer.tsx on lines 900..916

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

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={{
              display: "flex",
              alignItems: "flex-start",
              flexDirection: "column",
Severity: Major
Found in client-web/src/pages/Explorer/TransactionDetails.tsx and 1 other location - About 4 hrs to fix
client-web/src/pages/Explorer/BlockDetails.tsx on lines 72..90

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

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

          <TableHead>
            <TableRow>
              <TableCell>Name</TableCell>
              <TableCell>Create</TableCell>
              <TableCell align="left">Read</TableCell>
Severity: Major
Found in client-web/src/components/EditAcl.tsx and 1 other location - About 4 hrs to fix
client-web/src/components/EditAcl.tsx on lines 304..314

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

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 checkEmptyDirections = () => {
    return (
      !currentMetaRoom?.ownerNavLinks?.south &&
      !currentMetaRoom?.ownerNavLinks?.east &&
      !currentMetaRoom?.ownerNavLinks?.west &&
Severity: Major
Found in client-web/src/components/MetaNavigation/MetaNavigation.tsx and 1 other location - About 4 hrs to fix
client-reactnative/src/components/Chat/MetaNavigation.tsx on lines 258..269

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

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 checkEmptyDirections = () => {
    return (
      !currentMetaRoom?.ownerNavLinks?.south &&
      !currentMetaRoom?.ownerNavLinks?.east &&
      !currentMetaRoom?.ownerNavLinks?.west &&
Severity: Major
Found in client-reactnative/src/components/Chat/MetaNavigation.tsx and 1 other location - About 4 hrs to fix
client-web/src/components/MetaNavigation/MetaNavigation.tsx on lines 146..157

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

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

          <TableHead>
            <TableRow>
              <TableCell>Name</TableCell>

              <TableCell>Create</TableCell>
Severity: Major
Found in client-web/src/components/EditAcl.tsx and 1 other location - About 4 hrs to fix
client-web/src/components/EditAcl.tsx on lines 268..277

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

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

import React, { useEffect, useMemo, useState } from "react";

import {
  Dialog,
  DialogContent,
Severity: Minor
Found in client-web/src/components/Chat/ChatTransferDialog.tsx - About 4 hrs to fix
Severity
Category
Status
Source
Language