Showing 286 of 335 total issues
File AddressRow.tsx
has 376 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { View } from "react-native";
import { tailwind } from "@tailwind";
import { translate } from "@translations";
import { AddressType } from "@waveshq/walletkit-ui/dist/store";
import {
File Announcements.tsx
has 373 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ThemedIcon,
ThemedProps,
ThemedText,
ThemedTextV2,
File WithdrawFutureSwapScreen.tsx
has 371 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { useEffect, useMemo, useState } from "react";
import BigNumber from "bignumber.js";
import { StackScreenProps } from "@react-navigation/stack";
import { tailwind } from "@tailwind";
import { translate } from "@translations";
File ConfirmEditLoanSchemeScreen.tsx
has 370 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ThemedScrollViewV2,
ThemedTextV2,
ThemedViewV2,
} from "@components/themed";
File SettingsScreen.tsx
has 369 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ThemedIcon,
ThemedScrollViewV2,
ThemedSectionTitleV2,
ThemedTextV2,
File AuctionDetailScreen.tsx
has 367 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { useState, useEffect } from "react";
import { View } from "react-native";
import { useSelector, batch as reduxBatch } from "react-redux";
import { NumericFormat as NumberFormat } from "react-number-format";
import BigNumber from "bignumber.js";
File ConfirmPaybackLoanScreen.tsx
has 366 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { View } from "react-native";
import {
ThemedScrollViewV2,
ThemedTextV2,
ThemedViewV2,
Function ActionButtons
has 194 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function ActionButtons(): JSX.Element {
const { isFeatureAvailable } = useFeatureFlagContext();
const { domain, isEvmFeatureEnabled } = useDomainContext();
const isEvmDomain = domain === DomainType.EVM;
Function CreateOrEditAddressLabelForm
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
({ route, navigation }: Props): JSX.Element => {
const { title, address, addressLabel, onSaveButtonPress } = route.params;
const { isLight } = useThemeContext();
const { domain } = useDomainContext();
const { account } = useWalletContext();
- Read upRead up
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
File TokenSelectionScreen.tsx
has 364 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { useRef, useState, useMemo } from "react";
import { Image } from "expo-image";
import { View, TextInput } from "react-native";
import { NumericFormat as NumberFormat } from "react-number-format";
import { useSelector } from "react-redux";
File GetDFIScreen.tsx
has 361 lines of code (exceeds 250 allowed). Consider refactoring. Open
import * as Clipboard from "expo-clipboard";
import { StackScreenProps } from "@react-navigation/stack";
import { useCallback, useEffect, useState } from "react";
import { Share, TouchableOpacity, View, Text } from "react-native";
import QRCode from "react-qr-code";
File VaultDetailCollateralsRow.tsx
has 356 lines of code (exceeds 250 allowed). Consider refactoring. Open
import BigNumber from "bignumber.js";
import { useEffect, useState } from "react";
import { ThemedIcon, ThemedTextV2, ThemedViewV2 } from "@components/themed";
import { tailwind } from "@tailwind";
import { View } from "@components";
Function PrivacyLockContextProvider
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
export function PrivacyLockContextProvider(
props: React.PropsWithChildren<any>
): JSX.Element | null {
const logger = useLogger();
const [hasHardware, setHasHardware] = useState<boolean>(false);
- Read upRead up
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
File ViewPoolDetails.tsx
has 350 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { View, Platform } from "react-native";
import { memo } from "react";
import { tailwind } from "@tailwind";
import BigNumber from "bignumber.js";
import { ThemedTextV2, ThemedViewV2 } from "@components/themed";
Function VaultCard
has 180 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function VaultCard(props: VaultCardProps): JSX.Element {
const navigation = useNavigation<NavigationProp<LoanParamList>>();
const vault = props.vault as LoanVaultActive;
const vaultState = useVaultStatus(
vault.state,
File Vaults.tsx
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { tailwind } from "@tailwind";
import {
ThemedIcon,
ThemedScrollViewV2,
ThemedTextV2,
Function AddLiquidityScreen
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export function AddLiquidityScreen(props: Props): JSX.Element {
const logger = useLogger();
const navigation = useNavigation<NavigationProp<DexParamList>>();
const dispatch = useAppDispatch();
const DFIToken = useSelector((state: RootState) =>
- Read upRead up
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
Function SendScreen
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export function SendScreen({ route, navigation }: Props): JSX.Element {
const dispatch = useAppDispatch();
const logger = useLogger();
const { isEvmFeatureEnabled } = useDomainContext();
const { networkName } = useNetworkContext();
- Read upRead up
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
Function PlaygroundWallet
has 177 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function PlaygroundWallet(): JSX.Element | null {
const { wallets, clearWallets, setWallet } = useWalletPersistenceContext();
const { network, updateNetwork } = useNetworkContext();
const dataLists = [
File DexStabilization.ts
has 333 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { AnnouncementData } from "@waveshq/walletkit-core";
import { useLanguageContext } from "@shared-contexts/LanguageProvider";
import { nativeApplicationVersion } from "expo-application";
import { useCallback, useState } from "react";
import { useTokenBestPath } from "@screens/AppNavigator/screens/Portfolio/hooks/TokenBestPath";