mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-29 19:06:08 +00:00
Added as shorten utily method to eth address logic files
This commit is contained in:
parent
19bcc7db7c
commit
13b28dc51f
@ -10,3 +10,10 @@ export const sameAddress = (firstAddress: string, secondAddress: string): boolea
|
||||
|
||||
return firstAddress.toLowerCase() === secondAddress.toLowerCase()
|
||||
}
|
||||
|
||||
export const shortVersionOf = (address: string, cut: number) => {
|
||||
const initial = cut
|
||||
const final = 42 - cut
|
||||
|
||||
return `${address.substring(0, initial)}...${address.substring(final)}`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user