summaryrefslogtreecommitdiffhomepage
path: root/gui/src/renderer/components/AccountTokenLabel.tsx
blob: 479beed9a1559b26c119073b9b5b5366abb5d448 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { formatAccountToken } from '../lib/account';
import ClipboardLabel from './ClipboardLabel';

interface IAccountTokenLabelProps {
  accountToken: string;
  obscureValue?: boolean;
  className?: string;
}

export default function AccountTokenLabel(props: IAccountTokenLabelProps) {
  return (
    <ClipboardLabel
      value={props.accountToken}
      displayValue={formatAccountToken(props.accountToken)}
      obscureValue={props.obscureValue}
      className={props.className}
      data-testid="account-number"
    />
  );
}