Skip to content

Commit

Permalink
Merge pull request #13 from umee-network/matt/add-button-for-vest-acc…
Browse files Browse the repository at this point in the history
…ount-add

blank and  vesting buttons
  • Loading branch information
dreamcodez authored Feb 25, 2022
2 parents a76a7f5 + 9374edc commit 0b54ea7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions components/forms/FlexibleTransactionForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,28 @@ function blankVoteJSON(voter, proposalId = -1) {
);
}

function blankCreateVestingAccountJSON(fromAddress) {
return JSON.stringify(
{
typeUrl: "/cosmos.vesting.v1beta1.MsgCreateVestingAccount",
value: {
fromAddress,
toAddress: "",
amount: [
{
denom: "uumee",
amount: "0",
},
],
endTime: "",
delayed: false,
},
},
null,
2,
);
}

const FlexibleTransactionForm = (props) => {
const { state } = useAppContext();

Expand Down Expand Up @@ -322,6 +344,11 @@ const FlexibleTransactionForm = (props) => {
<Button label="Undelegate" onClick={() => newMessage(blankUndelegateJSON(props.address))} />
<Button label="Redelegate" onClick={() => newMessage(blankRedelegateJSON(props.address))} />
<Button label="Vote" onClick={() => newMessage(blankVoteJSON(props.address))} />
<Button
label="CreateVestingAccount"
onClick={() => newMessage(blankCreateVestingAccountJSON(props.address))}
/>
<Button label="Blank" onClick={() => newMessage(blankMessageJSON)} />

<br />
<br />
Expand Down

1 comment on commit 0b54ea7

@vercel
Copy link

@vercel vercel bot commented on 0b54ea7 Feb 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.