naoufal/react-native-apple-pay

View on GitHub

Showing 71 of 71 total issues

Function hasGatewayConfig has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function hasGatewayConfig(platformMethodData = {}) {
  if (!platformMethodData) {
    return false;
  }

Severity: Minor
Found in js/PaymentRequest/helpers/index.js - About 1 hr to fix

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

            <ApplePayButton
              key="second"
              buttonStyle={this.state.style2}
              buttonType={this.state.type}
              onPress={() => alert('btn 2')}
    Severity: Major
    Found in examples/native/App.js and 1 other location - About 1 hr to fix
    examples/native/App.js on lines 33..38

    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 56.

    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

            <ApplePayButton
              key="first"
              buttonStyle={this.state.style}
              buttonType={this.state.type}
              onPress={() => alert('btn 1')}
    Severity: Major
    Found in examples/native/App.js and 1 other location - About 1 hr to fix
    examples/native/App.js on lines 42..47

    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 56.

    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

    Function updateWith has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      async updateWith(
        PaymentDetailsModifierOrPromise:
          | PaymentDetailsUpdate
          | ((
              PaymentDetailsModifier,
    Severity: Minor
    Found in js/PaymentRequest/PaymentRequestUpdateEvent.js - About 1 hr to fix

      Function validatePaymentMethods has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function validatePaymentMethods(methodData): Array {
        // Check that at least one payment method is passed in
        if (methodData.length < 1) {
          throw new ConstructorError(`At least one payment method is required`);
        }
      Severity: Minor
      Found in js/PaymentRequest/helpers/index.js - About 1 hr to fix

        Function errorNoShippingOptions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function errorNoShippingOptions() {
          let details = {
            id: 'errorNoShippingOptions',
            displayItems: [
              {
        Severity: Minor
        Found in examples/common/handlers/index.js - About 1 hr to fix

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

              describe('methodName', () => {
                it('should return `methodName`', () => {
                  expect(paymentRequest.methodName).toBe(paymentResponseData.methodName);
                });
          
          
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('requestId', () => {
                it('should return `requestId`', () => {
                  expect(paymentRequest.requestId).toBe(paymentResponseData.requestId);
                });
          
          
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('details', () => {
                it('should return `details`', () => {
                  expect(paymentRequest.details).toEqual(paymentResponseData.details);
                });
          
          
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('payerEmail', () => {
                it('should return `payerEmail`', () => {
                  expect(paymentRequest.payerEmail).toBe(paymentResponseData.payerEmail);
                });
          
          
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('shippingAddress', () => {
                it('should return `shippingAddress`', () => {
                  expect(paymentRequest.shippingAddress).toBe(
                    paymentResponseData.shippingAddress
                  );
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('payerName', () => {
                it('should return `payerName`', () => {
                  expect(paymentRequest.payerName).toBe(paymentResponseData.payerName);
                });
          
          
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('payerPhone', () => {
                it('should return `payerPhone`', () => {
                  expect(paymentRequest.payerPhone).toBe(paymentResponseData.payerPhone);
                });
          
          
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 81..93
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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 8 locations. Consider refactoring.
          Open

              describe('shippingOption', () => {
                it('should return `shippingOption`', () => {
                  expect(paymentRequest.shippingOption).toBe(
                    paymentResponseData.shippingOption
                  );
          Severity: Major
          Found in js/PaymentRequest/__tests__/PaymentResponse.test.js and 7 other locations - About 1 hr to fix
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 31..41
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 43..53
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 55..65
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 67..79
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 95..105
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 107..117
          js/PaymentRequest/__tests__/PaymentResponse.test.js on lines 119..129

          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 55.

          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

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

            const displayItems = [
              {
                label: 'Movie Ticket',
                amount: { currency: 'USD', value: 15.0 }
              },
          Severity: Minor
          Found in examples/common/handlers/index.js and 1 other location - About 55 mins to fix
          examples/common/handlers/index.js on lines 110..119

          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

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

            const displayItems = [
              {
                label: 'Movie Ticket',
                amount: { currency: 'USD', value: 15.0 }
              },
          Severity: Minor
          Found in examples/common/handlers/index.js and 1 other location - About 55 mins to fix
          examples/common/handlers/index.js on lines 134..143

          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

            paymentRequest.addEventListener('shippingoptionchange', e => {
              updateDetailsWithMutation(
                paymentRequest,
                details,
                getShippingOptionsForState(paymentRequest.shippingAddress.region)
          Severity: Minor
          Found in examples/common/handlers/index.js and 1 other location - About 45 mins to fix
          examples/common/handlers/index.js on lines 508..516

          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 50.

          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

            paymentRequest.addEventListener('shippingoptionchange', e => {
              updateDetailsWithMutation(
                paymentRequest,
                details,
                getShippingOptionsForCountry(paymentRequest.shippingAddress.country)
          Severity: Minor
          Found in examples/common/handlers/index.js and 1 other location - About 45 mins to fix
          examples/common/handlers/index.js on lines 390..398

          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 50.

          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

          Consider simplifying this complex logical expression.
          Open

                    if (
                      target._details.shippingOptions
                      && target._details.shippingOptions.length > 0
                      && value.shippingOptions
                      && ((value.shippingOptions.find(op => op.selected) || {}).id || null) !== target._shippingOption
          Severity: Major
          Found in js/PaymentRequest/PaymentRequestUpdateEvent.js - About 40 mins to fix

            Method getFullWalletAndroid has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                        String googleTransactionId,
                        ReadableMap paymentMethodData,
                        ReadableMap details,
                        Callback errorCallback,
                        Callback successCallback
              Severity
              Category
              Status
              Source
              Language