Showing 4,862 of 4,862 total issues
Function handleGetWalletDetails
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* handleGetWalletDetails(
getWalletById: WalletClient["getIOPaymentWalletById"],
action: ActionType<(typeof paymentsGetMethodDetailsAction)["request"]>
) {
try {
- 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 handleServiceDetails
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* handleServiceDetails(
getService: BackendClient["getService"],
action: ActionType<typeof loadServiceDetail.request>
) {
try {
- 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 handlePostRegistraBeneficiario
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* handlePostRegistraBeneficiario(
postRegistraBeneficiario: BackendCdcClient["postRegistraBeneficiario"],
action: ActionType<typeof cdcEnrollUserToBonus.request>
) {
const requestedBonus = action.payload;
- 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 detailsByIdReducer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const detailsByIdReducer = (
state: DetailsById = INITIAL_STATE,
action: Action
): DetailsById => {
switch (action.type) {
- 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 handleWalletPaymentAuthorization
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function* handleWalletPaymentAuthorization(
requestTransactionAuthorization: PaymentClient["requestTransactionAuthorizationForIO"],
action: ActionType<
(typeof paymentsStartPaymentAuthorizationAction)["request"]
>
- 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 InitiativeTimelineComponent
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const InitiativeTimelineComponent = ({ initiativeId, size = 3 }: Props) => {
const navigation = useNavigation<IOStackNavigationProp<AppParamsList>>();
const detailsBottomSheet = useTimelineDetailsBottomSheet(initiativeId);
- 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 getTransactionOperationProps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getTransactionOperationProps = (
operation: TransactionOperationDTO
): ListItemTransaction => {
const {
operationType,
- 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 IdPayCardStatus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function IdPayCardStatus({
now,
initiative
}: {
now: Date;
- 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 FciQtspClausesScreen
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const FciQtspClausesScreen = () => {
const dispatch = useIODispatch();
const navigation = useIONavigation();
const [clausesChecked, setClausesChecked] = React.useState(0);
const servicePreferencePot = useIOSelector(servicePreferencePotSelector);
- 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 getInstrumentOperationProps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getInstrumentOperationProps = (
operation: InstrumentOperationDTO | RejectedInstrumentOperationDTO
): ListItemTransaction => {
const { operationDate, operationType, maskedPan, instrumentType, brand } =
operation;
- 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 computeFooterData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const computeFooterData = (
paymentData: PaymentData | undefined,
paymentButtonStatus: "hidden" | "loading" | "enabled",
ctas: CTAS | undefined
): FooterData => {
- 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 MessageRouterScreen
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const MessageRouterScreen = (
props: NavigationProps
): React.ReactElement => {
const messageId = props.route.params.messageId;
const fromPushNotification = props.route.params.fromNotification;
- 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 generateMessageSectionData
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const generateMessageSectionData = (
iun: string,
messageId: UIMessageId,
isCancelled?: boolean,
paidNoticeCodes?: ReadonlyArray<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 MessageList
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
({ category }: MessageListProps, ref) => {
const store = useIOStore();
const dispatch = useIODispatch();
const safeAreaFrame = useSafeAreaFrame();
const safeAreaInsets = useSafeAreaInsets();
- 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 ItwDiscoveryBanner
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const ItwDiscoveryBanner = ({
withTitle = true,
ignoreMargins = false,
fallbackComponent,
closable = true
- 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 DoubleAvatar
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const DoubleAvatar = ({ backgroundLogoUri }: DoubleAvatarProps) => {
const theme = useIOTheme();
const indexValue = React.useRef<number>(0);
const imageInitialState = useCallback(
- 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 PaymentsTransactionListScreen
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const PaymentsTransactionListScreen = () => {
const dispatch = useIODispatch();
const navigation = useIONavigation();
const scrollTranslationY = useSharedValue(0);
- 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 usePaymentFailureSupportModal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const usePaymentFailureSupportModal = ({
failure,
outcome,
withPhoneAssistance = false
}: PaymentFailureSupportModalParams): PaymentFailureSupportModal => {
- 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 mapUserWalletToRadioItem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const mapUserWalletToRadioItem = (
method: WalletInfo
): RadioItem<string> | undefined => {
const details = method.details as UIWalletInfoDetails;
const paymentLogo = getPaymentLogoFromWalletDetails(details);
- 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 WalletPaymentPickMethodScreen
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const WalletPaymentPickMethodScreen = () => {
const dispatch = useIODispatch();
const navigation = useIONavigation();
const paymentDetailsPot = useIOSelector(walletPaymentDetailsSelector);
- 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"