From f318e174b1f269a0c492389ac91b49b8f5facc38 Mon Sep 17 00:00:00 2001 From: Matthew A Elder Date: Wed, 23 Feb 2022 15:29:05 -0700 Subject: [PATCH] allow adding of any message types, remove placeholders --- components/forms/FlexibleTransactionForm.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/components/forms/FlexibleTransactionForm.js b/components/forms/FlexibleTransactionForm.js index a24ef8f6..71f2e037 100644 --- a/components/forms/FlexibleTransactionForm.js +++ b/components/forms/FlexibleTransactionForm.js @@ -97,7 +97,7 @@ function blankRedelegateJSON(delegatorAddress) { ); } -function blankVoteJSON(voter, proposalId) { +function blankVoteJSON(voter, proposalId = -1) { return JSON.stringify( { typeUrl: "/cosmos.gov.v1beta1.MsgVote", @@ -120,13 +120,7 @@ const FlexibleTransactionForm = (props) => { const [rawJsonMsgs, setRawJsonMsgs] = useState( (function () { if (!props.msgs) { - return { - 0: blankSendJSON(props.address), - 1: blankDelegateJSON(props.address), - 2: blankUndelegateJSON(props.address), - 3: blankRedelegateJSON(props.address), - 4: blankVoteJSON(props.address, -1), - }; + return { 0: blankSendJSON(props.address) }; } const out = {}; @@ -322,7 +316,12 @@ const FlexibleTransactionForm = (props) => { ); })} -