Showing 1,971 of 13,422 total issues
Function createBridgeTest
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createBridgeTest = (
fastBridgeRouter: FastBridgeRouter,
bridgeParams: BridgeTestsParams,
originQuery: Query,
destQuery: Query
Function getToStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getToStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `to-gray-300`
case ColorOptions.YELLOW:
Function getSwapBorderStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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:
Function getInputBorderFocusStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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:
Function getFromStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getFromStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `from-gray-300`
case ColorOptions.YELLOW:
Function getButtonStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getButtonStyleForCoin = (tokenColor: string) => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `hover:border-gray-100 dark:hover:border-opacity-50 dark:hover:!border-gray-700`
case ColorOptions.YELLOW:
Function getCoinTextColor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getCoinTextColor = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `text-gray-500 group-hover:text-gray-400`
case ColorOptions.YELLOW:
Function getMenuItemStyleForCoinDark
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getMenuItemStyleForCoinDark = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `dark:hover:bg-opacity-20 dark:focus:bg-opacity-20 dark:active:bg-opacity-20 dark:hover:bg-gray-500 dark:focus:bg-gray-500 dark:active:bg-gray-500`
case ColorOptions.YELLOW:
Function getMenuItemBgForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getMenuItemBgForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `bg-gray-500 bg-opacity-20 dark:bg-opacity-20 dark:bg-gray-700`
case ColorOptions.YELLOW:
Function getMenuItemStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getMenuItemStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `hover:bg-opacity-20 hover:bg-gray-500 focus:bg-gray-500 active:bg-gray-500 active:bg-opacity-20 focus:bg-opacity-20`
case ColorOptions.YELLOW:
Function getSwapBorderHoverStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getSwapBorderHoverStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `hover:border-gray-100 dark:hover:border-opacity-50 dark:hover:!border-gray-700`
case ColorOptions.YELLOW:
Function getBorderStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getBorderStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `border-gray-300`
case ColorOptions.YELLOW:
Function getSwapHoverStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getSwapHoverStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `hover:shadow-gray-xl border-gray-100`
case ColorOptions.YELLOW:
Function getSwapCardShadowStyleForCoin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getSwapCardShadowStyleForCoin = (tokenColor: string): string => {
switch (tokenColor) {
case ColorOptions.GRAY:
return `shadow-gray-xl hover:shadow-gray-2xl`
case ColorOptions.YELLOW:
Function calls
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const calls = validTokens.map((token: BridgeableToken) => {
const tokenAddress: string = token.addresses[chainId]
if (tokenAddress === ZeroAddress) {
const tokenContract = new ethers.Contract(
Function HistoricMax
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HistoricMax = () => {
const t = useTranslations('FauxBridge')
return (
<div className="relative pointer-events-none group">
<div className="absolute right-0 hidden mb-2 origin-bottom-right bottom-full group-hover:block animate-slide-up">
Function useExchangeRateInfo
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const useExchangeRateInfo = (value, exchangeRate) => {
const safeExchangeRate = typeof exchangeRate === 'bigint' ? exchangeRate : 0n
const safeFromAmount = value ?? '0'
const formattedExchangeRate = formatBigIntToString(safeExchangeRate, 18, 4)
Method exporter.vpriceStats
has 10 return statements (exceeds 4 allowed). Open
Open
func (e *exporter) vpriceStats(ctx context.Context, chainID int, tokenID string) error {
client, err := e.omnirpcClient.GetConfirmationsClient(ctx, chainID, 1)
if err != nil {
return fmt.Errorf("could not get confirmations client: %w", err)
}
Function compileSolidity
has 10 return statements (exceeds 4 allowed). Open
Open
func compileSolidity(version string, filePath string, optimizeRuns int, evmVersion *string) (map[string]*compiler.Contract, error) {
runFile, err := createRunFile(version)
if err != nil {
return nil, err
}
Function getChangeTreeFromGit
has 10 return statements (exceeds 4 allowed). Open
Open
func getChangeTreeFromGit(repoPath string, ghContext *actionscore.Context, head, base string) (tree.Tree, error) {
// open the repository
repository, err := git.PlainOpen(repoPath)
if err != nil {
return nil, fmt.Errorf("could not open repository %s: %w", repoPath, err)