synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Avoid too many return statements within this function.
Open

    return _(EXISTING_BRIDGE_ROUTES)
      .pickBy((values, _key) => {
        return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
      })
      .keys()
Severity: Major
Found in packages/synapse-interface/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return _(EXISTING_BRIDGE_ROUTES)
          .values()
          .flatten()
          .filter((token) => token.endsWith(`-${toChainId}`))
          .uniq()
    Severity: Major
    Found in packages/synapse-interface/utils/routeMaker/getToTokens.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return _(EXISTING_BRIDGE_ROUTES)
            .entries()
            .filter(([_key, values]) =>
              values.some((v) => v.endsWith(`-${toChainId}`))
            )
      Severity: Major
      Found in packages/synapse-interface/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return _(EXISTING_BRIDGE_ROUTES)
              .entries()
              .filter(([key, _values]) => key.startsWith(`${fromTokenRouteSymbol}-`))
              .map(([key, _values]) => key)
              .flatten()
        Severity: Major
        Found in packages/synapse-interface/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return Intl.NumberFormat(locales, {
                maximumFractionDigits: 0,
              }).format(floatAmount)
          Severity: Major
          Found in packages/explorer-ui/utils/formatAmount.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return _(EXISTING_SWAP_ROUTES)
                  .pickBy((values, _key) => values.some((v) => v.endsWith(`-${toChainId}`)))
                  .pickBy((_values, key) => key.endsWith(`-${fromChainId}`))
                  .keys()
                  .uniq()
            Severity: Major
            Found in packages/synapse-interface/utils/swapFinder/getSwapFromTokens.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return 'BridgeDepositClaimedEvent'
              Severity: Major
              Found in packages/rfq-indexer/api/src/graphql/resolvers.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                      return null
                Severity: Major
                Found in packages/rfq-indexer/api/src/graphql/resolvers.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                    return Intl.NumberFormat(locales, {
                      minimumFractionDigits: compactDigits,
                      maximumFractionDigits: compactDigits,
                      notation: useCompactNotation ? 'compact' : 'standard',
                    }).format(floatAmount)
                  Severity: Major
                  Found in packages/explorer-ui/utils/formatAmount.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return Intl.NumberFormat(locales, {
                          maximumSignificantDigits: 1,
                        }).format(floatAmount)
                    Severity: Major
                    Found in packages/explorer-ui/utils/formatAmount.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return _(EXISTING_BRIDGE_ROUTES)
                            .pickBy((values, _key) => {
                              return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
                            })
                            .keys()
                      Severity: Major
                      Found in packages/synapse-interface/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return _(EXISTING_BRIDGE_ROUTES)
                              .pickBy((values, _key) => {
                                return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
                              })
                              .keys()
                        Severity: Major
                        Found in packages/synapse-interface/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return _(EXISTING_BRIDGE_ROUTES)
                                .pickBy((_values, key) => key.endsWith(`-${fromChainId}`))
                                .values()
                                .flatten()
                                .filter((value) => value.endsWith(`-${toChainId}`))
                          Severity: Major
                          Found in packages/synapse-interface/utils/routeMaker/getToTokens.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return _(EXISTING_BRIDGE_ROUTES)
                                  .pickBy((values, _key) => values.some((v) => v.endsWith(`-${toChainId}`)))
                                  .keys()
                                  .filter((key) => key.endsWith(`-${fromChainId}`))
                                  .uniq()
                            Severity: Major
                            Found in packages/synapse-interface/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  return true
                              Severity: Major
                              Found in packages/synapse-interface/utils/hooks/useGasEstimator.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return EXISTING_BRIDGE_ROUTES[
                                      `${fromTokenRouteSymbol}-${fromChainId}`
                                    ]?.filter((token) => token.endsWith(`-${toChainId}`))
                                Severity: Major
                                Found in packages/synapse-interface/utils/routeMaker/getToTokens.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return _(EXISTING_BRIDGE_ROUTES).values().flatten().uniq().value()
                                  Severity: Major
                                  Found in packages/synapse-interface/utils/routeMaker/getToTokens.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return _(EXISTING_BRIDGE_ROUTES)
                                          .mapValues((values) =>
                                            values.filter((token) => token.startsWith(`${toTokenRouteSymbol}`))
                                          )
                                          .values()
                                    Severity: Major
                                    Found in packages/synapse-interface/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return _(EXISTING_BRIDGE_ROUTES)
                                            .pickBy((values, _key) => {
                                              return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
                                            })
                                            .keys()
                                      Severity: Major
                                      Found in packages/synapse-interface/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return _(EXISTING_SWAP_ROUTES)
                                              .chain()
                                              .filter((values, _key) => {
                                                return values.some((v) => {
                                                  const { symbol } = getTokenAndChainId(v)
                                        Severity: Major
                                        Found in packages/synapse-interface/utils/swapFinder/getSwapFromTokens.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language