From cff383447aaf0a9898e9406652c17b3ddf7cfd3f Mon Sep 17 00:00:00 2001 From: unclebill Date: Fri, 8 Jul 2022 22:58:36 +0800 Subject: [PATCH] fix: link link on by coingecko is incorrect --- .../web3-providers/src/coingecko/index.ts | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/web3-providers/src/coingecko/index.ts b/packages/web3-providers/src/coingecko/index.ts index cc99f155024c..c88a29637929 100644 --- a/packages/web3-providers/src/coingecko/index.ts +++ b/packages/web3-providers/src/coingecko/index.ts @@ -2,7 +2,7 @@ import { DataProvider } from '@masknet/public-api' import { CurrencyType, Price } from '@masknet/web3-shared-base' import type { ChainId } from '@masknet/web3-shared-evm' import urlcat from 'urlcat' -import { uniq } from 'lodash-unified' +import { uniq, uniqBy } from 'lodash-unified' import { getCommunityLink, isMirroredKeyword, resolveChainId, resolveCoinAddress } from '../CoinMarketCap/helper' import { fetchJSON } from '../helpers' import { PriceAPI, TrendingAPI, TrendingCoinType } from '../types' @@ -57,7 +57,7 @@ export class CoinGeckoAPI implements PriceAPI.Provider, TrendingAPI.Provider x.toLowerCase(), + ), ), source_code_urls: Object.values(info.links.repos_url).flatMap((x) => x), home_urls: info.links.homepage.filter(Boolean),