From 29230a7834b3290b8b3e0b82d5c7476ab9cb5271 Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Fri, 26 May 2023 10:22:58 +0200 Subject: [PATCH 1/7] Use h3 for msgs --- .../dataViews/TransactionInfo/TxMsgClaimRewardsDetails.tsx | 4 ++-- components/dataViews/TransactionInfo/TxMsgDelegateDetails.tsx | 4 ++-- .../dataViews/TransactionInfo/TxMsgRedelegateDetails.tsx | 4 ++-- components/dataViews/TransactionInfo/TxMsgSendDetails.tsx | 4 ++-- .../TransactionInfo/TxMsgSetWithdrawAddressDetails.tsx | 4 ++-- .../dataViews/TransactionInfo/TxMsgUndelegateDetails.tsx | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/dataViews/TransactionInfo/TxMsgClaimRewardsDetails.tsx b/components/dataViews/TransactionInfo/TxMsgClaimRewardsDetails.tsx index 85357e3..9ecdd65 100644 --- a/components/dataViews/TransactionInfo/TxMsgClaimRewardsDetails.tsx +++ b/components/dataViews/TransactionInfo/TxMsgClaimRewardsDetails.tsx @@ -8,7 +8,7 @@ interface TxMsgClaimRewardsDetailsProps { const TxMsgClaimRewardsDetails = ({ msg }: TxMsgClaimRewardsDetailsProps) => ( <>
  • -

    MsgWithdrawDelegatorReward

    +

    MsgWithdrawDelegatorReward

  • @@ -17,7 +17,7 @@ const TxMsgClaimRewardsDetails = ({ msg }: TxMsgClaimRewardsDetailsProps) => (
  • - -); +const ThresholdInfo = ({ signatures, pubkey }: Props) => { + const [urlToCopy, setUrlToCopy] = useState(""); + + useEffect(() => { + const urlWithoutQuery = window.location.href.split("?")[0]; + setUrlToCopy(urlWithoutQuery); + }, []); + + const remainingSignatures = Number(pubkey.value.threshold) - signatures.length; + if (!remainingSignatures) return null; + + return ( + <> + +
    +
    {signatures.length}
    +
    of
    +
    {pubkey.value.threshold}
    +
    signatures complete
    +
    + +

    + {remainingSignatures} remaining {remainingSignatures > 1 ? "signatures" : "signature"}{" "} + before this transaction can be broadcast +

    +
    + +
    + +

    + Copy the current URL and share it with the other members in the multisig so they can + sign it +

    +
    +
    +
    + + + ); +}; export default ThresholdInfo; From f2f5080ac1f09268bce1185a20555b7eaa40b4a2 Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Fri, 26 May 2023 10:28:10 +0200 Subject: [PATCH 6/7] Reword an change some TransactionSigning layout --- components/forms/TransactionSigning.tsx | 79 ++++++++++++------------- 1 file changed, 37 insertions(+), 42 deletions(-) diff --git a/components/forms/TransactionSigning.tsx b/components/forms/TransactionSigning.tsx index 7678eaf..accc20d 100644 --- a/components/forms/TransactionSigning.tsx +++ b/components/forms/TransactionSigning.tsx @@ -193,33 +193,37 @@ const TransactionSigning = (props: Props) => { }; return ( - - {signing === "signed" ? ( - + <> + +

    Current Signers

    + {props.signatures.map((signature, i) => ( + + + + ))} + {!props.signatures.length ?

    No signatures yet

    : null} +
    + + {signing === "signed" ? (
    -

    You've signed this transaction.

    +

    You've signed this transaction

    -
    - ) : null} - {signing === "not_a_member" ? ( - + ) : null} + {signing === "not_a_member" ? (
    -

    You don't belong to this multisig.

    +

    You don't belong to this multisig

    -
    - ) : null} - {signing === "not_signed" ? ( - <> -

    Sign this transaction

    - + ) : null} + {signing === "not_signed" ? ( + <> {walletAccount ? ( <>

    - Connected signer {walletAccount.bech32Address} ( - {walletType ?? "Unknown wallet type"}). + You can sign this transaction with {walletAccount.bech32Address} ( + {walletType ?? "Unknown wallet type"})