2020-05-09 18:28:58 +08:00
|
|
|
import React from "react";
|
|
|
|
import {
|
|
|
|
SystemProgram,
|
|
|
|
SignatureResult,
|
2020-10-28 15:28:12 -07:00
|
|
|
ParsedInstruction,
|
2020-05-09 18:28:58 +08:00
|
|
|
} from "@solana/web3.js";
|
|
|
|
import { InstructionCard } from "../InstructionCard";
|
2020-08-08 14:45:57 +08:00
|
|
|
import { Copyable } from "components/common/Copyable";
|
|
|
|
import { Address } from "components/common/Address";
|
2020-10-29 23:46:36 +08:00
|
|
|
import { AssignWithSeedInfo } from "./types";
|
2020-05-09 18:28:58 +08:00
|
|
|
|
|
|
|
export function AssignWithSeedDetailsCard(props: {
|
2020-10-28 15:28:12 -07:00
|
|
|
ix: ParsedInstruction;
|
2020-05-09 18:28:58 +08:00
|
|
|
index: number;
|
|
|
|
result: SignatureResult;
|
2020-10-29 23:46:36 +08:00
|
|
|
info: AssignWithSeedInfo;
|
2020-05-09 18:28:58 +08:00
|
|
|
}) {
|
2020-10-28 15:28:12 -07:00
|
|
|
const { ix, index, result, info } = props;
|
2020-05-09 18:28:58 +08:00
|
|
|
|
|
|
|
return (
|
|
|
|
<InstructionCard
|
|
|
|
ix={ix}
|
|
|
|
index={index}
|
|
|
|
result={result}
|
|
|
|
title="Assign Account w/ Seed"
|
|
|
|
>
|
|
|
|
<tr>
|
|
|
|
<td>Program</td>
|
2020-08-04 20:44:16 +08:00
|
|
|
<td className="text-lg-right">
|
2020-08-03 01:44:47 +08:00
|
|
|
<Address pubkey={SystemProgram.programId} alignRight link />
|
2020-05-09 18:28:58 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Account Address</td>
|
2020-08-04 20:44:16 +08:00
|
|
|
<td className="text-lg-right">
|
2020-10-28 15:28:12 -07:00
|
|
|
<Address pubkey={info.account} alignRight link />
|
2020-05-09 18:28:58 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Base Address</td>
|
2020-08-04 20:44:16 +08:00
|
|
|
<td className="text-lg-right">
|
2020-10-28 15:28:12 -07:00
|
|
|
<Address pubkey={info.base} alignRight link />
|
2020-05-09 18:28:58 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Seed</td>
|
2020-08-04 20:44:16 +08:00
|
|
|
<td className="text-lg-right">
|
2020-10-28 15:28:12 -07:00
|
|
|
<Copyable right text={info.seed}>
|
|
|
|
<code>{info.seed}</code>
|
2020-05-09 18:28:58 +08:00
|
|
|
</Copyable>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td>Assigned Owner</td>
|
2020-08-04 20:44:16 +08:00
|
|
|
<td className="text-lg-right">
|
2020-10-28 15:28:12 -07:00
|
|
|
<Address pubkey={info.owner} alignRight link />
|
2020-05-09 18:28:58 +08:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</InstructionCard>
|
|
|
|
);
|
|
|
|
}
|