forked from solana-foundation/explorer
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBaseCreateDetailsCard.tsx
More file actions
46 lines (44 loc) · 1.34 KB
/
BaseCreateDetailsCard.tsx
File metadata and controls
46 lines (44 loc) · 1.34 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
44
45
46
import { Address } from '@components/common/Address';
import { BaseInstructionCard } from '@components/common/BaseInstructionCard';
import { ParsedInstruction, SignatureResult, TransactionInstruction } from '@solana/web3.js';
import React from 'react';
import { BaseRawDetails } from '../../BaseRawDetails';
export function BaseCreateDetailsCard({
ix,
index,
raw,
result,
innerCards,
childIndex,
children,
InstructionCardComponent = BaseInstructionCard,
}: {
ix: ParsedInstruction;
index: number;
raw: TransactionInstruction;
result: SignatureResult;
innerCards?: JSX.Element[];
childIndex?: number;
children?: React.ReactNode;
InstructionCardComponent?: React.FC<Parameters<typeof BaseInstructionCard>[0]>;
}) {
return (
<InstructionCardComponent
ix={ix}
index={index}
raw={raw}
result={result}
title="Associated Token Program: Create"
innerCards={innerCards}
childIndex={childIndex}
>
<tr>
<td>Program</td>
<td className="text-lg-end">
<Address pubkey={ix.programId} alignRight link />
</td>
</tr>
{children ? children : <BaseRawDetails ix={raw} />}
</InstructionCardComponent>
);
}