diff --git a/src/assets/chainsLogos/local.png b/src/assets/chainsLogos/local.png new file mode 100644 index 00000000..f901afdc Binary files /dev/null and b/src/assets/chainsLogos/local.png differ diff --git a/src/util/getConfigs.ts b/src/util/getConfigs.ts index 1b527e3d..86a2679c 100644 --- a/src/util/getConfigs.ts +++ b/src/util/getConfigs.ts @@ -23,7 +23,13 @@ export const getConfigs = async (apiPromise: ApiPromise): Promise => { const { ss58Format } = properties!; const systemChain = await apiPromise.rpc.system.chain(); const chainName = systemChain.split(' ')[0]; - const logoUrl = require(`../assets/chainsLogos/${chainName.toLowerCase()}.png`).default; + + let logoUrl; + try { + logoUrl = require(`../assets/chainsLogos/${chainName.toLowerCase()}.png`).default; + } catch (e) { + logoUrl = require('../assets/chainsLogos/local.png').default; + } return { chainName, ss58Format: parseInt(ss58Format.toString()), logoUrl }; };