kopia lustrzana https://github.com/bugout-dev/moonstream
Prettier formatting
rodzic
5f973f83a3
commit
195de89b37
|
@ -1,29 +1,29 @@
|
|||
import React from "react";
|
||||
import {
|
||||
VStack,
|
||||
Code,
|
||||
} from "@chakra-ui/react";
|
||||
import { VStack, Code } from "@chakra-ui/react";
|
||||
import { Table, Thead, Tbody, Tr, Th, Td } from "@chakra-ui/react";
|
||||
|
||||
const ContractSource = ({ source_info }) => {
|
||||
return (
|
||||
<VStack spacing={3}>
|
||||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>Contract Name</Th>
|
||||
<Th>Compiler version</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
<Tr key={source_info.name}>
|
||||
<Td>{source_info.name} </Td>
|
||||
<Td>{source_info.compiler_version}</Td>
|
||||
</Tr>
|
||||
</Tbody>
|
||||
</Table>
|
||||
<Code colorScheme="blackAlpha" w="110%" >{source_info.source_code}</Code>
|
||||
</VStack>)
|
||||
}
|
||||
return (
|
||||
<VStack spacing={3}>
|
||||
<Table>
|
||||
<Thead>
|
||||
<Tr>
|
||||
<Th>Contract Name</Th>
|
||||
<Th>Compiler version</Th>
|
||||
</Tr>
|
||||
</Thead>
|
||||
<Tbody>
|
||||
<Tr key={source_info.name}>
|
||||
<Td>{source_info.name} </Td>
|
||||
<Td>{source_info.compiler_version}</Td>
|
||||
</Tr>
|
||||
</Tbody>
|
||||
</Table>
|
||||
<Code colorScheme="blackAlpha" w="110%">
|
||||
{source_info.source_code}
|
||||
</Code>
|
||||
</VStack>
|
||||
);
|
||||
};
|
||||
|
||||
export default ContractSource;
|
||||
export default ContractSource;
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
Box,
|
||||
VStack,
|
||||
} from "@chakra-ui/react";
|
||||
import ContractSource from './ContractSource'
|
||||
import ContractSource from "./ContractSource";
|
||||
import { Table, Thead, Tbody, Tr, Th, Td } from "@chakra-ui/react";
|
||||
const toEth = (wei) => {
|
||||
return wei / Math.pow(10, 18);
|
||||
|
@ -95,13 +95,13 @@ const TxInfo = (props) => {
|
|||
)}
|
||||
</Tbody>
|
||||
</Table>
|
||||
{transaction.smart_contract_info && <ContractSource source_info={transaction.smart_contract_info} />}
|
||||
{
|
||||
transaction.tx.input && transaction.tx.input !== "0x" && (
|
||||
<TxABI byteCode={transaction.tx.input} abi={transaction.abi} />
|
||||
)
|
||||
}
|
||||
</Box >
|
||||
{transaction.smart_contract_info && (
|
||||
<ContractSource source_info={transaction.smart_contract_info} />
|
||||
)}
|
||||
{transaction.tx.input && transaction.tx.input !== "0x" && (
|
||||
<TxABI byteCode={transaction.tx.input} abi={transaction.abi} />
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
export default TxInfo;
|
||||
|
|
Ładowanie…
Reference in New Issue