From 11b1bd531c3d0a61c6571f016e622ad333b645a9 Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Mon, 22 May 2023 12:09:13 +0200 Subject: [PATCH 1/3] Fix types --- types/txMsg.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/txMsg.ts b/types/txMsg.ts index b3d2ed4..a3b2a14 100644 --- a/types/txMsg.ts +++ b/types/txMsg.ts @@ -21,7 +21,7 @@ export interface TxMsgDelegate { readonly value: { readonly delegatorAddress: string; readonly validatorAddress: string; - readonly amount: [{ readonly amount: string; readonly denom: string }]; + readonly amount: { readonly amount: string; readonly denom: string }; }; } @@ -30,7 +30,7 @@ export interface TxMsgUndelegate { readonly value: { readonly delegatorAddress: string; readonly validatorAddress: string; - readonly amount: [{ readonly amount: string; readonly denom: string }]; + readonly amount: { readonly amount: string; readonly denom: string }; }; } @@ -40,7 +40,7 @@ export interface TxMsgRedelegate { readonly delegatorAddress: string; readonly validatorSrcAddress: string; readonly validatorDstAddress: string; - readonly amount: [{ readonly amount: string; readonly denom: string }]; + readonly amount: { readonly amount: string; readonly denom: string }; }; } From 430ca30c406154073ff5e7d2cf225fa3265df5df Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Mon, 22 May 2023 12:09:27 +0200 Subject: [PATCH 2/3] Fix forms --- components/forms/CreateTxForm/MsgForm/MsgDelegateForm.tsx | 2 +- components/forms/CreateTxForm/MsgForm/MsgRedelegateForm.tsx | 2 +- components/forms/CreateTxForm/MsgForm/MsgUndelegateForm.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/forms/CreateTxForm/MsgForm/MsgDelegateForm.tsx b/components/forms/CreateTxForm/MsgForm/MsgDelegateForm.tsx index c3cc638..dc1ef5c 100644 --- a/components/forms/CreateTxForm/MsgForm/MsgDelegateForm.tsx +++ b/components/forms/CreateTxForm/MsgForm/MsgDelegateForm.tsx @@ -48,7 +48,7 @@ const MsgDelegateForm = ({ delegatorAddress, setCheckAndGetMsg }: MsgDelegateFor value: { delegatorAddress, validatorAddress, - amount: [{ amount: amountInAtomics, denom: state.chain.denom }], + amount: { amount: amountInAtomics, denom: state.chain.denom }, }, }; diff --git a/components/forms/CreateTxForm/MsgForm/MsgRedelegateForm.tsx b/components/forms/CreateTxForm/MsgForm/MsgRedelegateForm.tsx index d0c974f..f9c7814 100644 --- a/components/forms/CreateTxForm/MsgForm/MsgRedelegateForm.tsx +++ b/components/forms/CreateTxForm/MsgForm/MsgRedelegateForm.tsx @@ -59,7 +59,7 @@ const MsgRedelegateForm = ({ delegatorAddress, setCheckAndGetMsg }: MsgRedelegat delegatorAddress, validatorSrcAddress, validatorDstAddress, - amount: [{ amount: amountInAtomics, denom: state.chain.denom }], + amount: { amount: amountInAtomics, denom: state.chain.denom }, }, }; diff --git a/components/forms/CreateTxForm/MsgForm/MsgUndelegateForm.tsx b/components/forms/CreateTxForm/MsgForm/MsgUndelegateForm.tsx index 2e32184..e38a9d7 100644 --- a/components/forms/CreateTxForm/MsgForm/MsgUndelegateForm.tsx +++ b/components/forms/CreateTxForm/MsgForm/MsgUndelegateForm.tsx @@ -48,7 +48,7 @@ const MsgUndelegateForm = ({ delegatorAddress, setCheckAndGetMsg }: MsgUndelegat value: { delegatorAddress, validatorAddress, - amount: [{ amount: amountInAtomics, denom: state.chain.denom }], + amount: { amount: amountInAtomics, denom: state.chain.denom }, }, }; From 3475afe47b5c29529970bead40feb5d0db0c128d Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Mon, 22 May 2023 12:13:34 +0200 Subject: [PATCH 3/3] Fix details --- components/dataViews/TransactionInfo/TxMsgDelegateDetails.tsx | 4 ++-- .../dataViews/TransactionInfo/TxMsgRedelegateDetails.tsx | 4 ++-- .../dataViews/TransactionInfo/TxMsgUndelegateDetails.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/dataViews/TransactionInfo/TxMsgDelegateDetails.tsx b/components/dataViews/TransactionInfo/TxMsgDelegateDetails.tsx index 7b36a44..e0eaf45 100644 --- a/components/dataViews/TransactionInfo/TxMsgDelegateDetails.tsx +++ b/components/dataViews/TransactionInfo/TxMsgDelegateDetails.tsx @@ -1,5 +1,5 @@ import { useAppContext } from "../../../context/AppContext"; -import { printableCoins } from "../../../lib/displayHelpers"; +import { printableCoin } from "../../../lib/displayHelpers"; import { TxMsgDelegate } from "../../../types/txMsg"; import HashView from "../HashView"; @@ -17,7 +17,7 @@ const TxMsgDelegateDetails = ({ msg }: TxMsgDelegateDetailsProps) => {
  • -
    {printableCoins(msg.value.amount, state.chain)}
    +
    {printableCoin(msg.value.amount, state.chain)}
  • diff --git a/components/dataViews/TransactionInfo/TxMsgRedelegateDetails.tsx b/components/dataViews/TransactionInfo/TxMsgRedelegateDetails.tsx index eb04b44..1e82065 100644 --- a/components/dataViews/TransactionInfo/TxMsgRedelegateDetails.tsx +++ b/components/dataViews/TransactionInfo/TxMsgRedelegateDetails.tsx @@ -1,5 +1,5 @@ import { useAppContext } from "../../../context/AppContext"; -import { printableCoins } from "../../../lib/displayHelpers"; +import { printableCoin } from "../../../lib/displayHelpers"; import { TxMsgRedelegate } from "../../../types/txMsg"; import HashView from "../HashView"; @@ -17,7 +17,7 @@ const TxMsgRedelegateDetails = ({ msg }: TxMsgRedelegateDetailsProps) => {
  • -
    {printableCoins(msg.value.amount, state.chain)}
    +
    {printableCoin(msg.value.amount, state.chain)}
  • diff --git a/components/dataViews/TransactionInfo/TxMsgUndelegateDetails.tsx b/components/dataViews/TransactionInfo/TxMsgUndelegateDetails.tsx index 26f7bd2..cb7c182 100644 --- a/components/dataViews/TransactionInfo/TxMsgUndelegateDetails.tsx +++ b/components/dataViews/TransactionInfo/TxMsgUndelegateDetails.tsx @@ -1,5 +1,5 @@ import { useAppContext } from "../../../context/AppContext"; -import { printableCoins } from "../../../lib/displayHelpers"; +import { printableCoin } from "../../../lib/displayHelpers"; import { TxMsgUndelegate } from "../../../types/txMsg"; import HashView from "../HashView"; @@ -17,7 +17,7 @@ const TxMsgUndelegateDetails = ({ msg }: TxMsgUndelegateDetailsProps) => {
  • -
    {printableCoins(msg.value.amount, state.chain)}
    +
    {printableCoin(msg.value.amount, state.chain)}