From 33831d117d16edc28220aba168fed3fec420084c Mon Sep 17 00:00:00 2001 From: Nouman Mahmood Date: Sun, 25 Aug 2024 09:32:55 +0300 Subject: [PATCH] Update currency units to use SDA instead of ETH --- lib/units.ts | 2 +- stubs/stats.ts | 6 +-- ui/snippets/footer/Footer.tsx | 81 +---------------------------------- 3 files changed, 6 insertions(+), 83 deletions(-) diff --git a/lib/units.ts b/lib/units.ts index 546e4308ee..2a136ca784 100644 --- a/lib/units.ts +++ b/lib/units.ts @@ -7,5 +7,5 @@ const weiName = config.chain.currency.weiName || 'wei'; export const currencyUnits: Record = { wei: weiName, gwei: `G${ weiName }`, - ether: config.chain.currency.symbol || 'ETH', + ether: config.chain.currency.symbol || 'SDA', }; diff --git a/stubs/stats.ts b/stubs/stats.ts index e1e70724fb..de1d082d0e 100644 --- a/stubs/stats.ts +++ b/stubs/stats.ts @@ -49,14 +49,14 @@ export const STATS_CHARTS_SECTION: stats.LineChartSection = { { id: 'chart_0', title: 'Average transaction fee', - description: 'The average amount in ETH spent per transaction', - units: 'ETH', + description: 'The average amount in SDA spent per transaction', + units: 'SDA', }, { id: 'chart_1', title: 'Transactions fees', description: 'Amount of tokens paid as fees', - units: 'ETH', + units: 'SDA', }, { id: 'chart_2', diff --git a/ui/snippets/footer/Footer.tsx b/ui/snippets/footer/Footer.tsx index c23905c9e7..c988f6177b 100644 --- a/ui/snippets/footer/Footer.tsx +++ b/ui/snippets/footer/Footer.tsx @@ -7,90 +7,28 @@ import type { CustomLinksGroup } from 'types/footerLinks'; import config from 'configs/app'; import type { ResourceError } from 'lib/api/resources'; -import useApiQuery from 'lib/api/useApiQuery'; import useFetch from 'lib/hooks/useFetch'; -import useIssueUrl from 'lib/hooks/useIssueUrl'; -import { copy } from 'lib/html-entities'; import IconSvg from 'ui/shared/IconSvg'; import NetworkAddToWallet from 'ui/shared/NetworkAddToWallet'; import FooterLinkItem from './FooterLinkItem'; import IntTxsIndexingStatus from './IntTxsIndexingStatus'; -import getApiVersionUrl from './utils/getApiVersionUrl'; const MAX_LINKS_COLUMNS = 4; -const FRONT_VERSION_URL = `https://github.com/blockscout/frontend/tree/${ config.UI.footer.frontendVersion }`; -const FRONT_COMMIT_URL = `https://github.com/blockscout/frontend/commit/${ config.UI.footer.frontendCommit }`; - const Footer = () => { - const { data: backendVersionData } = useApiQuery('config_backend_version', { - queryOptions: { - staleTime: Infinity, - }, - }); - const apiVersionUrl = getApiVersionUrl(backendVersionData?.backend_version); - const issueUrl = useIssueUrl(backendVersionData?.backend_version); const logoColor = useColorModeValue('blue.600', 'white'); const BLOCKSCOUT_LINKS = [ - { - icon: 'edit' as const, - iconSize: '16px', - text: 'Submit an issue', - url: issueUrl, - }, - { - icon: 'social/canny' as const, - iconSize: '20px', - text: 'Feature request', - url: 'https://blockscout.canny.io/feature-requests', - }, { icon: 'social/git' as const, iconSize: '18px', text: 'Contribute', - url: 'https://github.com/blockscout/blockscout', - }, - { - icon: 'social/twitter' as const, - iconSize: '18px', - text: 'X (ex-Twitter)', - url: 'https://www.twitter.com/blockscoutcom', - }, - { - icon: 'social/discord' as const, - iconSize: '24px', - text: 'Discord', - url: 'https://discord.gg/blockscout', - }, - { - icon: 'brands/blockscout' as const, - iconSize: '18px', - text: 'All chains', - url: 'https://www.blockscout.com/chains-and-projects', - }, - { - icon: 'donate' as const, - iconSize: '20px', - text: 'Donate', - url: 'https://github.com/sponsors/blockscout', + url: 'https://github.com/SidraChain/blockscout-frontend', }, ]; - const frontendLink = (() => { - if (config.UI.footer.frontendVersion) { - return { config.UI.footer.frontendVersion }; - } - - if (config.UI.footer.frontendCommit) { - return { config.UI.footer.frontendCommit }; - } - - return null; - })(); - const fetch = useFetch(); const { isPlaceholderData, data: linksData } = useQuery, Array>({ @@ -135,24 +73,9 @@ const Footer = () => { Blockscout is a tool for inspecting and analyzing EVM based blockchains. Blockchain explorer for Ethereum Networks. - - { apiVersionUrl && ( - - Backend: { backendVersionData?.backend_version } - - ) } - { frontendLink && ( - - Frontend: { frontendLink } - - ) } - - Copyright { copy } Blockscout Limited 2023-{ (new Date()).getFullYear() } - - ); - }, [ apiVersionUrl, backendVersionData?.backend_version, frontendLink, logoColor ]); + }, [ logoColor ]); const containerProps: GridProps = { as: 'footer',