@merkl/api 0.18.8 → 0.18.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -261,13 +261,13 @@ export class TokenService {
261
261
  const icon = properties.Icon.files?.[0]?.file.url;
262
262
  const iconFile = await fetch(icon);
263
263
  const mimeType = iconFile.headers.get("content-type");
264
- const extension = mimeType.split("/")[1];
264
+ const extension = mimeType.split("/")[1].split("+")[0];
265
265
  const address = throwOnInvalidRequiredAddress(properties.Address.rich_text[0].plain_text);
266
266
  const chainId = properties["Chain ID"].number;
267
267
  throwOnUnsupportedChainId(chainId);
268
268
  const displaySymbol = properties.Symbol.rich_text[0]?.plain_text;
269
269
  const isVerified = properties.Verified.checkbox;
270
- const coingeckoApiId = properties["CoinGecko API ID"].rich_text[0].plain_text;
270
+ const coingeckoApiId = properties["CoinGecko API ID"].rich_text[0]?.plain_text;
271
271
  const byteArray = await iconFile.bytes();
272
272
  const [token] = await TokenService.findManyOrCreate([
273
273
  {