Send serialized message for validator creation
This commit is contained in:
parent
833cd53ff5
commit
c2e38ec8f8
@ -3,11 +3,10 @@ import React, { useEffect, useMemo, useState } from 'react'
|
||||
import { enqueueSnackbar } from 'notistack';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { MsgCreateValidatorEncodeObject } from '@cosmjs/stargate';
|
||||
import {MsgCreateValidator} from '@cerc-io/registry-sdk';
|
||||
import { MsgCreateValidator } from 'cosmjs-types/cosmos/staking/v1beta1/tx';
|
||||
import { fromBase64, fromBech32, toBech32 } from '@cosmjs/encoding';
|
||||
import { LoadingButton } from '@mui/lab';
|
||||
import { encodePubkey } from '@cosmjs/proto-signing';
|
||||
import { EncodeObject, encodePubkey } from '@cosmjs/proto-signing';
|
||||
import { Registry } from '@cerc-io/registry-sdk';
|
||||
|
||||
import { useWalletConnectContext } from '../context/WalletConnectContext'
|
||||
@ -67,13 +66,13 @@ const CreateValidator = () => {
|
||||
};
|
||||
}, [cosmosAddress, updatedPubKey]);
|
||||
|
||||
const msgCreateValidatorEncodeObject: MsgCreateValidatorEncodeObject = {
|
||||
const msgCreateValidatorEncodeObject: EncodeObject = {
|
||||
typeUrl: '/cosmos.staking.v1beta1.MsgCreateValidator',
|
||||
value: msgCreateValidator
|
||||
value: MsgCreateValidator.toJSON(msgCreateValidator)
|
||||
};
|
||||
|
||||
const sendTransaction = async (
|
||||
transactionMessage: MsgCreateValidatorEncodeObject
|
||||
transactionMessage: EncodeObject
|
||||
) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user