Skip to content

Commit

Permalink
review(josheleonard): fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
onyb committed Jan 8, 2024
1 parent 524047c commit 77c66b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/util.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const sharp = require("sharp")
const fetch = require("node-fetch")
const { extension } = require("mime-types")
const { https } = require("follow-redirects")
const trustedCoingeckoIds = require('../data/solana/trusted-coingecko-ids.json')
const trustedCoingeckoIdsByChainId = require("../data/solana/trusted-coingecko-ids.json")

const contractReplaceSvgToPng = (file) => {
const data = JSON.parse(fs.readFileSync(file))
Expand Down Expand Up @@ -664,7 +664,7 @@ const generateCoingeckoIds = async () => {
return acc
}, {})

const coingeckoIds = coinList.reduce((acc, coin) => {
const coingeckoIdsByChainId = coinList.reduce((acc, coin) => {
Object.entries(coin.platforms).forEach(([platform, contractAddress]) => {
const chainId = assetPlatformsMap[platform]
if (!chainId || !contractAddress) {
Expand All @@ -687,7 +687,7 @@ const generateCoingeckoIds = async () => {
return Object.fromEntries(
Object.keys(coingeckoIds).map((chainId) => [
chainId,
{ ...coingeckoIds[chainId], ...trustedCoingeckoIds[chainId] }
{ ...coingeckoIds[chainId], ...trustedCoingeckoIdsByChainId[chainId] },
])
)
}
Expand Down

0 comments on commit 77c66b9

Please sign in to comment.