DeFiCh/wallet

View on GitHub
mobile-app/app/components/OceanInterface/OceanInterface.tsx

Summary

Maintainability
C
1 day
Test Coverage

Function OceanInterface has 209 lines of code (exceeds 100 allowed). Consider refactoring.
Open

export function OceanInterface(): JSX.Element | null {
  const logger = useLogger();
  const dispatch = useAppDispatch();
  const client = useWhaleApiClient();
  const { wallet, address } = useWalletContext();
Severity: Major
Found in mobile-app/app/components/OceanInterface/OceanInterface.tsx - About 5 hrs to fix

    File OceanInterface.tsx has 316 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import {
      getMetaScanTxUrl,
      useDeFiScanContext,
    } from "@shared-contexts/DeFiScanContext";
    import { useWalletContext } from "@shared-contexts/WalletContext";
    Severity: Minor
    Found in mobile-app/app/components/OceanInterface/OceanInterface.tsx - About 3 hrs to fix

      Consider simplifying this complex logical expression.
      Open

          if (
            tx?.broadcasted && // only call tx when tx is done
            calledTx !== tx?.tx.txId && // to ensure that api is only called once per tx
            tx?.tx.txId !== undefined &&
            network === EnvironmentNetwork.MainNet &&
      Severity: Major
      Found in mobile-app/app/components/OceanInterface/OceanInterface.tsx - About 40 mins to fix

        There are no issues that match your filters.

        Category
        Status