Showing 502 of 8,855 total issues
File loginStore.ts
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
import AsyncStorage from '@react-native-async-storage/async-storage';
import {makeAutoObservable, runInAction, action} from 'mobx';
import {LoginManager} from 'react-native-fbsdk-next';
import {deleteAllRealm} from '../components/realmModels/allSchemas';
import {httpPost, httpPut} from '../config/apiService';
- Create a ticketCreate a ticket
Function insertTransaction
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
export const insertTransaction = data =>
new Promise(async (resolve, reject) => {
data.map(item => {
if (!item.nftTotal) item.nftTotal = '0';
const data = {
- 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 sendMessage
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function sendMessage(p: Participant, message: Message, client: Client, walletAddress: string, repeat = false): Promise<void> {
if (repeat === true) {
for (const [index, msg] of message.messages.entries()) {
await sleep(100)
if (msg.repeat === true) {
- Create a ticketCreate a ticket
Function sendMessage
has 176 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function sendMessage(p: Participant, message: Message, client: Client, walletAddress: string, repeat = false): Promise<void> {
if (repeat === true) {
for (const [index, msg] of message.messages.entries()) {
await sleep(100)
if (msg.repeat === true) {
- Create a ticketCreate a ticket
File xmppHandler.ts
has 459 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
replaceMessageListItemProps,
TActiveRoomFilter,
TMessageHistory,
TRoomRoles,
- Create a ticketCreate a ticket
Function main
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
const main = async () => {
const loginResponse = await login(USERNAME, PASSWORD)
if (!loginResponse) {
throw new Error('Bad creads for login')
- Create a ticketCreate a ticket
Function NewItemModal
has 174 lines of code (exceeds 25 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);
- Create a ticketCreate a ticket
Function main
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
const main = async () => {
const loginResponse = await login(USERNAME, PASSWORD);
if (!loginResponse) {
throw new Error("Bad creads for login");
- 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 169 lines of code (exceeds 25 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);
- Create a ticketCreate a ticket
Function router
has a Cognitive Complexity of 44 (exceeds 5 allowed). Consider refactoring. Open
const router = (xmpp, message, sender, receiver, requestType, receiverData, stanzaId) => {
if (requestType === 'x' && message.match(/\binvite\S*\b/g)) {
console.log('=> The bot was invited to the chat room ', receiver);
connectRoom(xmpp, sender, receiver);
}
- 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 NftListItem
has 166 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const NftListItem = (props: NftListItemProps) => {
const {
assetUrl,
assetsYouHave,
totalAssets,
- Create a ticketCreate a ticket
File MetaNavigation.tsx
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {useNavigation} from '@react-navigation/native';
import {HStack, Image} from 'native-base';
import React, {useEffect, useState} from 'react';
import {
ActivityIndicator,
- Create a ticketCreate a ticket
Function MembersList
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function MembersList() {
const { roomJID }: any = useParams();
const userChatRooms = useStoreState((store) => store.userChatRooms);
const membersList = useStoreState((store) =>
store.roomMemberInfo.filter((item) => item.name !== "none")
- Create a ticketCreate a ticket
Function DocumentShareAdd
has 157 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const DocumentShareAdd: React.FC<IDocumentShareAdd> = observer(({}) => {
const [memo, setMemo] = useState('');
const [expiration, setExpiration] = useState('-1');
const [documentId, setDocumentId] = useState('');
- Create a ticketCreate a ticket
File ChatDetailsScreen.tsx
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Actionsheet,
AlertDialog,
Button,
Text,
- Create a ticketCreate a ticket
Function messages
has 154 lines of code (exceeds 25 allowed). Consider refactoring. Open
const messages = () => {
return {
general: {
welcomeMessage: '',
youHaveQuestions: 'You have an unfinished in-take form to complete.',
- Create a ticketCreate a ticket
Function main
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
const main = async () => {
const loginResponse = await login(USERNAME, PASSWORD)
if (!loginResponse) {
throw new Error('Bad creads for login')
- 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 UploadDocument
has 150 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UploadDocument: React.FC<IUploadDocument> = ({}) => {
const [loading, setLoading] = useState(false);
const fileRef = useRef<HTMLInputElement>(null);
const { showSnackbar } = useSnackbar();
const [uploadedFile, setUploadedFile] = useState({
- Create a ticketCreate a ticket
File OtherUserProfileScreen.tsx
has 414 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 CreateApp
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CreateApp() {
const [loading, setLoading] = React.useState(false);
const fileRef = React.useRef<HTMLInputElement>(null);
const formik = useFormik({
- Create a ticketCreate a ticket