Sorry, data for that comparison is no longer available.

teamdigitale/italia-app

View on GitHub
ts/screens/wallet/payment/PickPaymentMethodScreen.tsx

Summary

Maintainability
D
1 day
Test Coverage

Function PickPaymentMethodScreen has 125 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const PickPaymentMethodScreen: React.FunctionComponent<Props> = (
  props: Props
) => {
  const { methodsCanPay, methodsCantPay, methodsCanPayButDisabled } = props;

Severity: Major
Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx - About 5 hrs to fix

    File PickPaymentMethodScreen.tsx has 292 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /**
     * This screen allows the user to select the payment method for a selected transaction
     */
    import {
      ContentWrapper,
    Severity: Minor
    Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx - About 3 hrs to fix

      Function mapStateToProps has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const mapStateToProps = (state: GlobalState) => {
        const potVisibleCreditCard = creditCardListVisibleInWalletSelector(state);
        const potVisiblePaypal = isPaypalEnabledSelector(state)
          ? paypalListSelector(state)
          : pot.none;
      Severity: Minor
      Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx - About 1 hr to fix

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        const PickPaymentMethodScreenFC = () => {
          const navigation =
            useNavigation<
              IOStackNavigationProp<WalletParamsList, "PAYMENT_PICK_PAYMENT_METHOD">
            >();
        Severity: Major
        Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx and 1 other location - About 2 hrs to fix
        ts/screens/wallet/PaymentHistoryDetailsScreen.tsx on lines 428..446

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 85.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 3 locations. Consider refactoring.
        Open

                secondary={{
                  type: "Solid",
                  buttonProps: {
                    label: I18n.t("wallet.newPaymentMethod.addButton"),
                    accessibilityLabel: I18n.t("wallet.newPaymentMethod.addButton"),
        Severity: Major
        Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx and 2 other locations - About 1 hr to fix
        ts/features/wallet/onboarding/paypal/screen/PayPalPspSelectionScreen.tsx on lines 170..178
        ts/features/wallet/onboarding/paypal/screen/PayPalStartOnboardingScreen.tsx on lines 87..95

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 59.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 6 locations. Consider refactoring.
        Open

                primary={{
                  type: "Outline",
                  buttonProps: {
                    label: I18n.t("global.buttons.back"),
                    accessibilityLabel: I18n.t("global.buttons.back"),
        Severity: Major
        Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx and 5 other locations - About 55 mins to fix
        ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayComponent.tsx on lines 73..80
        ts/features/wallet/onboarding/bancomatPay/screens/add-account/AddBPayComponent.tsx on lines 81..88
        ts/features/wallet/onboarding/bancomatPay/screens/searchBPay/BPayKoNotFound.tsx on lines 47..54
        ts/features/wallet/onboarding/cobadge/screens/search/ko/CoBadgeKoSingleBankNotFound.tsx on lines 67..74
        ts/features/wallet/onboarding/common/searchBank/SearchStartScreen.tsx on lines 88..95

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 54.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Similar blocks of code found in 2 locations. Consider refactoring.
        Open

        export type PickPaymentMethodScreenNavigationParams = Readonly<{
          rptId: RptId;
          initialAmount: AmountInEuroCents;
          verifica: PaymentRequestsGetResponse;
          idPayment: string;
        Severity: Minor
        Found in ts/screens/wallet/payment/PickPaymentMethodScreen.tsx and 1 other location - About 40 mins to fix
        ts/screens/wallet/payment/TransactionSummaryScreen.tsx on lines 78..83

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 49.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        There are no issues that match your filters.

        Category
        Status