From 43224d94cd8e299b68d8bb525f9de038f40717bb Mon Sep 17 00:00:00 2001 From: Daedalus <0xDaedalus@users.noreply.github.com> Date: Sat, 2 Jul 2022 14:02:20 -0600 Subject: [PATCH] Only upload logoURIs to IPFS if logoURI exists --- utils/build.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/build.ts b/utils/build.ts index bfddefd..989d79d 100644 --- a/utils/build.ts +++ b/utils/build.ts @@ -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,