Showing 502 of 8,855 total issues
Function sendCoins
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const sendCoins = async (amount?: number) => {
const currentCoinAmount = amount ? Number(amount) : Number(coinAmount);
try {
const res = await transferCoin(
"DPT",
- Create a ticketCreate a ticket
Function renderDirections
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderDirections = (direction: string) => {
const oppositePreviousDirection = getOpositeDirection(previousDirection);
if (checkEmptyDirections() && direction === oppositePreviousDirection) {
return (
<CompassItem
- Create a ticketCreate a ticket
Function roomConfig
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const roomConfig = (
from: string,
to: string,
data: {roomName: string; roomDescription: string},
xmpp: any,
- Create a ticketCreate a ticket
Function TokensGraph
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function TokensGraph({}: Props) {
const theme = useTheme()
return (
<div className="dashboard-graph" style={{ marginRight: "10px" }}>
<a className="title" onClick={(e) => e.preventDefault()} href="/">
- Create a ticketCreate a ticket
Function roomConfig
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
roomConfig(to: string, data: { roomName: string; roomDescription?: string }) {
const message = xml(
"iq",
{
from: this.client.jid?.toString(),
- Create a ticketCreate a ticket
Function onEnd
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export async function onEnd(
p: Participant,
client: Client,
walletAddress: string
) {
- Create a ticketCreate a ticket
Function renderDirections
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const renderDirections = (direction: string) => {
const oppositePreviousDirection = getOpositeDirection(previousDirection);
if (checkEmptyDirections() && direction === oppositePreviousDirection) {
return (
<CompassItem
- Create a ticketCreate a ticket
Function loadTabContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const loadTabContent = () => {
if (activeTab === 0) {
return (
<ProfileTabs
activeAssetTab={activeAssetTab}
- Create a ticketCreate a ticket
Function onStopRecord
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const onStopRecord = async () => {
setRecording(false);
animateMediaButtonOut();
const result = await audioRecorderPlayer.stopRecorder();
- Create a ticketCreate a ticket
Function PrivacyAndDataScreen
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const PrivacyAndDataScreen = () => {
const [routeIndex, setRouteIndex] = useState(0);
const routes = [
{key: 'visibility', title: 'Visibility'},
- Create a ticketCreate a ticket
Function loadTabContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
const loadTabContent = () => {
if (activeTab === 0) {
return (
<ProfileTabs
activeAssetTab={activeAssetTab}
- Create a ticketCreate a ticket
Function ChangeUserDescriptionModal
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ChangeUserDescriptionModal = (props: ChangeUserDescriptionModalProps) => {
const {modalVisible, setModalVisible, currentDescription, changeDescription} =
props;
const [newDescription, setNewDescription] =
- Create a ticketCreate a ticket
Function sendMessage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const sendMessage = (messageString: any, isSystemMessage: boolean) => {
const messageText = messageString[0].text;
const tokenAmount = messageString[0].tokenAmount || 0;
const receiverMessageId = messageString[0].receiverMessageId || 0;
const manipulatedWalletAddress = underscoreManipulation(
- Create a ticketCreate a ticket
Function handleOnLongPress
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
const handleOnLongPress = (message: any) => {
let extraData = {};
if (
message.user._id.includes(
underscoreManipulation(loginStore.initialData.walletAddress),
- Create a ticketCreate a ticket
Function deployNfmt
has 10 arguments (exceeds 4 allowed). Consider refactoring. Open
type: string,
name: string,
symbol: string,
description: string,
owner: string,
- Create a ticketCreate a ticket
Function ChatAvatar
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function ChatAvatar({ roomJID, onDeleteRoomClick }: IRoomAvatar) {
const currentRoomData = useStoreState((store) => store.userChatRooms).find(
(e) => e?.jid === roomJID
);
const updateUserChatRoom = useStoreState((state) => state.updateUserChatRoom);
- 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 RegularLoginScreen
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const RegularLoginScreen = ({navigation}: ScreenProps) => {
const [userName, setUserName] = useState('');
const [password, setPassword] = useState('');
const [isLoading, setisLoading] = useState(false);
const {loginStore} = useStores();
- 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 RoomDetailsCard
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const RoomDetailsCard = (props: RoomDetailsCardProps) => {
//component props
const {
onImagePress,
room,
- 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 RoomsTabBar
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const RoomsTabBar = observer(() => {
const {chatStore} = useStores();
const privateRooms = chatStore.roomList?.filter((item: any) => {
const splitedJid = item?.jid?.split('@')[0];
- 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 LoginScreen
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const LoginScreen = observer(({navigation}: LoginScreenProps) => {
const {loginStore, apiStore} = useStores();
const {isFetching} = loginStore;
const connector = useWalletConnect();
const [externalWalletModalData, setExternalWalletModalData] = useState({
- 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"