Explorer: correct system instruction names (#13284)
* fix system instruction names
This commit is contained in:
@ -6,13 +6,13 @@ import {
|
|||||||
} from "@solana/web3.js";
|
} from "@solana/web3.js";
|
||||||
import { InstructionCard } from "../InstructionCard";
|
import { InstructionCard } from "../InstructionCard";
|
||||||
import { Address } from "components/common/Address";
|
import { Address } from "components/common/Address";
|
||||||
import { AdvanceNonceAccountInfo } from "./types";
|
import { AdvanceNonceInfo } from "./types";
|
||||||
|
|
||||||
export function NonceAdvanceDetailsCard(props: {
|
export function NonceAdvanceDetailsCard(props: {
|
||||||
ix: ParsedInstruction;
|
ix: ParsedInstruction;
|
||||||
index: number;
|
index: number;
|
||||||
result: SignatureResult;
|
result: SignatureResult;
|
||||||
info: AdvanceNonceAccountInfo;
|
info: AdvanceNonceInfo;
|
||||||
}) {
|
}) {
|
||||||
const { ix, index, result, info } = props;
|
const { ix, index, result, info } = props;
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@ import {
|
|||||||
} from "@solana/web3.js";
|
} from "@solana/web3.js";
|
||||||
import { InstructionCard } from "../InstructionCard";
|
import { InstructionCard } from "../InstructionCard";
|
||||||
import { Address } from "components/common/Address";
|
import { Address } from "components/common/Address";
|
||||||
import { AuthorizeNonceAccountInfo } from "./types";
|
import { AuthorizeNonceInfo } from "./types";
|
||||||
|
|
||||||
export function NonceAuthorizeDetailsCard(props: {
|
export function NonceAuthorizeDetailsCard(props: {
|
||||||
ix: ParsedInstruction;
|
ix: ParsedInstruction;
|
||||||
index: number;
|
index: number;
|
||||||
result: SignatureResult;
|
result: SignatureResult;
|
||||||
info: AuthorizeNonceAccountInfo;
|
info: AuthorizeNonceInfo;
|
||||||
}) {
|
}) {
|
||||||
const { ix, index, result, info } = props;
|
const { ix, index, result, info } = props;
|
||||||
|
|
||||||
|
@ -6,13 +6,13 @@ import {
|
|||||||
} from "@solana/web3.js";
|
} from "@solana/web3.js";
|
||||||
import { InstructionCard } from "../InstructionCard";
|
import { InstructionCard } from "../InstructionCard";
|
||||||
import { Address } from "components/common/Address";
|
import { Address } from "components/common/Address";
|
||||||
import { InitializeNonceAccountInfo } from "./types";
|
import { InitializeNonceInfo } from "./types";
|
||||||
|
|
||||||
export function NonceInitializeDetailsCard(props: {
|
export function NonceInitializeDetailsCard(props: {
|
||||||
ix: ParsedInstruction;
|
ix: ParsedInstruction;
|
||||||
index: number;
|
index: number;
|
||||||
result: SignatureResult;
|
result: SignatureResult;
|
||||||
info: InitializeNonceAccountInfo;
|
info: InitializeNonceInfo;
|
||||||
}) {
|
}) {
|
||||||
const { ix, index, result, info } = props;
|
const { ix, index, result, info } = props;
|
||||||
|
|
||||||
|
@ -7,13 +7,13 @@ import {
|
|||||||
import { lamportsToSolString } from "utils";
|
import { lamportsToSolString } from "utils";
|
||||||
import { InstructionCard } from "../InstructionCard";
|
import { InstructionCard } from "../InstructionCard";
|
||||||
import { Address } from "components/common/Address";
|
import { Address } from "components/common/Address";
|
||||||
import { WithdrawNonceAccountInfo } from "./types";
|
import { WithdrawNonceInfo } from "./types";
|
||||||
|
|
||||||
export function NonceWithdrawDetailsCard(props: {
|
export function NonceWithdrawDetailsCard(props: {
|
||||||
ix: ParsedInstruction;
|
ix: ParsedInstruction;
|
||||||
index: number;
|
index: number;
|
||||||
result: SignatureResult;
|
result: SignatureResult;
|
||||||
info: WithdrawNonceAccountInfo;
|
info: WithdrawNonceInfo;
|
||||||
}) {
|
}) {
|
||||||
const { ix, index, result, info } = props;
|
const { ix, index, result, info } = props;
|
||||||
|
|
||||||
|
@ -28,10 +28,10 @@ import {
|
|||||||
AssignInfo,
|
AssignInfo,
|
||||||
AssignWithSeedInfo,
|
AssignWithSeedInfo,
|
||||||
TransferInfo,
|
TransferInfo,
|
||||||
AdvanceNonceAccountInfo,
|
AdvanceNonceInfo,
|
||||||
AuthorizeNonceAccountInfo,
|
AuthorizeNonceInfo,
|
||||||
InitializeNonceAccountInfo,
|
InitializeNonceInfo,
|
||||||
WithdrawNonceAccountInfo,
|
WithdrawNonceInfo,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
|
|
||||||
type DetailsProps = {
|
type DetailsProps = {
|
||||||
@ -73,20 +73,20 @@ export function SystemDetailsCard(props: DetailsProps) {
|
|||||||
const info = coerce(parsed.info, TransferInfo);
|
const info = coerce(parsed.info, TransferInfo);
|
||||||
return <TransferDetailsCard info={info} {...props} />;
|
return <TransferDetailsCard info={info} {...props} />;
|
||||||
}
|
}
|
||||||
case "advanceNonceAccount": {
|
case "advanceNonce": {
|
||||||
const info = coerce(parsed.info, AdvanceNonceAccountInfo);
|
const info = coerce(parsed.info, AdvanceNonceInfo);
|
||||||
return <NonceAdvanceDetailsCard info={info} {...props} />;
|
return <NonceAdvanceDetailsCard info={info} {...props} />;
|
||||||
}
|
}
|
||||||
case "withdrawNonceAccount": {
|
case "withdrawNonce": {
|
||||||
const info = coerce(parsed.info, WithdrawNonceAccountInfo);
|
const info = coerce(parsed.info, WithdrawNonceInfo);
|
||||||
return <NonceWithdrawDetailsCard info={info} {...props} />;
|
return <NonceWithdrawDetailsCard info={info} {...props} />;
|
||||||
}
|
}
|
||||||
case "authorizeNonceAccount": {
|
case "authorizeNonce": {
|
||||||
const info = coerce(parsed.info, AuthorizeNonceAccountInfo);
|
const info = coerce(parsed.info, AuthorizeNonceInfo);
|
||||||
return <NonceAuthorizeDetailsCard info={info} {...props} />;
|
return <NonceAuthorizeDetailsCard info={info} {...props} />;
|
||||||
}
|
}
|
||||||
case "initializeNonceAccount": {
|
case "initializeNonce": {
|
||||||
const info = coerce(parsed.info, InitializeNonceAccountInfo);
|
const info = coerce(parsed.info, InitializeNonceInfo);
|
||||||
return <NonceInitializeDetailsCard info={info} {...props} />;
|
return <NonceInitializeDetailsCard info={info} {...props} />;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -38,36 +38,28 @@ export const CreateAccountWithSeedInfo = pick({
|
|||||||
owner: Pubkey,
|
owner: Pubkey,
|
||||||
});
|
});
|
||||||
|
|
||||||
export type AdvanceNonceAccountInfo = StructType<
|
export type AdvanceNonceInfo = StructType<typeof AdvanceNonceInfo>;
|
||||||
typeof AdvanceNonceAccountInfo
|
export const AdvanceNonceInfo = pick({
|
||||||
>;
|
|
||||||
export const AdvanceNonceAccountInfo = pick({
|
|
||||||
nonceAccount: Pubkey,
|
nonceAccount: Pubkey,
|
||||||
nonceAuthority: Pubkey,
|
nonceAuthority: Pubkey,
|
||||||
});
|
});
|
||||||
|
|
||||||
export type WithdrawNonceAccountInfo = StructType<
|
export type WithdrawNonceInfo = StructType<typeof WithdrawNonceInfo>;
|
||||||
typeof WithdrawNonceAccountInfo
|
export const WithdrawNonceInfo = pick({
|
||||||
>;
|
|
||||||
export const WithdrawNonceAccountInfo = pick({
|
|
||||||
nonceAccount: Pubkey,
|
nonceAccount: Pubkey,
|
||||||
destination: Pubkey,
|
destination: Pubkey,
|
||||||
nonceAuthority: Pubkey,
|
nonceAuthority: Pubkey,
|
||||||
lamports: number(),
|
lamports: number(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export type InitializeNonceAccountInfo = StructType<
|
export type InitializeNonceInfo = StructType<typeof InitializeNonceInfo>;
|
||||||
typeof InitializeNonceAccountInfo
|
export const InitializeNonceInfo = pick({
|
||||||
>;
|
|
||||||
export const InitializeNonceAccountInfo = pick({
|
|
||||||
nonceAccount: Pubkey,
|
nonceAccount: Pubkey,
|
||||||
nonceAuthority: Pubkey,
|
nonceAuthority: Pubkey,
|
||||||
});
|
});
|
||||||
|
|
||||||
export type AuthorizeNonceAccountInfo = StructType<
|
export type AuthorizeNonceInfo = StructType<typeof AuthorizeNonceInfo>;
|
||||||
typeof AuthorizeNonceAccountInfo
|
export const AuthorizeNonceInfo = pick({
|
||||||
>;
|
|
||||||
export const AuthorizeNonceAccountInfo = pick({
|
|
||||||
nonceAccount: Pubkey,
|
nonceAccount: Pubkey,
|
||||||
nonceAuthority: Pubkey,
|
nonceAuthority: Pubkey,
|
||||||
newAuthorized: Pubkey,
|
newAuthorized: Pubkey,
|
||||||
@ -115,9 +107,9 @@ export const SystemInstructionType = enums([
|
|||||||
"assign",
|
"assign",
|
||||||
"assignWithSeed",
|
"assignWithSeed",
|
||||||
"transfer",
|
"transfer",
|
||||||
"advanceNonceAccount",
|
"advanceNonce",
|
||||||
"withdrawNonceAccount",
|
"withdrawNonce",
|
||||||
"authorizeNonceAccount",
|
"authorizeNonce",
|
||||||
"initializeNonceAccount",
|
"initializeNonce",
|
||||||
// "transferWithSeed", TODO: Add support for transfer with seed
|
// "transferWithSeed", TODO: Add support for transfer with seed
|
||||||
]);
|
]);
|
||||||
|
Reference in New Issue
Block a user