Skip to content

Commit

Permalink
Only upload logoURIs to IPFS if logoURI exists
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDaedalus committed Jul 2, 2022
1 parent fc3c73d commit 43224d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions utils/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ glob("chains/*.json", {}, async function (er, files) {
if(process.env.FLEEK_STORAGE_API_KEY && process.env.FLEEK_STORAGE_API_SECRET) {
process.stdout.write("Uploading token logos to IPFS...\n")
tokens = await Promise.all(tokens.map(async (token) => {
if (!token.logoURI) {
return token
}
const localTokenPath = path.resolve(__dirname, "../chains", token["logoURI"])
const uploadRequest = {
apiKey: process.env.FLEEK_STORAGE_API_KEY,
Expand Down

0 comments on commit 43224d9

Please sign in to comment.