forked from solana-foundation/explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBaseRecoverNestedDetailsCard.tsx
More file actions
43 lines (40 loc) · 1.23 KB
/
BaseRecoverNestedDetailsCard.tsx
File metadata and controls
43 lines (40 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import { BaseInstructionCard } from '@components/common/BaseInstructionCard';
import { ParsedInstruction, SignatureResult, TransactionInstruction } from '@solana/web3.js';
import React from 'react';
import { BaseRawDetails } from '../../BaseRawDetails';
import { RecoverNestedInfo } from './types';
export function BaseRecoverNestedDetailsCard(props: {
ix: ParsedInstruction;
index: number;
raw: TransactionInstruction;
result: SignatureResult;
info?: RecoverNestedInfo;
innerCards?: JSX.Element[];
childIndex?: number;
children?: React.ReactNode;
InstructionCardComponent?: React.FC<Parameters<typeof BaseInstructionCard>[0]>;
}) {
const {
ix,
index,
raw,
result,
children,
innerCards,
childIndex,
InstructionCardComponent = BaseInstructionCard,
} = props;
return (
<InstructionCardComponent
ix={ix}
index={index}
raw={raw}
result={result}
title="Associated Token Program: Recover Nested"
innerCards={innerCards}
childIndex={childIndex}
>
{children ? children : <BaseRawDetails ix={raw} />}
</InstructionCardComponent>
);
}