Add migrate details
This commit is contained in:
parent
7ebb8f3389
commit
3d4f9dea89
@ -0,0 +1,56 @@
|
||||
import { fromUtf8 } from "@cosmjs/encoding";
|
||||
import { MsgMigrateContract } from "cosmjs-types/cosmwasm/wasm/v1/tx";
|
||||
import HashView from "../HashView";
|
||||
|
||||
interface TxMsgMigrateContractDetailsProps {
|
||||
readonly msgValue: MsgMigrateContract;
|
||||
}
|
||||
|
||||
const TxMsgMigrateContractDetails = ({ msgValue }: TxMsgMigrateContractDetailsProps) => (
|
||||
<>
|
||||
<li>
|
||||
<h3>MsgMigrateContract</h3>
|
||||
</li>
|
||||
<li>
|
||||
<label>Contract:</label>
|
||||
<div title={msgValue.contract}>
|
||||
<HashView hash={msgValue.contract} />
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<label>Code ID:</label>
|
||||
<div>{msgValue.codeId.toString()}</div>
|
||||
</li>
|
||||
<li>
|
||||
<label>Msg:</label>
|
||||
<div>{fromUtf8(msgValue.msg)}</div>
|
||||
</li>
|
||||
<style jsx>{`
|
||||
li:not(:has(h3)) {
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
padding: 6px 10px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
li + li:nth-child(2) {
|
||||
margin-top: 25px;
|
||||
}
|
||||
li + li {
|
||||
margin-top: 10px;
|
||||
}
|
||||
li div {
|
||||
padding: 3px 6px;
|
||||
}
|
||||
label {
|
||||
font-size: 12px;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
padding: 3px 6px;
|
||||
border-radius: 5px;
|
||||
display: block;
|
||||
}
|
||||
`}</style>
|
||||
</>
|
||||
);
|
||||
|
||||
export default TxMsgMigrateContractDetails;
|
||||
@ -10,6 +10,7 @@ import TxMsgDelegateDetails from "./TxMsgDelegateDetails";
|
||||
import TxMsgExecuteContractDetails from "./TxMsgExecuteContractDetails";
|
||||
import TxMsgInstantiateContract2Details from "./TxMsgInstantiateContract2Details";
|
||||
import TxMsgInstantiateContractDetails from "./TxMsgInstantiateContractDetails";
|
||||
import TxMsgMigrateContractDetails from "./TxMsgMigrateContractDetails";
|
||||
import TxMsgRedelegateDetails from "./TxMsgRedelegateDetails";
|
||||
import TxMsgSendDetails from "./TxMsgSendDetails";
|
||||
import TxMsgSetWithdrawAddressDetails from "./TxMsgSetWithdrawAddressDetails";
|
||||
@ -40,6 +41,8 @@ const TxMsgDetails = ({ typeUrl, value: msgValue }: EncodeObject) => {
|
||||
return <TxMsgInstantiateContractDetails msgValue={msgValue} />;
|
||||
case MsgTypeUrls.Instantiate2:
|
||||
return <TxMsgInstantiateContract2Details msgValue={msgValue} />;
|
||||
case MsgTypeUrls.Migrate:
|
||||
return <TxMsgMigrateContractDetails msgValue={msgValue} />;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user