Resolved card loading issue on MAM Board.
This commit is contained in:
parent
5630f80a54
commit
b2dde1ea56
@ -209,18 +209,26 @@ const loadMinterBoardPage = async () => {
|
||||
await loadCards(minterCardIdentifierPrefix)
|
||||
})
|
||||
}
|
||||
// Initialize Cached Minter Group and Minter Admins
|
||||
const [minterGroup, minterAdmins] = await Promise.all([
|
||||
fetchMinterGroupMembers(),
|
||||
fetchMinterGroupAdmins()
|
||||
])
|
||||
cachedMinterAdmins = minterAdmins
|
||||
cachedMinterGroup = minterGroup
|
||||
//Initialize Minter Group and Admin Group
|
||||
await initializeCachedGroups()
|
||||
|
||||
await featureTriggerCheck()
|
||||
await loadCards(minterCardIdentifierPrefix)
|
||||
}
|
||||
|
||||
const initializeCachedGroups = async () => {
|
||||
try {
|
||||
const [minterGroup, minterAdmins] = await Promise.all([
|
||||
fetchMinterGroupMembers(),
|
||||
fetchMinterGroupAdmins()
|
||||
])
|
||||
cachedMinterGroup = minterGroup
|
||||
cachedMinterAdmins = minterAdmins
|
||||
} catch (error) {
|
||||
console.error("Error initializing cached groups:", error)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const runWithConcurrency = async (tasks, concurrency = 5) => {
|
||||
const results = []
|
||||
@ -453,6 +461,9 @@ const processARBoardCards = async (allValidCards) => {
|
||||
|
||||
//Main function to load the Minter Cards ----------------------------------------
|
||||
const loadCards = async (cardIdentifierPrefix) => {
|
||||
if ((!cachedMinterGroup || cachedMinterGroup.length === 0) || (!cachedMinterAdmins || cachedMinterAdmins.length === 0)) {
|
||||
await initializeCachedGroups()
|
||||
}
|
||||
const cardsContainer = document.getElementById("cards-container")
|
||||
cardsContainer.innerHTML = "<p>Loading cards...</p>"
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
const Q_MINTERSHIP_VERSION = "1.06.6"
|
||||
const Q_MINTERSHIP_VERSION = "1.21"
|
||||
|
||||
const messageIdentifierPrefix = `mintership-forum-message`
|
||||
const messageAttachmentIdentifierPrefix = `mintership-forum-attachment`
|
||||
|
Loading…
x
Reference in New Issue
Block a user