Disambiguate system transfers and spl-token transfers
This commit is contained in:
parent
6c065d844f
commit
9eb09fe3ef
|
@ -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 }) {
|
||||
|
|
|
@ -235,7 +235,8 @@ function ApproveSignatureForm({ origin, message, onApprove, onReject }) {
|
|||
onOpenAddress={onOpenAddress}
|
||||
/>
|
||||
);
|
||||
case 'create':
|
||||
case 'systemCreate':
|
||||
case 'systemTransfer':
|
||||
return (
|
||||
<SystemInstruction
|
||||
instruction={instruction}
|
||||
|
|
|
@ -242,7 +242,7 @@ const handleSystemInstruction = (publicKey, instruction, accountKeys) => {
|
|||
}
|
||||
|
||||
return {
|
||||
type: type.charAt(0).toLowerCase() + type.slice(1),
|
||||
type: 'system' + type,
|
||||
data: decoded,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue