synapsecns/sanguine

View on GitHub
packages/synapse-interface/styles/chains.ts

Summary

Maintainability
F
2 wks
Test Coverage

File chains.ts has 485 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable */
const CustomColors = {
  CUSTOM_YELLOW: '[#ecae0b]',
  CUSTOM_YELLOW_DARK: '[#3c3c44]',
  ETH_BASE: '[#5170ad]',
Severity: Minor
Found in packages/synapse-interface/styles/chains.ts - About 7 hrs to fix

    Function getNetworkHover has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getNetworkHover = (chainColor: string): string => {
      switch (chainColor) {
        case ColorOptions.YELLOW:
          return `hover:bg-[bg-yellow-500] hover:bg-opacity-30 dark:hover:bg-yellow-500 dark:hover:bg-opacity-30`
        case ColorOptions.ETH:
    Severity: Minor
    Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

      Function getNetworkButtonBorderImportant has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const getNetworkButtonBorderImportant = (chainColor: string): string => {
        switch (chainColor) {
          case ColorOptions.YELLOW:
            return `border-[#ecae0b] dark:border-[#ecae0b]`
          case ColorOptions.ETH:
      Severity: Minor
      Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

        Function getNetworkButtonBorderHover has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const getNetworkButtonBorderHover = (chainColor: string): string => {
          switch (chainColor) {
            case ColorOptions.YELLOW:
              return `hover:border-[#ecae0b]`
            case ColorOptions.ETH:
        Severity: Minor
        Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

          Function getNetworkTextColor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const getNetworkTextColor = (chainColor: string): string => {
            switch (chainColor) {
              case ColorOptions.YELLOW:
                return `text-[#ecae0b] dark:text-[#ecae0b]`
              case ColorOptions.ETH:
          Severity: Minor
          Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

            Function getNetworkLinkTextColor has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const getNetworkLinkTextColor = (chainColor: string): string => {
              switch (chainColor) {
                case ColorOptions.YELLOW:
                  return `text-gray-800 hover:text-[#ecae0b] dark:text-[#ecae0b] dark:hover:text-[#ecae0b]`
                case ColorOptions.ETH:
            Severity: Minor
            Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

              Function getNetworkButtonBorderActive has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const getNetworkButtonBorderActive = (chainColor: string): string => {
                switch (chainColor) {
                  case ColorOptions.YELLOW:
                    return `active:border-[#ecae0b]`
                  case ColorOptions.ETH:
              Severity: Minor
              Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                Function getNetworkBgClassNameLightDark has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const getNetworkBgClassNameLightDark = (chainColor: string): string => {
                  switch (chainColor) {
                    case ColorOptions.YELLOW:
                      return `bg-[#ecae0b]`
                    case ColorOptions.ETH:
                Severity: Minor
                Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                  Function getNetworkBgClassName has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const getNetworkBgClassName = (chainColor: string): string => {
                    switch (chainColor) {
                      case ColorOptions.YELLOW:
                        return 'bg-stone-800'
                      case ColorOptions.ETH:
                  Severity: Minor
                  Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                    Function getNetworkButtonBgClassName has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const getNetworkButtonBgClassName = (chainColor: string): string => {
                      switch (chainColor) {
                        case ColorOptions.YELLOW:
                          return `bg-[#ecae0b] hover:bg-[#ecae0b] active:bg-[#ecae0b]`
                        case ColorOptions.ETH:
                    Severity: Minor
                    Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                      Function getNetworkButtonBgClassNameActive has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const getNetworkButtonBgClassNameActive = (
                        chainColor: string
                      ): string => {
                        switch (chainColor) {
                          case ColorOptions.YELLOW:
                      Severity: Minor
                      Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                        Function getNetworkButtonBorder has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const getNetworkButtonBorder = (chainColor: string): string => {
                          switch (chainColor) {
                            case ColorOptions.YELLOW:
                              return `border-[#ecae0b] dark:border-[#ecae0b]`
                            case ColorOptions.ETH:
                        Severity: Minor
                        Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                          Function getNetworkShadow has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const getNetworkShadow = (chainColor: string): string => {
                            switch (chainColor) {
                              case ColorOptions.ETH:
                                return `shadow-blue-xl hover:shadow-blue-2xl`
                              case ColorOptions.YELLOW:
                          Severity: Minor
                          Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

                            Function getMenuItemStyleForChain has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const getMenuItemStyleForChain = (color: string): string => {
                              switch (color) {
                                case ColorOptions.ETH:
                                  return `hover:bg-opacity-20 hover:bg-[#3f4f8c] focus:bg-[#3f4f8c] active:bg-[#314367] active:bg-opacity-20 focus:bg-opacity-20`
                                case ColorOptions.GRAY:
                            Severity: Minor
                            Found in packages/synapse-interface/styles/chains.ts - About 1 hr to fix

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

                              export const getNetworkButtonBorderActive = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `active:border-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkButtonBorderHover = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `hover:border-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkTextColor = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `text-[#ecae0b] dark:text-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkButtonBgClassNameActive = (
                                chainColor: string
                              ): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkBgClassNameLightDark = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `bg-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkShadow = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.ETH:
                                    return `shadow-blue-xl hover:shadow-blue-2xl`
                                  case ColorOptions.YELLOW:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkLinkTextColor = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `text-gray-800 hover:text-[#ecae0b] dark:text-[#ecae0b] dark:hover:text-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkHover = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `hover:bg-[bg-yellow-500] hover:bg-opacity-30 dark:hover:bg-yellow-500 dark:hover:bg-opacity-30`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509

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

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

                              export const getNetworkButtonBorder = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `border-[#ecae0b] dark:border-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 234..265
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

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

                              export const getNetworkButtonBorderImportant = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `border-[#ecae0b] dark:border-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 9 other locations - About 1 day to fix
                              packages/synapse-interface/styles/chains.ts on lines 100..133
                              packages/synapse-interface/styles/chains.ts on lines 135..166
                              packages/synapse-interface/styles/chains.ts on lines 168..199
                              packages/synapse-interface/styles/chains.ts on lines 201..232
                              packages/synapse-interface/styles/chains.ts on lines 267..298
                              packages/synapse-interface/styles/chains.ts on lines 300..331
                              packages/synapse-interface/styles/chains.ts on lines 445..476
                              packages/synapse-interface/styles/chains.ts on lines 478..509
                              packages/synapse-interface/styles/chains.ts on lines 511..542

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

                              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 getNetworkTextColorContrastHover = (
                                chainColor: string
                              ): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 1 other location - About 6 hrs to fix
                              packages/synapse-interface/styles/chains.ts on lines 364..385

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

                              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 getNetworkTextColorContrast = (chainColor: string): string => {
                                switch (chainColor) {
                                  case ColorOptions.YELLOW:
                                    return `text-[#ecae0b]`
                                  case ColorOptions.ETH:
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 1 other location - About 6 hrs to fix
                              packages/synapse-interface/styles/chains.ts on lines 387..410

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

                              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 ColorOptions = {
                                ETH: 'eth',
                                RED: 'red',
                                ORANGE: 'orange',
                                YELLOW: 'yellow',
                              Severity: Major
                              Found in packages/synapse-interface/styles/chains.ts and 1 other location - About 1 hr to fix
                              packages/synapse-interface/styles/hover.ts on lines 1..15

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

                              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

                              There are no issues that match your filters.

                              Category
                              Status