feat: create function to format wallet address

This commit is contained in:
RadoslavDimchev 2023-09-22 17:33:14 +03:00
parent c839722782
commit 53e9b1ba2b
1 changed files with 5 additions and 0 deletions

View File

@ -33,3 +33,8 @@ export const getFormattedValidatorAddress = (address: string) => {
const end = address.slice(-6)
return `${start}...${end}`
}
export const getFormattedWalletAddress = (address: string) => {
// 0xb9dasdfc35 -> 0xb9d...c35
return `${address.slice(0, 5)}...${address.slice(-3)}`
}