Skip to content

Commit

Permalink
fix: pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Poafs1 committed Jan 23, 2025
1 parent ffec31a commit 7e8d6cd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@ import { TextReadOnly } from "lib/components/json/TextReadOnly";
import { Option } from "lib/types";

export interface ContractByteCodeProps {
code: Option<string>;
deployedCode: string;
byteCode: Option<string>;
deployedByteCode: string;
}

export const ContractByteCode = ({
code = "",
deployedCode,
byteCode = "",
deployedByteCode,
}: ContractByteCodeProps) => (
<Stack gap={8}>
<Stack gap={4}>
<Heading as="h6" variant="h7">
ByteCode
</Heading>
<TextReadOnly text={code} canCopy />
<TextReadOnly text={byteCode} canCopy />
</Stack>
<Stack gap={4}>
<Heading as="h6" variant="h7">
Deployed ByteCode
</Heading>
<TextReadOnly text={deployedCode} canCopy />
<TextReadOnly text={deployedByteCode} canCopy />
</Stack>
</Stack>
);
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ interface EvmContractDetailsContractProps extends ContractByteCodeProps {

export const EvmContractDetailsContract = ({
contractAddress,
code,
deployedCode,
byteCode,
deployedByteCode,
}: EvmContractDetailsContractProps) => {
const [currentTab, setCurrentTab] = useState(
EvmContractDetailsContractTabs.ByteCode
Expand All @@ -31,7 +31,10 @@ export const EvmContractDetailsContract = ({
/>
</Flex>
{currentTab === EvmContractDetailsContractTabs.ByteCode && (
<ContractByteCode code={code} deployedCode={deployedCode} />
<ContractByteCode
byteCode={byteCode}
deployedByteCode={deployedByteCode}
/>
)}
</Stack>
);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/pages/evm-contract-details/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ const EvmContractDetailsBody = ({
</TabPanel>
<TabPanel p={0} pt={8}>
<EvmContractDetailsContract
deployedCode={evmCodesByAddressData.code}
code={evmContractInfoData?.code}
deployedByteCode={evmCodesByAddressData.code}
byteCode={evmContractInfoData?.code}
contractAddress={contractAddress}
/>
</TabPanel>
Expand Down

0 comments on commit 7e8d6cd

Please sign in to comment.