Skip to content

Commit

Permalink
Refactor to parse URL and replace hostname (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
muliswilliam authored Aug 13, 2024
1 parent 01ef05c commit fc55086
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/util.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ const generateDappListsForChain = async (chain) => {
// Remove socialLinks and fullDescription from each dApp object
dapps.results = dapps.results.map((dapp) => {
const { socialLinks, fullDescription, logo, ...filteredDapp } = dapp
filteredDapp.logo = logo.replace('dashboard-assets.dappradar.com', 'dashboard-assets-dappradar.wallet.brave.com')
const logoUrl = new URL(logo)
logoUrl.hostname = 'dashboard-assets-dappradar.wallet.brave.com'
filteredDapp.logo = logoUrl.toString()
return filteredDapp
})

Expand Down

0 comments on commit fc55086

Please sign in to comment.