diff --git a/src/logic/wallets/ethAddresses.js b/src/logic/wallets/ethAddresses.js index a84ebf46..df1ec918 100644 --- a/src/logic/wallets/ethAddresses.js +++ b/src/logic/wallets/ethAddresses.js @@ -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)}` +}