chore(utils): fix truncate address
This commit is contained in:
parent
1757398b36
commit
be3d3d38c7
|
@ -1,6 +1,4 @@
|
|||
// @flow
|
||||
|
||||
export const truncateAddress = (address: string = '') => `${address.substr(0, 20)}...${address.substr(
|
||||
address.length - 10,
|
||||
address.length,
|
||||
)}`;
|
||||
export const truncateAddress = (address: string = '') => (address.length < 20
|
||||
? address
|
||||
: `${address.substr(0, 20)}...${address.substr(address.length - 10, address.length)}`);
|
||||
|
|
Loading…
Reference in New Issue