vega-frontend-monorepo/apps/token/src/lib/truncate-middle.ts
Art db08a177c4
fix(#806): dissasociation without vega wallet (#1075)
* fix: dissasociation without vega wallet (806)

* fix: removed unused import

* chore: removed redundant func prepend0xIfNeeded

* Update apps/token/src/routes/staking/disassociate/disassociate-page.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

* Update apps/token/src/routes/staking/disassociate/disassociate-page.tsx

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>

Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
2022-08-23 15:09:08 -07:00

9 lines
206 B
TypeScript

export function truncateMiddle(address: string) {
if (address.length < 11) return address;
return (
address.slice(0, 6) +
'\u2026' +
address.slice(address.length - 4, address.length)
);
}