synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

Function StateManagedBridge has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
Open

const StateManagedBridge = () => {
  const dispatch = useAppDispatch()
  const { address, isConnected, chain: connectedChain } = useAccount()
  const { balances } = usePortfolioState()
  const { synapseSDK } = useSynapseContext()
Severity: Minor
Found in packages/synapse-interface/pages/state-managed-bridge/index.tsx - About 1 day to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Method ProxySuite.TestParseRPCPayload has 260 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func (p *ProxySuite) TestParseRPCPayload() {
    /*
      CHECK BLOCKS
    */

Severity: Major
Found in services/omnirpc/proxy/confirmable_test.go - About 1 day to fix

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

      describe('#constructor', () => {
        it('fails with undefined chain id', () => {
          expect(
            () => new SynapseRouter(undefined as any, ethProvider, ethAddress)
          ).toThrow('CHAIN_ID_UNDEFINED')
    Severity: Major
    Found in packages/sdk-router/src/router/synapseRouter.test.ts and 1 other location - About 1 day to fix
    packages/sdk-router/src/router/synapseCCTPRouter.test.ts on lines 26..66

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

    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

      describe('#constructor', () => {
        it('fails with undefined chain id', () => {
          expect(
            () => new SynapseCCTPRouter(undefined as any, ethProvider, ethAddress)
          ).toThrow('CHAIN_ID_UNDEFINED')
    Severity: Major
    Found in packages/sdk-router/src/router/synapseCCTPRouter.test.ts and 1 other location - About 1 day to fix
    packages/sdk-router/src/router/synapseRouter.test.ts on lines 26..58

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

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

      describe('#greaterThan', () => {
        it('correct', () => {
          expect(
            new Fraction(JSBI.BigInt(1), JSBI.BigInt(10)).greaterThan(
              new Fraction(JSBI.BigInt(4), JSBI.BigInt(12))
    Severity: Major
    Found in packages/sdk-router/src/entities/fractions/fraction.test.ts and 2 other locations - About 1 day to fix
    packages/sdk-router/src/entities/fractions/fraction.test.ts on lines 75..93
    packages/sdk-router/src/entities/fractions/fraction.test.ts on lines 94..112

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

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

      describe('#lessThan', () => {
        it('correct', () => {
          expect(
            new Fraction(JSBI.BigInt(1), JSBI.BigInt(10)).lessThan(
              new Fraction(JSBI.BigInt(4), JSBI.BigInt(12))
    Severity: Major
    Found in packages/sdk-router/src/entities/fractions/fraction.test.ts and 2 other locations - About 1 day to fix
    packages/sdk-router/src/entities/fractions/fraction.test.ts on lines 94..112
    packages/sdk-router/src/entities/fractions/fraction.test.ts on lines 113..131

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

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

      describe('#equalTo', () => {
        it('correct', () => {
          expect(
            new Fraction(JSBI.BigInt(1), JSBI.BigInt(10)).equalTo(
              new Fraction(JSBI.BigInt(4), JSBI.BigInt(12))
    Severity: Major
    Found in packages/sdk-router/src/entities/fractions/fraction.test.ts and 2 other locations - About 1 day to fix
    packages/sdk-router/src/entities/fractions/fraction.test.ts on lines 75..93
    packages/sdk-router/src/entities/fractions/fraction.test.ts on lines 113..131

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

    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 DestinationAddressInput has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
    Open

    export const DestinationAddressInput = ({
      connectedAddress,
    }: {
      connectedAddress: string
    }) => {

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    export const JEWEL: BridgeableToken = {
      addresses: {
        [CHAINS.DFK.id]: ZeroAddress,
        [CHAINS.HARMONY.id]: '0x72cb10c6bfa5624dd07ef608027e366bd690048f',
        [CHAINS.KLAYTN.id]: '0x30C103f8f5A3A732DFe2dCE1Cc9446f545527b43',
    Severity: Major
    Found in packages/widget/src/constants/bridgeable.ts and 1 other location - About 1 day to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 915..940

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

    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 JEWEL: BridgeableToken = {
      addresses: {
        [CHAINS.DFK.id]: NativeTokenAddress,
        [CHAINS.HARMONY.id]: '0x72cb10c6bfa5624dd07ef608027e366bd690048f',
        [CHAINS.KLAYTN.id]: '0x30C103f8f5A3A732DFe2dCE1Cc9446f545527b43',
    Severity: Major
    Found in packages/rest-api/src/constants/bridgeable.ts and 1 other location - About 1 day to fix
    packages/widget/src/constants/bridgeable.ts on lines 913..938

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

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

    export const BridgeFlow = () => {
      return (
        <svg
          width="100%"
          viewBox="-240 0 480 164"
    Severity: Major
    Found in docs/bridge/src/components/BridgeFlow.tsx - About 1 day to fix

      Method executionContext._Query has 248 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) graphql.Marshaler {
          fields := graphql.CollectFields(ec.OperationContext, sel, queryImplementors)
          ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
              Object: "Query",
          })
      Severity: Major
      Found in services/explorer/graphql/server/graph/resolver/server.go - About 1 day to fix

        Function Home has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
        Open

        export const Home = () => {
          const [platform, setPlatform] = useState('ALL')
          const [transactionsArr, setTransactionsArr] = useState([])
          const [dailyDataArr, setDailyDataArr] = useState([])
          const [kappa, setKappa] = useState('')
        Severity: Minor
        Found in packages/explorer-ui/components/pages/Home/index.tsx - About 1 day to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

        export const MaintenanceWarningMessage = ({
          originChainId,
          destinationChainId,
          startDate,
          endDate,
        packages/synapse-interface/components/Maintenance/components/MaintenanceWarningMessage.tsx on lines 10..42

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

        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 MaintenanceWarningMessage = ({
          fromChainId,
          toChainId,
          startDate,
          endDate,
        packages/widget/src/components/Maintenance/MaintenanceWarningMessage.tsx on lines 8..40

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

        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

        export const getSwapHoverStyleForCoin = (tokenColor: string): string => {
          switch (tokenColor) {
            case ColorOptions.GRAY:
              return `hover:shadow-gray-xl border-gray-100`
            case ColorOptions.YELLOW:
        Severity: Major
        Found in packages/synapse-interface/styles/tokens.ts and 15 other locations - About 1 day to fix
        packages/synapse-interface/styles/tokens.ts on lines 44..71
        packages/synapse-interface/styles/tokens.ts on lines 73..100
        packages/synapse-interface/styles/tokens.ts on lines 137..164
        packages/synapse-interface/styles/tokens.ts on lines 166..193
        packages/synapse-interface/styles/tokens.ts on lines 195..222
        packages/synapse-interface/styles/tokens.ts on lines 224..251
        packages/synapse-interface/styles/tokens.ts on lines 253..280
        packages/synapse-interface/styles/tokens.ts on lines 286..313
        packages/synapse-interface/styles/tokens.ts on lines 315..342
        packages/synapse-interface/styles/tokens.ts on lines 344..371
        packages/synapse-interface/styles/tokens.ts on lines 373..400
        packages/synapse-interface/styles/tokens.ts on lines 402..429
        packages/synapse-interface/styles/tokens.ts on lines 431..458
        packages/synapse-interface/styles/tokens.ts on lines 460..487
        packages/synapse-interface/styles/tokens.ts on lines 489..516

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

        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

        export const getSwapBorderStyleForCoin = (tokenColor: string): string => {
          switch (tokenColor) {
            case ColorOptions.GRAY:
              return `border-gray-50 dark:border-opacity-20 dark:border-gray-700`
            case ColorOptions.YELLOW:
        Severity: Major
        Found in packages/synapse-interface/styles/tokens.ts and 15 other locations - About 1 day to fix
        packages/synapse-interface/styles/tokens.ts on lines 44..71
        packages/synapse-interface/styles/tokens.ts on lines 73..100
        packages/synapse-interface/styles/tokens.ts on lines 108..135
        packages/synapse-interface/styles/tokens.ts on lines 137..164
        packages/synapse-interface/styles/tokens.ts on lines 166..193
        packages/synapse-interface/styles/tokens.ts on lines 195..222
        packages/synapse-interface/styles/tokens.ts on lines 224..251
        packages/synapse-interface/styles/tokens.ts on lines 253..280
        packages/synapse-interface/styles/tokens.ts on lines 286..313
        packages/synapse-interface/styles/tokens.ts on lines 315..342
        packages/synapse-interface/styles/tokens.ts on lines 373..400
        packages/synapse-interface/styles/tokens.ts on lines 402..429
        packages/synapse-interface/styles/tokens.ts on lines 431..458
        packages/synapse-interface/styles/tokens.ts on lines 460..487
        packages/synapse-interface/styles/tokens.ts on lines 489..516

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

        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

        export const getInputBorderFocusStyleForCoin = (tokenColor: string): string => {
          switch (tokenColor) {
            case ColorOptions.GRAY:
              return `focus-within:border-gray-200 dark:focus-within:border-gray-500`
            case ColorOptions.YELLOW:
        Severity: Major
        Found in packages/synapse-interface/styles/tokens.ts and 15 other locations - About 1 day to fix
        packages/synapse-interface/styles/tokens.ts on lines 44..71
        packages/synapse-interface/styles/tokens.ts on lines 73..100
        packages/synapse-interface/styles/tokens.ts on lines 108..135
        packages/synapse-interface/styles/tokens.ts on lines 137..164
        packages/synapse-interface/styles/tokens.ts on lines 166..193
        packages/synapse-interface/styles/tokens.ts on lines 195..222
        packages/synapse-interface/styles/tokens.ts on lines 224..251
        packages/synapse-interface/styles/tokens.ts on lines 253..280
        packages/synapse-interface/styles/tokens.ts on lines 286..313
        packages/synapse-interface/styles/tokens.ts on lines 344..371
        packages/synapse-interface/styles/tokens.ts on lines 373..400
        packages/synapse-interface/styles/tokens.ts on lines 402..429
        packages/synapse-interface/styles/tokens.ts on lines 431..458
        packages/synapse-interface/styles/tokens.ts on lines 460..487
        packages/synapse-interface/styles/tokens.ts on lines 489..516

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

        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

        export const getBorderStyleForCoin = (tokenColor: string): string => {
          switch (tokenColor) {
            case ColorOptions.GRAY:
              return `border-gray-300`
            case ColorOptions.YELLOW:
        Severity: Major
        Found in packages/synapse-interface/styles/tokens.ts and 15 other locations - About 1 day to fix
        packages/synapse-interface/styles/tokens.ts on lines 44..71
        packages/synapse-interface/styles/tokens.ts on lines 73..100
        packages/synapse-interface/styles/tokens.ts on lines 108..135
        packages/synapse-interface/styles/tokens.ts on lines 137..164
        packages/synapse-interface/styles/tokens.ts on lines 166..193
        packages/synapse-interface/styles/tokens.ts on lines 195..222
        packages/synapse-interface/styles/tokens.ts on lines 224..251
        packages/synapse-interface/styles/tokens.ts on lines 253..280
        packages/synapse-interface/styles/tokens.ts on lines 286..313
        packages/synapse-interface/styles/tokens.ts on lines 315..342
        packages/synapse-interface/styles/tokens.ts on lines 344..371
        packages/synapse-interface/styles/tokens.ts on lines 373..400
        packages/synapse-interface/styles/tokens.ts on lines 431..458
        packages/synapse-interface/styles/tokens.ts on lines 460..487
        packages/synapse-interface/styles/tokens.ts on lines 489..516

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

        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

        export const getSwapCardShadowStyleForCoin = (tokenColor: string): string => {
          switch (tokenColor) {
            case ColorOptions.GRAY:
              return `shadow-gray-xl hover:shadow-gray-2xl`
            case ColorOptions.YELLOW:
        Severity: Major
        Found in packages/synapse-interface/styles/tokens.ts and 15 other locations - About 1 day to fix
        packages/synapse-interface/styles/tokens.ts on lines 44..71
        packages/synapse-interface/styles/tokens.ts on lines 73..100
        packages/synapse-interface/styles/tokens.ts on lines 108..135
        packages/synapse-interface/styles/tokens.ts on lines 137..164
        packages/synapse-interface/styles/tokens.ts on lines 166..193
        packages/synapse-interface/styles/tokens.ts on lines 195..222
        packages/synapse-interface/styles/tokens.ts on lines 224..251
        packages/synapse-interface/styles/tokens.ts on lines 253..280
        packages/synapse-interface/styles/tokens.ts on lines 286..313
        packages/synapse-interface/styles/tokens.ts on lines 315..342
        packages/synapse-interface/styles/tokens.ts on lines 344..371
        packages/synapse-interface/styles/tokens.ts on lines 373..400
        packages/synapse-interface/styles/tokens.ts on lines 402..429
        packages/synapse-interface/styles/tokens.ts on lines 431..458
        packages/synapse-interface/styles/tokens.ts on lines 460..487

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

        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