File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
app/[locale]/10years/_components Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import Curved10YearsText from "./10y.svg"
19
19
20
20
import {
21
21
formatAddress ,
22
+ getAddressEtherscanUrl ,
22
23
getBlockieImage ,
23
24
type TorchHolderMetadata ,
24
25
} from "@/lib/torch"
@@ -88,7 +89,7 @@ const CurrentTorchHolderCard = ({
88
89
{ /* Verify onchain link */ }
89
90
< BaseLink
90
91
className = "mt-2 text-xs"
91
- href = { `https://sepolia.etherscan.io/address/ ${ currentHolder . address } ` }
92
+ href = { getAddressEtherscanUrl ( currentHolder . address ) }
92
93
>
93
94
View on Etherscan
94
95
</ BaseLink >
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import { Tag } from "@/components/ui/tag"
11
11
12
12
import { cn } from "@/lib/utils/cn"
13
13
14
- import { formatDate , getEtherscanUrl } from "@/lib/torch"
14
+ import { formatDate , getTxEtherscanUrl } from "@/lib/torch"
15
15
16
16
interface TorchHistoryCardProps {
17
17
name : string
@@ -76,7 +76,7 @@ const TorchHistoryCard: React.FC<TorchHistoryCardProps> = ({
76
76
From { formatDate ( from ) } to { formatDate ( to ) }
77
77
</ div >
78
78
< BaseLink
79
- href = { getEtherscanUrl ( transactionHash ) }
79
+ href = { getTxEtherscanUrl ( transactionHash ) }
80
80
className = "text-xs"
81
81
>
82
82
View on Etherscan
Original file line number Diff line number Diff line change @@ -205,6 +205,10 @@ export const formatDate = (timestamp: number) => {
205
205
return `${ month } ${ day } , ${ time } `
206
206
}
207
207
208
- export const getEtherscanUrl = ( txHash : string ) => {
208
+ export const getTxEtherscanUrl = ( txHash : string ) => {
209
209
return `https://etherscan.io/tx/${ txHash } `
210
210
}
211
+
212
+ export const getAddressEtherscanUrl = ( address : string ) => {
213
+ return `https://etherscan.io/address/${ address } `
214
+ }
You can’t perform that action at this time.
0 commit comments