dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

              <Box
                w={hp('2.8%')}
                h={hp('2.8%')}
                rounded={'full'}
                bg={commonColors.primaryColor}
client-reactnative/src/components/Transactions/NftTransactionItem.tsx on lines 58..72

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

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

              {!loaderArchive &&
                currentRoom &&
                currentRoom !== NO_ROOM_PICKED &&
                mainWindowMessages.length <= 0 && (
                  <MessageList.Content
Severity: Major
Found in client-web/src/pages/ChatInRoom/Chat.tsx and 1 other location - About 1 hr to fix
client-web/src/components/Chat/Threads/ThreadContainer.tsx on lines 250..263

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

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 profileLink = generateProfileLink({
        firstName: user.firstName,
        lastName: user.lastName,
        walletAddress: user.walletAddress,
        xmppId: walletToUsername(user.walletAddress) + CONFERENCEDOMAIN,
Severity: Major
Found in client-web/src/pages/Privacy/ProfileShareTab.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Privacy/QRSection.tsx on lines 26..32

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

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

        {!loaderArchive && currentRoom && threadWindowMessages.length <= 0 && (
          <MessageList.Content
            style={{
              display: "flex",
              flexDirection: "column",
Severity: Major
Found in client-web/src/components/Chat/Threads/ThreadContainer.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/ChatInRoom/Chat.tsx on lines 717..733

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

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

            return generateProfileLink({
                firstName:user.firstName,
                lastName: user.lastName,
                walletAddress: createdLink.walletAddress,
                xmppId: walletToUsername(user.walletAddress) + CONFERENCEDOMAIN,
Severity: Major
Found in client-web/src/pages/Privacy/QRSection.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Privacy/ProfileShareTab.tsx on lines 53..59

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

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
          w={hp('3.5%')}
          h={hp('3.5%')}
          rounded={'full'}
          bg={commonColors.primaryColor}
client-reactnative/src/components/Transactions/TransactionsListItem.tsx on lines 64..77

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

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={() => setModalVisible(true)}>
              <AntIcon
                // onPress={() => props.navigation.navigate('LoginComponent')}
                color={commonColors.primaryColor}
                name="caretdown"
Severity: Major
Found in client-reactnative/src/Screens/System/DebugScreen.tsx and 1 other location - About 1 hr to fix
client-reactnative/src/Screens/MintScreen.tsx on lines 315..325

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

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

export const processingHandler = (data) => {
    console.log('=> processingHandler || Message received from ', data.receiver, data.message);
    let currentButtonType = userData('getData', data.userJID, null, 'buttonType');
    getListAnswersInGroup(data.receiverData.attrs.senderJID, currentButtonType).then(answerList => {

Severity: Minor
Found in bots/merchantBot/handlers/processing.js - About 1 hr to fix

Function storeItemHandler has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const storeItemHandler = (data) => {
    console.log('=> storeItemHandler | Message received from ', data.receiver, data.message);
    userPaymentVerify(data, botOptions.botData.storeFee).then(response => {
        if (!response) {
            return sendMessage(
Severity: Minor
Found in bots/huthut/handlers/storeItem.js - About 1 hr to fix

Function changeRoomIcon has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const changeRoomIcon = async (file: File) => {
    const formData = new FormData();
    formData.append("files", file);
    setLoading("chatIcon");
    try {
Severity: Minor
Found in client-web/src/pages/ChatRoomDetails/ChatAvatar.tsx - About 1 hr to fix

Function Blocking has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const Blocking = (props: BlockingProps) => {
  const blacklist = useStoreState((store) => store.blackList);

  const handleRemoveUserFromBlackList = (userId: string) => {
    console.log(userId);
Severity: Minor
Found in client-web/src/pages/Privacy/Blocking.tsx - About 1 hr to fix

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

  const transferTokens = async (tokenAmount: number) => {
    if (tokenAmount <= 0) {
      showError('Error', 'Amount must be greater than 0');
      return;
    }

Function handleBanUser has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleBanUser = (name: string, senderName: string) => {
    const bannedUserWalletAddres = underscoreManipulation(
      dataForTransfer?.walletFromJid,
    );
    const senderWalletAddres = underscoreManipulation(

Function addReferral has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const addReferral = async () => {
    if (!code) {
      showError('Error', 'Please, fill the code');
      return;
    }
Severity: Minor
Found in client-reactnative/src/Screens/EnterInviteCodeScreen.tsx - About 1 hr to fix

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

const getBotName = (str) => {
    try {
        return str.replace(/([A-Z])/g, '_$1').toLowerCase();
    } catch (error) {
        console.log('getBotName error: ', error);
Severity: Major
Found in bots/questionnaire/config/connect.js and 6 other locations - About 1 hr to fix
bots/autoResponder/config/connect.js on lines 56..62
bots/botTemplate/config/connect.js on lines 58..64
bots/gptBot/config/connect.js on lines 56..62
bots/merchantBot/config/connect.js on lines 51..57
bots/raffle/config/connect.js on lines 58..64
bots/translateBot/config/connect.js on lines 58..64

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

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

const getBotName = (str) => {
    try {
        return str.replace(/([A-Z])/g, '_$1').toLowerCase();
    } catch (error) {
        console.log('getBotName error: ', error);
Severity: Major
Found in bots/raffle/config/connect.js and 6 other locations - About 1 hr to fix
bots/autoResponder/config/connect.js on lines 56..62
bots/botTemplate/config/connect.js on lines 58..64
bots/gptBot/config/connect.js on lines 56..62
bots/merchantBot/config/connect.js on lines 51..57
bots/questionnaire/config/connect.js on lines 47..53
bots/translateBot/config/connect.js on lines 58..64

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

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

const getBotName = (str) => {
    try {
        return str.replace(/([A-Z])/g, '_$1').toLowerCase();
    } catch (error) {
        console.log('getBotName error: ', error);
Severity: Major
Found in bots/translateBot/config/connect.js and 6 other locations - About 1 hr to fix
bots/autoResponder/config/connect.js on lines 56..62
bots/botTemplate/config/connect.js on lines 58..64
bots/gptBot/config/connect.js on lines 56..62
bots/merchantBot/config/connect.js on lines 51..57
bots/questionnaire/config/connect.js on lines 47..53
bots/raffle/config/connect.js on lines 58..64

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

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

const getBotName = (str) => {
    try {
        return str.replace(/([A-Z])/g, '_$1').toLowerCase();
    } catch (error) {
        console.log('getBotName error: ', error);
Severity: Major
Found in bots/merchantBot/config/connect.js and 6 other locations - About 1 hr to fix
bots/autoResponder/config/connect.js on lines 56..62
bots/botTemplate/config/connect.js on lines 58..64
bots/gptBot/config/connect.js on lines 56..62
bots/questionnaire/config/connect.js on lines 47..53
bots/raffle/config/connect.js on lines 58..64
bots/translateBot/config/connect.js on lines 58..64

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

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

const getBotName = (str) => {
    try {
        return str.replace(/([A-Z])/g, '_$1').toLowerCase();
    } catch (error) {
        console.log('getBotName error: ', error);
Severity: Major
Found in bots/autoResponder/config/connect.js and 6 other locations - About 1 hr to fix
bots/botTemplate/config/connect.js on lines 58..64
bots/gptBot/config/connect.js on lines 56..62
bots/merchantBot/config/connect.js on lines 51..57
bots/questionnaire/config/connect.js on lines 47..53
bots/raffle/config/connect.js on lines 58..64
bots/translateBot/config/connect.js on lines 58..64

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

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

const getBotName = (str) => {
    try {
        return str.replace(/([A-Z])/g, '_$1').toLowerCase();
    } catch (error) {
        console.log('getBotName error: ', error);
Severity: Major
Found in bots/gptBot/config/connect.js and 6 other locations - About 1 hr to fix
bots/autoResponder/config/connect.js on lines 56..62
bots/botTemplate/config/connect.js on lines 58..64
bots/merchantBot/config/connect.js on lines 51..57
bots/questionnaire/config/connect.js on lines 47..53
bots/raffle/config/connect.js on lines 58..64
bots/translateBot/config/connect.js on lines 58..64

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

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