feat: create function to format wallet address
This commit is contained in:
parent
c839722782
commit
53e9b1ba2b
|
@ -33,3 +33,8 @@ export const getFormattedValidatorAddress = (address: string) => {
|
||||||
const end = address.slice(-6)
|
const end = address.slice(-6)
|
||||||
return `${start}...${end}`
|
return `${start}...${end}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const getFormattedWalletAddress = (address: string) => {
|
||||||
|
// 0xb9dasdfc35 -> 0xb9d...c35
|
||||||
|
return `${address.slice(0, 5)}...${address.slice(-3)}`
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue