import React from "react"; import { isSecp256k1Pubkey, pubkeyToAddress, SinglePubkey } from "@cosmjs/amino"; import HashView from "./HashView"; import StackableContainer from "../layout/StackableContainer"; interface Props { /** Pubkeys of the multisig members */ members: readonly SinglePubkey[]; addressPrefix: string; threshold: string; } const MultisigMembers = (props: Props) => (

Threshold

{props.threshold}

Members

    {props.members.map((pubkey) => { const address = pubkeyToAddress(pubkey, props.addressPrefix); // simplePubkey is base64 encoded compressed secp256k1 in almost every case. The fallback is added to be safe though. const simplePubkey = isSecp256k1Pubkey(pubkey) ? pubkey.value : `${pubkey.type} pubkey`; return (
  • ); })}
); export default MultisigMembers;