Skip to content

Improve assets load flow #59

@dchernokur

Description

@dchernokur

Problem

Sometimes when only even one of the JSON/IMG files is not available on the IPFS url (or not yet propagated after just being uploaded), the whole buildings catalogue is not loading.

ipfsService.ts:75 
            
            
           GET https://ipfs.io/ipfs/bafkreiapahuf2xjriguqmj6ehr3axye73vesauautdtbh4g2kgxpkfxlpa net::ERR_FAILED 504 (Gateway Timeout)
fetchJsonFromIpfs @ ipfsService.ts:75
eval @ useBuildings.ts:74
fetchBuildingNFTsMetadata @ useBuildings.ts:74
await in fetchBuildingNFTsMetadata
fetchBuildingNFTs @ useBuildings.ts:96
useBuildings.useEffect @ useBuildings.ts:114

14:56:40.397 ipfsService.ts:75 
                    
       Uncaught (in promise) TypeError: Failed to fetch
    at fetchJsonFromIpfs (ipfsService.ts:75:20)
    at eval (useBuildings.ts:74:44)
    at Array.map (<anonymous>)
    at fetchBuildingNFTsMetadata (useBuildings.ts:74:14)
    at async fetchBuildingNFTs (useBuildings.ts:96:68)

Solution

We need more robust and independent way of loading assets, so that one item not loading would not affect all others.

Alternatives

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions