From 28fd700607bf940ef1f3dc48daeea7142573cfbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?nicole=20miko=C5=82ajczyk?= Date: Sun, 8 Jun 2025 21:07:52 +0200 Subject: [PATCH] pl-fe: remove links to block explorers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: nicole mikołajczyk --- .../components/crypto-address.tsx | 8 ------ .../components/detailed-crypto-address.tsx | 8 ------ .../crypto-donate/utils/block-explorer.ts | 11 -------- .../crypto-donate/utils/block-explorers.json | 26 ------------------- 4 files changed, 53 deletions(-) delete mode 100644 packages/pl-fe/src/features/crypto-donate/utils/block-explorer.ts delete mode 100644 packages/pl-fe/src/features/crypto-donate/utils/block-explorers.json diff --git a/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx b/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx index e78fe8d0b..1f20796be 100644 --- a/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx +++ b/packages/pl-fe/src/features/crypto-donate/components/crypto-address.tsx @@ -8,7 +8,6 @@ import Text from 'pl-fe/components/ui/text'; import { CryptoIcon } from 'pl-fe/features/ui/util/async-components'; import { useModalsStore } from 'pl-fe/stores/modals'; -import { getExplorerUrl } from '../utils/block-explorer'; import { getTitle } from '../utils/coin-db'; interface ICryptoAddress { @@ -28,7 +27,6 @@ const CryptoAddress: React.FC = (props): JSX.Element => { }; const title = getTitle(ticker); - const explorerUrl = getExplorerUrl(ticker, address); return ( @@ -45,12 +43,6 @@ const CryptoAddress: React.FC = (props): JSX.Element => { - - {explorerUrl && ( - - - - )} diff --git a/packages/pl-fe/src/features/crypto-donate/components/detailed-crypto-address.tsx b/packages/pl-fe/src/features/crypto-donate/components/detailed-crypto-address.tsx index 1820ef82c..0c339b873 100644 --- a/packages/pl-fe/src/features/crypto-donate/components/detailed-crypto-address.tsx +++ b/packages/pl-fe/src/features/crypto-donate/components/detailed-crypto-address.tsx @@ -2,10 +2,8 @@ import { QRCodeCanvas as QRCode } from 'qrcode.react'; import React from 'react'; import CopyableInput from 'pl-fe/components/copyable-input'; -import Icon from 'pl-fe/components/icon'; import { CryptoIcon } from 'pl-fe/features/ui/util/async-components'; -import { getExplorerUrl } from '../utils/block-explorer'; import { getTitle } from '../utils/coin-db'; interface IDetailedCryptoAddress { @@ -16,7 +14,6 @@ interface IDetailedCryptoAddress { const DetailedCryptoAddress: React.FC = ({ address, ticker, note }): JSX.Element => { const title = getTitle(ticker); - const explorerUrl = getExplorerUrl(ticker, address); return (
@@ -28,11 +25,6 @@ const DetailedCryptoAddress: React.FC = ({ address, tick title={title} />
{title || ticker.toUpperCase()}
-
- {explorerUrl && - - } -
{note &&
{note}
}
diff --git a/packages/pl-fe/src/features/crypto-donate/utils/block-explorer.ts b/packages/pl-fe/src/features/crypto-donate/utils/block-explorer.ts deleted file mode 100644 index 5cfba45b6..000000000 --- a/packages/pl-fe/src/features/crypto-donate/utils/block-explorer.ts +++ /dev/null @@ -1,11 +0,0 @@ -import blockExplorers from './block-explorers.json'; - -type BlockExplorers = Record; - -const getExplorerUrl = (ticker: string, address: string): string | null => { - const template = (blockExplorers as BlockExplorers)[ticker]; - if (!template) return null; - return template.replace('{address}', address); -}; - -export { getExplorerUrl }; diff --git a/packages/pl-fe/src/features/crypto-donate/utils/block-explorers.json b/packages/pl-fe/src/features/crypto-donate/utils/block-explorers.json deleted file mode 100644 index 814b83634..000000000 --- a/packages/pl-fe/src/features/crypto-donate/utils/block-explorers.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "aave": "https://etherscan.io/address/{address}", - "bat": "https://etherscan.io/address/{address}", - "bch": "https://explorer.bitcoin.com/bch/address/{address}", - "btc": "https://explorer.bitcoin.com/btc/address/{address}", - "btg": "https://btgexplorer.com/address/{address}", - "comp": "https://etherscan.io/address/{address}", - "dash": "https://dashblockexplorer.com/address/{address}", - "dgb": "https://digiexplorer.info/address/{address}", - "doge": "https://dogechain.info/address/{address}", - "etc": "https://etcblockexplorer.com/address/{address}", - "eth": "https://etherscan.io/address/{address}", - "grans": "https://ubiqscan.io/address/{address}", - "link": "https://etherscan.io/address/{address}", - "ltc": "https://litecoinblockexplorer.net/address/{address}", - "mkr": "https://etherscan.io/address/{address}", - "oxt": "https://etherscan.io/address/{address}", - "sushi": "https://etherscan.io/address/{address}", - "ubq": "https://ubiqscan.io/address/{address}", - "uni": "https://etherscan.io/address/{address}", - "usdc": "https://etherscan.io/address/{address}", - "vtc": "https://vtcblocks.com/address/{address}", - "xmr": "https://monerohash.com/explorer/search?value={address}", - "xrp": "https://xrpscan.com/account/{address}", - "zec": "https://zecblockexplorer.com/address/{address}" -}