Showing 502 of 8,855 total issues
Function init
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
init(walletAddress: string, password: string) {
if (!password) {
return;
}
- Create a ticketCreate a ticket
Function parseValue
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
const parseValue = (
value: string,
partTypes: PartType[],
positionOffset = 0,
): {plainText: string; parts: Part[]} => {
- Create a ticketCreate a ticket
Function router
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
const router = (xmpp, message, roomJID, userJID, receiverData, receiverMessageId, connectData) => {
let userStep = userSteps('getStep', receiverData.attrs.senderJID, null);
let currentButtonType = userData('getData', userJID, null);
let handlerData = {
- Read upRead up
- Create a ticketCreate a ticket
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 MintNft
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
export const MintNft: React.FC<IMintNft> = ({}) => {
const [preview, setPreview] = React.useState<any>(null);
const [fileError, setFileError] = React.useState("");
const [file, setFile] = React.useState<File | null>(null);
const [loading, setLoading] = React.useState(false);
- Read upRead up
- Create a ticketCreate a ticket
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
File Provenance.tsx
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Avatar,
Collapse,
List,
ListItem,
- Create a ticketCreate a ticket
File RegisterScreen.tsx
has 288 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
Copyright 2019-2021 (c) Dappros Ltd, registered in England & Wales, registration number 11455432. All rights reserved.
You may not use this file except in compliance with the License.
You may obtain a copy of the License at https://github.com/dappros/ethora/blob/main/LICENSE.
*/
- Create a ticketCreate a ticket
Function AssetItem
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
const AssetItem = (props: AssetItemProps) => {
const {
itemTransferFunc,
selectedItem,
nftId,
- Create a ticketCreate a ticket
Function CoinPurchaseScreen
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const CoinPurchaseScreen: React.FC<ICoinPurchaseScreen> = ({}) => {
const {loginStore, walletStore} = useStores();
const {
connected,
- Create a ticketCreate a ticket
Function messages
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
const messages = () => {
return {
general: {
welcomeMessage: 'Raffle bot launched!',
},
- Create a ticketCreate a ticket
Function ProfileShareTab
has 70 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ProfileShareTab = (props: ProfileShareTabProps) => {
const [tab, setTab] = React.useState(0);
const [loading, setLoading] = React.useState(false);
const [sharedLinks, setSharedLinks] = React.useState<ISharedLink[]>([]);
- Create a ticketCreate a ticket
File ThreadContainer.tsx
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState } from "react";
import {
ChatContainer,
ConversationHeader,
MessageInput,
- Create a ticketCreate a ticket
File NftListItem.tsx
has 283 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
Copyright 2019-2022 (c) Dappros Ltd, registered in England & Wales, registration number 11455432. All rights reserved.
You may not use this file except in compliance with the License.
You may obtain a copy of the License at https://github.com/dappros/ethora/blob/main/LICENSE.
Note: linked open-source libraries and components may be subject to their own licenses.
- Create a ticketCreate a ticket
File MetaNavigation.tsx
has 282 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useEffect, useState } from "react";
import { CompassItem } from "./CompassItem";
import {
Box,
- Create a ticketCreate a ticket
Function ChatTransferDialog
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export function ChatTransferDialog({
open,
onClose,
loading,
message,
- Read upRead up
- Create a ticketCreate a ticket
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 NewItemModal
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export default function NewItemModal(props: Props) {
const [preview, setPreview] = React.useState<any>(null);
const [fileError, setFileError] = React.useState("");
const [file, setFile] = React.useState<File | null>(null);
const [loading, setLoading] = React.useState(false);
- Read upRead up
- Create a ticketCreate a ticket
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 MintScreen
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const MintScreen = () => {
//mobx stores
const {loginStore, walletStore} = useStores();
//mobx stores
- Read upRead up
- Create a ticketCreate a ticket
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 TokensOrItemsTransfer
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export const TokensOrItemsTransfer: React.FC<ITransferModal> = ({
dataForTransfer,
closeModal,
hideUserActions,
}) => {
- Read upRead up
- Create a ticketCreate a ticket
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 getPushToken
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getPushToken = async (
walletAddress: string,
DOMAIN: string,
defaultUrl: string,
navigation: HomeStackNavigationProp,
- Create a ticketCreate a ticket
Function renderMedia
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderMedia = (mediaProps: IMessage | any) => {
if (!mediaProps) {
return null;
}
const {
- Create a ticketCreate a ticket
Function renderTokenTypeName
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderTokenTypeName = () => {
if (type === tokenTypes.mint) {
const allTotals = nftTotal ? nftTotal.split(',') : [];
const currentTotal = allTotals[+parseInt(contractId as string) - 1];
- Create a ticketCreate a ticket