dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

        if (differenceUnMinutes > oneTh && differenceUnMinutes < twoTh && senderCounter === 0) {
            sendMessage(
                data,
                "To remind everyone, the raffle is on the and the prize is "+currentItem.nftName+" \nThe raffle will end in "+differenceUnMinutes.toFixed()+" minutes.\nJust write a message to be counted in!",
                'message',
Severity: Major
Found in bots/raffle/handlers/helpers/messagingTimeout.js and 1 other location - About 2 hrs to fix
bots/raffle/handlers/helpers/messagingTimeout.js on lines 36..47

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

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

        if (differenceUnMinutes < oneTh && differenceUnMinutes < twoTh && senderCounter === 1) {
            sendMessage(
                data,
                "To remind everyone, the raffle is on the and the prize is "+currentItem.nftName+" \nThe raffle will end in "+differenceUnMinutes.toFixed()+" minutes.\nJust write a message to be counted in!",
                'message',
Severity: Major
Found in bots/raffle/handlers/helpers/messagingTimeout.js and 1 other location - About 2 hrs to fix
bots/raffle/handlers/helpers/messagingTimeout.js on lines 23..34

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    <View style={styles.subBodyContainer}>
      <Text style={styles.headingTextStyle}>{heading12}</Text>
      <Text style={styles.bodyTextStyle}>{body12}</Text>
    </View>
Severity: Major
Found in client-reactnative/src/components/PrivacyPolicy.tsx and 4 other locations - About 2 hrs to fix
client-reactnative/src/components/PrivacyPolicy.tsx on lines 129..132
client-reactnative/src/components/PrivacyPolicy.tsx on lines 134..137
client-reactnative/src/components/PrivacyPolicy.tsx on lines 279..282
client-reactnative/src/components/PrivacyPolicy.tsx on lines 284..287

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    <View style={styles.subBodyContainer}>
      <Text style={styles.headingTextStyle}>{heading2}</Text>
      <Text style={styles.bodyTextStyle}>{body2}</Text>
    </View>
Severity: Major
Found in client-reactnative/src/components/PrivacyPolicy.tsx and 4 other locations - About 2 hrs to fix
client-reactnative/src/components/PrivacyPolicy.tsx on lines 129..132
client-reactnative/src/components/PrivacyPolicy.tsx on lines 274..277
client-reactnative/src/components/PrivacyPolicy.tsx on lines 279..282
client-reactnative/src/components/PrivacyPolicy.tsx on lines 284..287

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  const deleteLink = async (linkToken: string) => {
    try {
      await httpDelete(shareLink + linkToken, loginStore.userToken);
      await getSharedLinks();
      showSuccess('Success', 'Link deleted');
client-reactnative/src/Screens/Privacy/DocumentShareManage.tsx on lines 61..69

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    <View style={styles.subBodyContainer}>
      <Text style={styles.headingTextStyle}>{heading13}</Text>
      <Text style={styles.bodyTextStyle}>{body13}</Text>
    </View>
Severity: Major
Found in client-reactnative/src/components/PrivacyPolicy.tsx and 4 other locations - About 2 hrs to fix
client-reactnative/src/components/PrivacyPolicy.tsx on lines 129..132
client-reactnative/src/components/PrivacyPolicy.tsx on lines 134..137
client-reactnative/src/components/PrivacyPolicy.tsx on lines 274..277
client-reactnative/src/components/PrivacyPolicy.tsx on lines 284..287

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

  const deleteLink = async (linkToken: string) => {
    try {
      await httpDelete(shareLink + linkToken, loginStore.userToken);
      await getSharedLinks();
      showSuccess('Success', 'Link deleted');
client-reactnative/src/Screens/Privacy/ProfileShareManage.tsx on lines 62..70

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    <View style={styles.subBodyContainer}>
      <Text style={styles.headingTextStyle}>{heading14}</Text>
      <Text style={styles.bodyTextStyle}>{body14}</Text>
    </View>
Severity: Major
Found in client-reactnative/src/components/PrivacyPolicy.tsx and 4 other locations - About 2 hrs to fix
client-reactnative/src/components/PrivacyPolicy.tsx on lines 129..132
client-reactnative/src/components/PrivacyPolicy.tsx on lines 134..137
client-reactnative/src/components/PrivacyPolicy.tsx on lines 274..277
client-reactnative/src/components/PrivacyPolicy.tsx on lines 279..282

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    <View style={styles.subBodyContainer}>
      <Text style={styles.headingTextStyle}>{heading1}</Text>
      <Text style={styles.bodyTextStyle}>{body1}</Text>
    </View>
Severity: Major
Found in client-reactnative/src/components/PrivacyPolicy.tsx and 4 other locations - About 2 hrs to fix
client-reactnative/src/components/PrivacyPolicy.tsx on lines 134..137
client-reactnative/src/components/PrivacyPolicy.tsx on lines 274..277
client-reactnative/src/components/PrivacyPolicy.tsx on lines 279..282
client-reactnative/src/components/PrivacyPolicy.tsx on lines 284..287

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

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

    } else if (type === 'photo') {
      launchCamera(options, response => {
        const data = new FormData();
        data.append('files', {
          name: response.fileName,
Severity: Major
Found in client-reactnative/src/Screens/MintScreen.tsx and 1 other location - About 2 hrs to fix
client-reactnative/src/Screens/UploadDocumentsScreen.tsx on lines 205..240

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

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

    } else if (type === 'photo') {
      launchCamera(options, response => {
        const data = new FormData();
        data.append('files', {
          name: response.fileName,
Severity: Major
Found in client-reactnative/src/Screens/UploadDocumentsScreen.tsx and 1 other location - About 2 hrs to fix
client-reactnative/src/Screens/MintScreen.tsx on lines 164..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 75.

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

function LinkItemComponent(props: ProfileLinkItemComponentProps) {
  const { linkItem, key, handleOpenModal, profileLink, deleteLink } = props;
  return (
    <Box
      key={key}
Severity: Minor
Found in client-web/src/pages/Privacy/ManageProfileTabPanel.tsx - About 1 hr to fix

Function OtherItemsTable has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function OtherItemsTable(props: TProps) {
  const [balances, setBalances] = React.useState<TBalances>([]);
  React.useEffect(() => {
    if (props.walletAddress) {
      http.getPublicProfile(props.walletAddress).then((response) => {
Severity: Minor
Found in client-web/src/pages/Profile/OtherItemsTable.tsx - About 1 hr to fix

Function LinkItemComponent has 49 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function LinkItemComponent(props: DocumentLinkItemComponentProps) {
  const { linkItem, key, handleOpenModal, docLink, deleteLink } = props;
  return (
    <Box
      key={key}
Severity: Minor
Found in client-web/src/pages/Privacy/ManageDocumentShareTabPanel.tsx - About 1 hr to fix

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

export const getMintItemData = async (walletAddress) => {
    try {
        let itemData = await http.get('tokens/get/' + walletAddress);
        return itemData.data.results;
    } catch (error) {
Severity: Major
Found in bots/raffle/api.js and 5 other locations - About 1 hr to fix
bots/autoResponder/api.js on lines 111..118
bots/botTemplate/api.js on lines 110..117
bots/gptBot/api.js on lines 111..118
bots/merchantBot/api.js on lines 111..118
bots/translateBot/api.js on lines 110..117

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const getMintItemData = async (walletAddress) => {
    try {
        let itemData = await http.get('tokens/get/' + walletAddress);
        return itemData.data.results;
    } catch (error) {
Severity: Major
Found in bots/botTemplate/api.js and 5 other locations - About 1 hr to fix
bots/autoResponder/api.js on lines 111..118
bots/gptBot/api.js on lines 111..118
bots/merchantBot/api.js on lines 111..118
bots/raffle/api.js on lines 145..152
bots/translateBot/api.js on lines 110..117

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const getMintItemData = async (walletAddress) => {
    try {
        let itemData = await http.get('tokens/get/'+walletAddress);
        return itemData.data.results;
    }catch (error){
Severity: Major
Found in bots/autoResponder/api.js and 5 other locations - About 1 hr to fix
bots/botTemplate/api.js on lines 110..117
bots/gptBot/api.js on lines 111..118
bots/merchantBot/api.js on lines 111..118
bots/raffle/api.js on lines 145..152
bots/translateBot/api.js on lines 110..117

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const messages = () => {
    return {
        general: {
            welcomeMessage: 'Sample bot launched!',
        },
Severity: Major
Found in bots/botTemplate/config/messages.js and 1 other location - About 1 hr to fix
bots/translateBot/config/messages.js on lines 1..18

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const getMintItemData = async (walletAddress) => {
    try {
        let itemData = await http.get('tokens/get/'+walletAddress);
        return itemData.data.results;
    }catch (error){
Severity: Major
Found in bots/gptBot/api.js and 5 other locations - About 1 hr to fix
bots/autoResponder/api.js on lines 111..118
bots/botTemplate/api.js on lines 110..117
bots/merchantBot/api.js on lines 111..118
bots/raffle/api.js on lines 145..152
bots/translateBot/api.js on lines 110..117

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const getMintItemData = async (walletAddress) => {
    try {
        let itemData = await http.get('tokens/get/' + walletAddress);
        return itemData.data.results;
    } catch (error) {
Severity: Major
Found in bots/translateBot/api.js and 5 other locations - About 1 hr to fix
bots/autoResponder/api.js on lines 111..118
bots/botTemplate/api.js on lines 110..117
bots/gptBot/api.js on lines 111..118
bots/merchantBot/api.js on lines 111..118
bots/raffle/api.js on lines 145..152

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

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