Skip to content

Commit 3cace37

Browse files
authored
Update explorer links to subscan (#481)
* chore: remove unused file * refactor: remove unused network context from ObjectUploadDetails and update external routes for block exploration
1 parent 64706fe commit 3cace37

File tree

3 files changed

+3
-118
lines changed

3 files changed

+3
-118
lines changed

apps/frontend/src/components/organisms/ObjectDetails/ObjectUploadDetails.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import {
77
import { getTypeFromMetadata } from '../../../utils/file';
88
import { formatNumberWithCommas } from '../../../utils/number';
99
import { EXTERNAL_ROUTES } from '@auto-drive/ui';
10-
import { useNetwork } from '../../../contexts/network';
1110
import bytes from 'bytes';
1211

1312
export const ObjectUploadDetails = ({
@@ -17,7 +16,6 @@ export const ObjectUploadDetails = ({
1716
object: ObjectInformation;
1817
isOwner: boolean;
1918
}) => {
20-
const { network } = useNetwork();
2119

2220
return (
2321
<div className='grid grid-cols-1 gap-6 md:grid-cols-2'>
@@ -88,7 +86,6 @@ export const ObjectUploadDetails = ({
8886
{object.uploadState.minimumBlockDepth ? (
8987
<a
9088
href={EXTERNAL_ROUTES.explorer.block(
91-
network.id,
9289
object.uploadState.minimumBlockDepth,
9390
)}
9491
target='_blank'
@@ -143,7 +140,6 @@ export const ObjectUploadDetails = ({
143140
{object.uploadState.minimumBlockDepth ? (
144141
<a
145142
href={EXTERNAL_ROUTES.explorer.block(
146-
network.id,
147143
object.uploadState.minimumBlockDepth,
148144
)}
149145
target='_blank'

apps/frontend/src/constants/faqs.tsx

Lines changed: 0 additions & 111 deletions
This file was deleted.

packages/ui/src/constants/routes.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ export const EXTERNAL_ROUTES = {
2424
subSocial: "https://app.subsocial.network/@NetworkSubspace",
2525
},
2626
explorer: {
27-
block: (networkId: NetworkId, blockDepth: number) =>
28-
`https://astral.autonomys.xyz/${networkId}/consensus/blocks/${blockDepth}`,
27+
block: (blockDepth: number) =>
28+
`https://autonomys.subscan.io/block/${blockDepth}`,
29+
mainpage: "https://autonomys.subscan.io/",
2930
},
3031
novaExplorer: "https://nova.subspace.network/",
3132
subscan: "https://autonomys.subscan.io/",
3233
spaceAcres:
3334
"https://api.github.com/repos/autonomys/space-acres/releases/latest",
34-
astral: "https://astral.autonomys.xyz/",
3535
farmerDocs: "https://docs.autonomys.xyz/category/farming",
3636
gatewayObjectDownload: (cid: string) =>
3737
`https://gateway.autonomys.xyz/file/${cid}`,

0 commit comments

Comments
 (0)