Skip to content

Commit

Permalink
fix: starkfighter building not showing
Browse files Browse the repository at this point in the history
  • Loading branch information
irisdv committed Sep 13, 2023
1 parent d4d6653 commit 45f9d80
Showing 1 changed file with 20 additions and 13 deletions.
33 changes: 20 additions & 13 deletions components/lands/land.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,29 @@ export const Land = ({
let nftCounter = 0;

assets.forEach((asset: StarkscanNftProps) => {
if (asset.contract_address === process.env.NEXT_PUBLIC_QUEST_NFT_CONTRACT)
nftCounter++;
if (asset.minted_at_timestamp < sinceDate || sinceDate === 0)
sinceDate = asset.minted_at_timestamp;

if (asset.name && Object.values(SoloBuildings).includes(asset.name)) {
filteredAssets.push(
SoloBuildings[asset.name as keyof typeof SoloBuildings]
);
}
if (asset.name && Object.values(SoloBuildings).includes(asset.name)) {
filteredAssets.push(
StarkFighterBuildings[
asset.name as keyof typeof StarkFighterBuildings
]
);
if (
asset.contract_address === process.env.NEXT_PUBLIC_QUEST_NFT_CONTRACT
) {
nftCounter++;

if (asset.name && Object.values(SoloBuildings).includes(asset.name)) {
filteredAssets.push(
SoloBuildings[asset.name as keyof typeof SoloBuildings]
);
}
if (
asset.name &&
Object.values(StarkFighterBuildings).includes(asset.name)
) {
starkFighter.push(
StarkFighterBuildings[
asset.name as keyof typeof StarkFighterBuildings
]
);
}
}
});
// get starkfighter highest level
Expand Down

0 comments on commit 45f9d80

Please sign in to comment.