-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(PGIO-119): Create function to return explorer link (#150)
* chore: create a utils fn to get the explorer URL, clean unneeded old fns
- Loading branch information
1 parent
46ba7d0
commit 3d8b5c9
Showing
5 changed files
with
20 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
import { GNOSIS_SCAN_URL } from '@/constants'; | ||
|
||
export const getExplorerAddressUrl = (address: string) => { | ||
return `${GNOSIS_SCAN_URL}/address/${address}`; | ||
}; | ||
|
||
export const getExplorerTxUrl = (txHash: string) => { | ||
return `${GNOSIS_SCAN_URL}/tx/${txHash}`; | ||
}; | ||
|
||
export const shortenAddress = (address: string) => | ||
`${address.slice(0, 6)}...${address.slice(-4)}`; | ||
|
||
export const getGnosisAddressExplorerLink = (address: string) => | ||
`${GNOSIS_SCAN_URL}/address/${address}`; |