dappros/ethora

View on GitHub

Showing 8,855 of 8,855 total issues

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

      const filteredApplication = Object.fromEntries(
        Object.entries(userAcl!.result!.application).map((item) => {
          delete item[1].disabled;
          return item;
        })
Severity: Major
Found in client-web/src/components/EditAcl.tsx and 1 other location - About 1 hr to fix
client-web/src/components/EditAcl.tsx on lines 230..235

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

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 function createApp(fd: FormData) {
  const owner = useStoreState.getState().user;
  return http.post("/apps", fd, {
    headers: { Authorization: owner.token },
  });
Severity: Major
Found in client-web/src/http.ts and 1 other location - About 1 hr to fix
client-web/src/http.ts on lines 460..465

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

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

type TProps = {
  open: boolean;
  setOpen: React.Dispatch<React.SetStateAction<boolean>>;
  app?: {
    appName: string
Severity: Major
Found in client-web/src/pages/Owner/RotateModal.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Owner/DeletAppModal.tsx on lines 14..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 65.

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

        <DialogTitle
          style={{ display: "flex", justifyContent: "space-between" }}
        >
          Continue with Username
          <IconButton onClick={() => setOpen(false)}>
Severity: Major
Found in client-web/src/pages/Signon/UsernameModal.tsx and 4 other locations - About 1 hr to fix
client-web/src/pages/Profile/EditProfileModal.tsx on lines 83..90
client-web/src/pages/Profile/TransferItemsModal.tsx on lines 70..77
client-web/src/pages/Signon/EmailModal.tsx on lines 38..45
client-web/src/pages/Signon/MetamaskModal.tsx on lines 82..89

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

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 filteredNetwork = Object.fromEntries(
        Object.entries(userAcl!.result!.network).map((item) => {
          delete item[1].disabled;
          return item;
        })
Severity: Major
Found in client-web/src/components/EditAcl.tsx and 1 other location - About 1 hr to fix
client-web/src/components/EditAcl.tsx on lines 224..229

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

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

type TProps = {
  open: boolean;
  setOpen: React.Dispatch<React.SetStateAction<boolean>>;
  app?: {
    appName: string
Severity: Major
Found in client-web/src/pages/Owner/DeletAppModal.tsx and 1 other location - About 1 hr to fix
client-web/src/pages/Owner/RotateModal.tsx on lines 14..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 65.

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

          [
            {
              inputs: [
                {
                  internalType: "address",
Severity: Major
Found in bots/exportToUSDC/src/questions.create.ts and 1 other location - About 1 hr to fix
bots/exportToUSDC/src/config.create.ts on lines 25..45

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

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

  let message = xml(
    'iq',
    {
      type: 'set',
      to: chat_jid,
Severity: Major
Found in client-reactnative/src/xmpp/stanzas.ts and 1 other location - About 1 hr to fix
client-reactnative/src/xmpp/stanzas.ts on lines 372..389

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

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 function uploadFile(formData: FormData) {
  const user = useStoreState.getState().user;
  return http.post("/files", formData, {
    headers: { Authorization: user.token },
  });
Severity: Major
Found in client-web/src/http.ts and 1 other location - About 1 hr to fix
client-web/src/http.ts on lines 512..517

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

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

Method initializeFlipper has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
    if (FlipperUtils.shouldEnableFlipper(context)) {
      final FlipperClient client = AndroidFlipperClient.getInstance(context);

      client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));

Function getConnectData has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const getConnectData = async () => {
    console.log('=> Running a bot on a ' + process.env.TYPE + ' server');

    if (
        !process.env.TYPE ||
Severity: Minor
Found in bots/questionnaire/config/connect.js - About 1 hr to fix

Function helpHandler has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const helpHandler = (data) => {
    console.log('=> helpHandler | Message received from ', data.receiver, data.message);

    if(data.userStep === 1){
        return sendMessage(
Severity: Minor
Found in bots/huthut/handlers/help.js - About 1 hr to fix

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

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

Function removeListener has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    const removeListener = Linking.addEventListener('url', data => {
      if (data.url) {
        if (data.url.includes('profileLink')) {
          const params = data.url.split(appLinkingUrl)[1];
          const queryParams = new URLSearchParams(params);
Severity: Minor
Found in client-reactnative/src/navigation/HomeStack.tsx - About 1 hr to fix

Function loginOrRegisterSocialUser has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const loginOrRegisterSocialUser = async (
  user: any,

  defaultToken: string,
  loginUser: any,
Severity: Minor
Found in client-reactnative/src/helpers/login/socialLoginHandle.ts - About 1 hr to fix

Function renderAttachment has 37 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const renderAttachment = () => {
    const options = walletStore.nftItems.length
      ? {
          'Upload File': async () =>
            await sendAttachment(loginStore.userToken, roomDetails),
Severity: Minor
Found in client-reactnative/src/components/Chat/ChatContainer.tsx - About 1 hr to fix

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

          <tr>
            <td>Uptime guarantee</td>
            <td>N/A</td>
            <td>99%</td>
            <td>99.9%</td>
Severity: Major
Found in client-web/src/pages/Signon/Tnc.tsx and 15 other locations - About 1 hr to fix
client-web/src/pages/Signon/Tnc.tsx on lines 109..114
client-web/src/pages/Signon/Tnc.tsx on lines 115..120
client-web/src/pages/Signon/Tnc.tsx on lines 127..132
client-web/src/pages/Signon/Tnc.tsx on lines 133..138
client-web/src/pages/Signon/Tnc.tsx on lines 139..144
client-web/src/pages/Signon/Tnc.tsx on lines 151..156
client-web/src/pages/Signon/Tnc.tsx on lines 157..162
client-web/src/pages/Signon/Tnc.tsx on lines 163..168
client-web/src/pages/Signon/Tnc.tsx on lines 169..174
client-web/src/pages/Signon/Tnc.tsx on lines 181..186
client-web/src/pages/Signon/Tnc.tsx on lines 187..192
client-web/src/pages/Signon/Tnc.tsx on lines 193..198
client-web/src/pages/Signon/Tnc.tsx on lines 199..204
client-web/src/pages/Signon/Tnc.tsx on lines 211..216
client-web/src/pages/Signon/Tnc.tsx on lines 217..222

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

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

          <tr>
            <td>Minor</td>
            <td>NA</td>
            <td>80</td>
            <td>40</td>
Severity: Major
Found in client-web/src/pages/Signon/Tnc.tsx and 15 other locations - About 1 hr to fix
client-web/src/pages/Signon/Tnc.tsx on lines 109..114
client-web/src/pages/Signon/Tnc.tsx on lines 115..120
client-web/src/pages/Signon/Tnc.tsx on lines 121..126
client-web/src/pages/Signon/Tnc.tsx on lines 127..132
client-web/src/pages/Signon/Tnc.tsx on lines 133..138
client-web/src/pages/Signon/Tnc.tsx on lines 139..144
client-web/src/pages/Signon/Tnc.tsx on lines 151..156
client-web/src/pages/Signon/Tnc.tsx on lines 157..162
client-web/src/pages/Signon/Tnc.tsx on lines 163..168
client-web/src/pages/Signon/Tnc.tsx on lines 181..186
client-web/src/pages/Signon/Tnc.tsx on lines 187..192
client-web/src/pages/Signon/Tnc.tsx on lines 193..198
client-web/src/pages/Signon/Tnc.tsx on lines 199..204
client-web/src/pages/Signon/Tnc.tsx on lines 211..216
client-web/src/pages/Signon/Tnc.tsx on lines 217..222

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

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

          <tr>
            <th>Pricing plan</th>
            <th>Free</th>
            <th>Standard</th>
            <th>Enterprise</th>
Severity: Major
Found in client-web/src/pages/Signon/Tnc.tsx and 15 other locations - About 1 hr to fix
client-web/src/pages/Signon/Tnc.tsx on lines 115..120
client-web/src/pages/Signon/Tnc.tsx on lines 121..126
client-web/src/pages/Signon/Tnc.tsx on lines 127..132
client-web/src/pages/Signon/Tnc.tsx on lines 133..138
client-web/src/pages/Signon/Tnc.tsx on lines 139..144
client-web/src/pages/Signon/Tnc.tsx on lines 151..156
client-web/src/pages/Signon/Tnc.tsx on lines 157..162
client-web/src/pages/Signon/Tnc.tsx on lines 163..168
client-web/src/pages/Signon/Tnc.tsx on lines 169..174
client-web/src/pages/Signon/Tnc.tsx on lines 181..186
client-web/src/pages/Signon/Tnc.tsx on lines 187..192
client-web/src/pages/Signon/Tnc.tsx on lines 193..198
client-web/src/pages/Signon/Tnc.tsx on lines 199..204
client-web/src/pages/Signon/Tnc.tsx on lines 211..216
client-web/src/pages/Signon/Tnc.tsx on lines 217..222

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

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

          <tr>
            <td>Subscription fee, per calendar month</td>
            <td>0 USD</td>
            <td>99 USD</td>
            <td>Custom</td>
Severity: Major
Found in client-web/src/pages/Signon/Tnc.tsx and 15 other locations - About 1 hr to fix
client-web/src/pages/Signon/Tnc.tsx on lines 109..114
client-web/src/pages/Signon/Tnc.tsx on lines 121..126
client-web/src/pages/Signon/Tnc.tsx on lines 127..132
client-web/src/pages/Signon/Tnc.tsx on lines 133..138
client-web/src/pages/Signon/Tnc.tsx on lines 139..144
client-web/src/pages/Signon/Tnc.tsx on lines 151..156
client-web/src/pages/Signon/Tnc.tsx on lines 157..162
client-web/src/pages/Signon/Tnc.tsx on lines 163..168
client-web/src/pages/Signon/Tnc.tsx on lines 169..174
client-web/src/pages/Signon/Tnc.tsx on lines 181..186
client-web/src/pages/Signon/Tnc.tsx on lines 187..192
client-web/src/pages/Signon/Tnc.tsx on lines 193..198
client-web/src/pages/Signon/Tnc.tsx on lines 199..204
client-web/src/pages/Signon/Tnc.tsx on lines 211..216
client-web/src/pages/Signon/Tnc.tsx on lines 217..222

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

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