// Copyright 2017-2023 @polkadot/react-components authors & contributors // SPDX-License-Identifier: Apache-2.0 import type { KeyringJson$Meta } from '@polkadot/ui-keyring/types'; import React from 'react'; import AddressMini from '../AddressMini.js'; import { useTranslation } from '../translate.js'; interface Props { isMultisig: boolean; meta?: KeyringJson$Meta; } function Multisig ({ isMultisig, meta }: Props): React.ReactElement | null { const { t } = useTranslation(); if (!isMultisig || !meta) { return null; } const { threshold, who } = meta; return (
{t('multisig')}
{t('threshold')}
{threshold as string}/{(who as string[]).length}
{t('signatories')}
{(who as string[])?.map((address) => ( ))}
); } export default React.memo(Multisig);