dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

        {regularLoginUsername && (
          <Button
            sx={{ margin: 1, textTransform: "none", fontSize: "16px" }}
            fullWidth
            variant="contained"
Severity: Major
Found in client-web/src/pages/Signon/RegularSignIn.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Signon/RegularSignIn.tsx on lines 40..49

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

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 (stanza.attrs.id === XMPP_TYPES.setRoomBackgroundImage) {
        console.log(
          stanza.children[0].attrs,
          stanza.children[0].children,
          stanza,
Severity: Major
Found in client-reactnative/src/stores/chatStore.ts and 1 other location - About 1 hr to fix
client-reactnative/src/stores/chatStore.ts on lines 763..771

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

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

        {regularLoginEmail && (
          <Button
            sx={{ margin: 1, textTransform: "none", fontSize: "16px" }}
            fullWidth
            variant="contained"
Severity: Major
Found in client-web/src/pages/Signon/RegularSignIn.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Signon/RegularSignIn.tsx on lines 50..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 63.

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

                  <FastImage
                    style={styles.tokenImage}
                    source={{
                      uri: filePreview?.uri,
                      priority: FastImage.priority.normal,
client-reactnative/src/Screens/Profile/NftItemHistoryScreen.tsx on lines 164..171

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

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

const TransactionAddressDetails: React.FC<ITransactionAddressDetailsProps> = (
  props
) => {
  const [transactions, setTransactions] = useState<
    ExplorerRespose<ITransaction[]>
Severity: Minor
Found in client-web/src/pages/Explorer/TransactionAddressDetails.tsx - About 1 hr to fix

Function produceNfmtItems has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const produceNfmtItems = (array: any[]) => {
  const result = [];
  const rareTotal = 20;
  const uniqueTotal = 1;

Severity: Minor
Found in client-reactnative/src/stores/walletStore.ts - About 1 hr to fix

Function onMintClick has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const onMintClick = () => {
    if (!nftFileUrl) {
      showError('Error', 'Please load the image.');
      return;
    }
Severity: Minor
Found in client-reactnative/src/Screens/Actions/MintScreen.tsx - About 1 hr to fix

Function ChatBackgroundCard has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ChatBackgroundCard = (props: ChatBackgroundCardProps) => {
  return (
    <Pressable
      justifyContent={'center'}
      alignItems={'center'}
Severity: Minor
Found in client-reactnative/src/components/Chat/ChatBackgroundCard.tsx - About 1 hr to fix

Function transferItems has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const transferItems = async () => {
    if (!selectedItem?.balance) {
      showError('error', 'Not enough tokens');
    }
    const receiverName = dataForTransfer.name;

Function deleteEmailFromList has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  async deleteEmailFromList(token: any, email: any) {
    const url = addOrDeleteEmail + '/' + email;

    runInAction(() => {
      this.isFetching = true;
Severity: Minor
Found in client-reactnative/src/stores/accountStore.ts - About 1 hr to fix

Function renderItems has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const renderItems = () => {
    const getItemSelected = (pressedItem: TSelectedItem, item:any) => {
      if (item.tokenType === 'NFMT') {
        return (
          pressedItem.nfmtType + pressedItem.contractAddress ===

Function handleLongTapMenu has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleLongTapMenu = (type: number) => {
    if (type === 0) {
      if (longTapUser.ban_status === 'clear') {
        banUserr(
          manipulatedWalletAddress,
Severity: Minor
Found in client-reactnative/src/Screens/Chat/ChatDetailsScreen.tsx - About 1 hr to fix

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

    if (messageCheck(handlerData.message, 'bot help') ||
        messageCheck(handlerData.message, 'bots help') ||
        messageCheck(handlerData.message, 'bot info') ||
        messageCheck(handlerData.message, 'bots info'))
    {
Severity: Major
Found in bots/autoResponder/router.js and 2 other locations - About 1 hr to fix
bots/botTemplate/router.js on lines 14..20
bots/gptBot/router.js on lines 15..20

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

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 updateAnswerId = async (_id, answer, user_jid) => {
    return await Answer.updateOne({
        _id: _id,
        user_jid: user_jid
    }, {$set: {answer: answer}}).exec();
Severity: Major
Found in bots/merchantBot/controllers/answers.js and 1 other location - About 1 hr to fix
bots/merchantBot/controllers/answers.js on lines 16..21

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

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 updateAnswer = async (questionId, answer, user_jid) => {
    return await Answer.updateOne({
        question_id: questionId,
        user_jid: user_jid
    }, {$set: {answer: answer}}).exec();
Severity: Major
Found in bots/merchantBot/controllers/answers.js and 1 other location - About 1 hr to fix
bots/merchantBot/controllers/answers.js on lines 23..28

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

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

    if (messageCheck(handlerData.message, 'bot help') ||
        messageCheck(handlerData.message, 'bots help') ||
        messageCheck(handlerData.message, 'bot info') ||
        messageCheck(handlerData.message, 'bots info')) {
        return helpHandler(handlerData);
Severity: Major
Found in bots/gptBot/router.js and 2 other locations - About 1 hr to fix
bots/autoResponder/router.js on lines 48..54
bots/botTemplate/router.js on lines 14..20

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

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

    if (messageCheck(handlerData.message, 'bot help') ||
        messageCheck(handlerData.message, 'bots help') ||
        messageCheck(handlerData.message, 'bot info') ||
        messageCheck(handlerData.message, 'bots info'))
    {
Severity: Major
Found in bots/botTemplate/router.js and 2 other locations - About 1 hr to fix
bots/autoResponder/router.js on lines 48..54
bots/gptBot/router.js on lines 15..20

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

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

        <Button
          sx={{ margin: 1, textTransform: "none", fontSize: "16px" }}
          fullWidth
          variant="contained"
          color="success"
Severity: Major
Found in client-web/src/pages/Signon/RegularSignIn.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Signon/RegularSignIn.tsx on lines 70..78

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

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 routes = [
    {key: 'visibility', title: 'Visibility'},
    {key: 'profileShares', title: 'Profile Shares'},
    {key: 'documentShares', title: 'Document Shares'},
    {key: 'blocking', title: 'Blocking'},
bots/createBot/src/questions.create.ts on lines 124..133

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

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

                        <Button
                            padding={'0'}
                            width={hp('7%')}
                            height={hp('3.5%')}
                            justifyContent="center"
client-reactnative/src/Screens/Chat/ChatDetailsScreen.tsx on lines 438..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 62.

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