Disambiguate system transfers and spl-token transfers

This commit is contained in:
Gary Wang 2020-09-18 19:53:29 -07:00
parent 6c065d844f
commit 9eb09fe3ef
3 changed files with 6 additions and 3 deletions

View File

@ -3,7 +3,8 @@ import Typography from '@material-ui/core/Typography';
import LabelValue from './LabelValue';
const TYPE_LABELS = {
create: 'Create account',
systemCreate: 'Create account',
systemTransfer: 'Transfer SOL',
};
const DATA_LABELS = {
@ -16,6 +17,7 @@ const DATA_LABELS = {
newAuthorizedPubkey: { label: 'New authorized', address: true },
newAccountPubkey: { label: 'New account', address: true },
amount: { label: 'Amount', address: false },
lamports: { label: 'Lamports', address: false },
};
export default function SystemInstruction({ instruction, onOpenAddress }) {

View File

@ -235,7 +235,8 @@ function ApproveSignatureForm({ origin, message, onApprove, onReject }) {
onOpenAddress={onOpenAddress}
/>
);
case 'create':
case 'systemCreate':
case 'systemTransfer':
return (
<SystemInstruction
instruction={instruction}

View File

@ -242,7 +242,7 @@ const handleSystemInstruction = (publicKey, instruction, accountKeys) => {
}
return {
type: type.charAt(0).toLowerCase() + type.slice(1),
type: 'system' + type,
data: decoded,
};
};