Prettier formatting

pull/168/head
Neeraj Kashyap 2021-08-25 03:37:06 -07:00
rodzic 5f973f83a3
commit 195de89b37
2 zmienionych plików z 32 dodań i 32 usunięć

Wyświetl plik

@ -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;

Wyświetl plik

@ -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;