Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/export-project-images' into…
Browse files Browse the repository at this point in the history
… merge/export-images
  • Loading branch information
yuetloo committed Jul 8, 2024
2 parents a051fae + cb13f11 commit fc6b8fa
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions contracts/tasks/runners/exportImages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ task('export-images', 'Export project logo images')
const round = JSON.parse(data)
const projects = round.projects
const images = projects.map((project: any) => {
const { bannerImageHash, thumbnailImageHash } = project.metadata
return { bannerImageHash, thumbnailImageHash }
const { bannerImageHash, thumbnailImageHash, imageHash } =
project.metadata
return { bannerImageHash, thumbnailImageHash, imageHash }
})

for (let i = 0; i < images.length; i++) {
Expand All @@ -70,5 +71,10 @@ task('export-images', 'Export project logo images')
ipfsHash: images[i].thumbnailImageHash,
outputDir,
})
await download({
gateway,
ipfsHash: images[i].imageHash,
outputDir,
})
}
})

0 comments on commit fc6b8fa

Please sign in to comment.