Decode create account with seed instructions
This commit is contained in:
parent
b409d1474d
commit
77a4a242c3
|
@ -2,9 +2,9 @@ import React from 'react';
|
|||
import Link from '@material-ui/core/Link';
|
||||
import Typography from '@material-ui/core/Typography';
|
||||
|
||||
export default function LabelValue({ label, value, link = false, onClick }) {
|
||||
export default function LabelValue({ label, value, link = false, onClick, gutterBottom }) {
|
||||
return (
|
||||
<Typography>
|
||||
<Typography gutterBottom={gutterBottom}>
|
||||
{label}:{' '}
|
||||
{link ? (
|
||||
<Link href="#" onClick={onClick}>
|
||||
|
|
|
@ -4,6 +4,7 @@ import LabelValue from './LabelValue';
|
|||
|
||||
const TYPE_LABELS = {
|
||||
systemCreate: 'Create account',
|
||||
systemCreateWithSeed: 'Create account with seed',
|
||||
systemTransfer: 'Transfer SOL',
|
||||
};
|
||||
|
||||
|
|
|
@ -17,9 +17,10 @@ export default function UnknownInstruction({ instruction, onOpenAddress }) {
|
|||
label='Program'
|
||||
value={instruction.programId?.toBase58()}
|
||||
link={true}
|
||||
gutterBottom={true}
|
||||
onClick={() => onOpenAddress(instruction.programId.toBase58())}
|
||||
/>
|
||||
{instruction.accountMetas.map((accountMeta, index) => {
|
||||
{instruction.accountMetas && instruction.accountMetas.map((accountMeta, index) => {
|
||||
return (
|
||||
<>
|
||||
<LabelValue
|
||||
|
@ -29,7 +30,7 @@ export default function UnknownInstruction({ instruction, onOpenAddress }) {
|
|||
link={true}
|
||||
onClick={() => onOpenAddress(accountMeta.publicKey.toBase58())}
|
||||
/>
|
||||
<Typography gutterBottom>isWritable: {accountMeta.isWritable.toString()}</Typography>
|
||||
<Typography gutterBottom>Writable: {accountMeta.isWritable.toString()}</Typography>
|
||||
</>
|
||||
);
|
||||
})}
|
||||
|
|
|
@ -485,6 +485,7 @@ function ApproveSignatureForm({
|
|||
onOpenAddress={onOpenAddress}
|
||||
/>
|
||||
);
|
||||
case 'systemCreateWithSeed':
|
||||
case 'systemCreate':
|
||||
case 'systemTransfer':
|
||||
return (
|
||||
|
|
Loading…
Reference in New Issue