From bb6d2227bb91cc46a7934fd5c3d9c228f6c2dd34 Mon Sep 17 00:00:00 2001 From: Akshit Choudhary Date: Fri, 2 Jul 2021 20:06:38 +0530 Subject: [PATCH] fixed explorer URLs --- src/components/TxnList/index.js | 2 +- src/components/Warning/index.js | 4 ++-- src/pages/AccountPage.js | 4 ++-- src/pages/PairPage.js | 2 +- src/pages/TokenPage.js | 4 ++-- src/utils/index.js | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/TxnList/index.js b/src/components/TxnList/index.js index ea9c242..d710fad 100644 --- a/src/components/TxnList/index.js +++ b/src/components/TxnList/index.js @@ -304,7 +304,7 @@ function TxnList({ transactions, symbol0Override, symbol1Override, color }) { )} {!below1080 && ( - + {item.account && item.account.slice(0, 6) + '...' + item.account.slice(38, 42)} diff --git a/src/components/Warning/index.js b/src/components/Warning/index.js index 4318d2e..e914394 100644 --- a/src/components/Warning/index.js +++ b/src/components/Warning/index.js @@ -72,7 +72,7 @@ export default function Warning({ type, show, setShow, address }) { fontWeight={500} lineHeight={'145.23%'} color={'#2172E5'} - href={'https://explorer-mainnet.maticvigil.com/address/' + address} + href={'https://polygonscan.com/address/' + address} target="_blank" > View {type === 'token' ? 'token' : 'pair'} contract on Explorer @@ -92,7 +92,7 @@ export default function Warning({ type, show, setShow, address }) { fontWeight={500} lineHeight={'145.23%'} color={'#2172E5'} - href={'https://explorer-mainnet.maticvigil.com/address/' + address} + href={'https://polygonscan.com/address/' + address} target="_blank" > View {type === 'token' ? 'token' : 'pair'} contract on Explorer diff --git a/src/pages/AccountPage.js b/src/pages/AccountPage.js index e093530..dd5ab12 100644 --- a/src/pages/AccountPage.js +++ b/src/pages/AccountPage.js @@ -158,7 +158,7 @@ function AccountPage({ account }) { {'Accounts '}→{' '} - + {' '} {account?.slice(0, 42)}{' '} @@ -169,7 +169,7 @@ function AccountPage({ account }) { {account?.slice(0, 6) + '...' + account?.slice(38, 42)} - + View on Explorer diff --git a/src/pages/PairPage.js b/src/pages/PairPage.js index a4006f8..247c963 100644 --- a/src/pages/PairPage.js +++ b/src/pages/PairPage.js @@ -475,7 +475,7 @@ function PairPage({ pairAddress, history }) { - + View on Explorer ↗ diff --git a/src/pages/TokenPage.js b/src/pages/TokenPage.js index 8eb547b..dd94891 100644 --- a/src/pages/TokenPage.js +++ b/src/pages/TokenPage.js @@ -187,7 +187,7 @@ function TokenPage({ address, history }) { style={{ width: 'fit-content' }} color={backgroundColor} external - href={'https://explorer-mainnet.maticvigil.com/address/' + address} + href={'https://polygonscan.com/address/' + address} > ({address.slice(0, 8) + '...' + address.slice(36, 42)}) @@ -383,7 +383,7 @@ function TokenPage({ address, history }) { - + View on Explorer ↗ diff --git a/src/utils/index.js b/src/utils/index.js index 04f2ce0..30e6ac0 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -296,10 +296,10 @@ export const setThemeColor = (theme) => document.documentElement.style.setProper export const Big = (number) => new BigNumber(number) export const urls = { - showTransaction: (tx) => `https://explorer-mainnet.maticvigil.com/tx/${tx}/`, - showAddress: (address) => `https://explorer-mainnet.maticvigil.com/address/${address}/`, - showToken: (address) => `https://explorer-mainnet.maticvigil.com/tokens/${address}/`, - showBlock: (block) => `https://explorer-mainnet.maticvigil.com/blocks/${block}/`, + showTransaction: (tx) => `https://polygonscan.com/tx/${tx}/`, + showAddress: (address) => `https://polygonscan.com/address/${address}/`, + showToken: (address) => `https://polygonscan.com/token/${address}/`, + showBlock: (block) => `https://polygonscan.com/block/${block}/`, } export const formatTime = (unix) => {