Showing 286 of 335 total issues
Function RemoveLiquidityConfirmScreen
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function RemoveLiquidityConfirmScreen({ route }: Props): JSX.Element {
const {
pair,
pairInfo,
amount,
- 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 useValidCollateralRatio
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function useValidCollateralRatio(
collateralAmounts: LoanVaultTokenAmount[],
totalCollateralVaultValue: BigNumber,
loanValue: BigNumber,
collateralTokenId?: string,
- 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 BrowseAuctions
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function BrowseAuctions({
batches,
filteredAuctionBatches,
showSearchInput,
searchString,
- 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 ActionButton
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function ActionButton(props: ActionButtonsProps): JSX.Element {
const DFIIcon = getNativeIcon("DFIlogo");
const { isLight } = useThemeContext();
return (
<View style={tailwind("items-center")}>
- 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 FeatureFlagProvider
has 104 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function FeatureFlagProvider(
props: React.PropsWithChildren<any>,
): JSX.Element | null {
const { network } = useNetworkContext();
const { url, isCustomUrl } = useServiceProviderContext();
Function BottomSheetModal
has 104 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function BottomSheetModal(props: Props): JSX.Element {
const bottomSheetModalRef = useRef<Modal>(null);
const { dismiss } = useBottomSheetModal();
const { isLight } = useThemeContext();
const {
Function CollateralizationRatioDisplay
has 103 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function CollateralizationRatioDisplay(
props: CollateralizationRatioDisplayProps
): JSX.Element {
const { isLight } = useThemeContext();
const atRiskThresholdMultiplier = 1.5;
Function StepTwo
has 103 lines of code (exceeds 100 allowed). Consider refactoring. Open
function StepTwo(): JSX.Element {
const logger = useLogger();
const { isLight } = useThemeContext();
const { address } = useWalletContext();
const [showToast, setShowToast] = useState(false);
Function ThemedIcon
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function ThemedIcon(props: ThemedIconProps): JSX.Element {
const { isLight } = useThemeContext();
const {
style,
iconType,
- 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 PlaygroundStatus
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function PlaygroundStatus({
online,
error,
loading,
offline,
- 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 PinConfirmation
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function PinConfirmation({ route }: Props): JSX.Element {
const navigation = useNavigation<NavigationProp<WalletParamList>>();
const logger = useLogger();
const [isComplete, setIsComplete] = useState<boolean>(false); // To complete the last stepper node when pin is verified.
const { network } = 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 SubmitButtonGroup
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function SubmitButtonGroup({
buttonStyle,
isDisabled,
isCancelDisabled,
displayCancelBtn,
- 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 FeatureFlagScreen
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function FeatureFlagScreen(): JSX.Element {
const { featureFlags, enabledFeatures, updateEnabledFeatures } =
useFeatureFlagContext();
const [betaFeatures, setBetaFeatures] = useState<BetaFeaturesI[]>([]);
- 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 TokenSummary
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function TokenSummary(props: {
token: WalletToken;
border?: boolean;
usdAmount: BigNumber;
isEvmDomain?: boolean;
- 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 PlaygroundOperations
has 101 lines of code (exceeds 100 allowed). Consider refactoring. Open
export function PlaygroundOperations(): JSX.Element {
const { wallet } = useWalletContext();
const client = useWhaleApiClient();
const dispatch = useAppDispatch();
const { api, rpc } = usePlaygroundContext();
Function WalletCreateRestoreSuccess
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function WalletCreateRestoreSuccess({ route }: Props): JSX.Element {
const { isWalletRestored, data } = route.params;
const { network } = useNetworkContext();
const { isLight } = useThemeContext();
const { setWallet } = useWalletPersistenceContext();
- 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 VaultCardStatus
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function VaultCardStatus({
vault,
vaultStatus,
colRatio,
minColRatio,
- 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 WalletTextInputV2
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
(props: WalletTextInputProps, ref: React.Ref<any>): JSX.Element => {
const [isFocus, setIsFocus] = useState(false);
const {
title,
titleTestID,
- 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 PrivacyLock
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function PrivacyLock(): JSX.Element {
const privacyLock = usePrivacyLockContext();
const appState = useAppStateContext();
const logger = useLogger();
- 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 useVaultStatus
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function useVaultStatus(
status: LoanVaultState | undefined,
collateralRatio: BigNumber,
minColRatio: BigNumber,
totalLoanAmount: BigNumber,
- 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"