Showing 120 of 177 total issues
Function bindGoToEvents
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const bindGoToEvents = (event, app) => {
const { accountId } = useAuth()
const { urlPrefix } = usePrefix()
let path = ''
- Read upRead up
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 useDropMinimumFunds
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useDropMinimumFunds = (amount = ref(1)) => {
const { drop } = useDrop()
const { urlPrefix } = usePrefix()
const { itemDeposit } = useDeposit(urlPrefix)
Function resolveMedia
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function resolveMedia(mimeType?: string): MediaType {
if (!mimeType) {
return MediaType.UNKNOWN
}
Function proccessData
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
const proccessData = (
collectionsList: CollectionEntity[],
collectionsSales: CollectionSales[],
) => {
return Promise.all(
Function useReadyItems
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useReadyItems = () => {
const { urlPrefix } = usePrefix()
const collections = ref<CollectionsReady['collectionEntities']>([])
const entities = reactive({})
Function execMakingOffer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function execMakingOffer(item: ActionOffer, api, executeTransaction) {
const { accountId } = useAuth()
const nfts = Array.isArray(item.token) ? item.token : [item.token]
const transactions = await Promise.all(
nfts.map(async ({ price, nftSn, collectionId, duration }) => {
Function useCarouselGenerativeNftEvents
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useCarouselGenerativeNftEvents = () => {
const nfts = ref<CarouselNFT[]>([])
const eventType = ['newestList', 'latestSales']
const dropsAhp = computedAsync(async () => {
return await getDrops({
Function getListForSellItems
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const getListForSellItems = (
createdNFTs: CreatedNFT[],
tokens: TokenToMint[],
blockNumber: string,
) => {
Function useTransak
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function useTransak() {
const config = useRuntimeConfig()
const { urlPrefix } = usePrefix()
const getChainConfig = (prefix: Prefix) => {
Function default
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export default function () {
const colorMode = useColorMode()
const { $i18n } = useNuxtApp()
const isDarkMode = computed<boolean>(() => colorMode.value === 'dark')
- Read upRead up
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 useMigrateDeposit
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function useMigrateDeposit(
prefix: ComputedRef<Prefix>,
itemCount: number,
account = '',
) {
- Read upRead up
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 useTransactionStatus
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function useTransactionStatus() {
const status = ref<TransactionStatus>(TransactionStatus.Unknown)
const isLoading = ref(false)
const resolveStatus = (
- Read upRead up
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 useCollectionForMint
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useCollectionForMint = () => {
const collections = ref<MintedCollection[]>()
const { accountId } = useAuth()
const { urlPrefix } = usePrefix()
Function constructNfts
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const constructNfts = async () => {
const events = (
data.value as {
events: { meta: string, nft: NFTWithMetadata, timestamp: string }[]
}
Function massGenerate
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
const massGenerate = async () => {
try {
clearMassMint()
if (isSub.value) {
await populateTokenIds()
Function useMakingOfferStore
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useMakingOfferStore = defineStore('makingOffer', () => {
const {
items,
chain,
count,
Function listForSell
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const listForSell = (mintedNFts: TokenToList[]) => {
const isLoading = ref(true)
const {
blockNumber,
transaction,
Function formatNFT
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const formatNFT = (nfts, chain?: string): CarouselNFT[] => {
if (!nfts) {
return []
}
const { urlPrefix } = usePrefix()
Function payRoyaltyAssetHub
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
async function payRoyaltyAssetHub(
legacy,
api,
price,
royalty,
Function getOdaToken
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getOdaToken = async () => {
const getMetadata = await fetchOdaToken(urlPrefix.value, collectionId, tokenId)
const metadata = getMetadata.metadata
if (!metadata) {