ghost-portal/packages/ui-app/src/util/toShortAddress.ts
2018-08-08 11:15:33 +02:00

8 lines
313 B
TypeScript

// Copyright 2017-2018 @polkadot/ui-app authors & contributors
// This software may be modified and distributed under the terms
// of the ISC license. See the LICENSE file for details.
export default function toShortAddress (address: string): string {
return `${address.slice(0, 7)}…${address.slice(-7)}`;
}