Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into develop
  • Loading branch information
tubackkhoa committed Sep 11, 2023
2 parents ced56b3 + 91bfdfd commit a3b7dbd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/SmartContract/MoreInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const MoreInfo = ({ data }) => {
<div className={cx("item-title")}>Label</div>
</td>
<td>
<div className={cx("item-text")}>{isNil(data?.contract_name) ? "-" : data?.contract_name}</div>
<div className={cx("item-text")}>{isNil(data?.label) ? "-" : data?.label}</div>
</td>
</tr>
</tbody>
Expand Down
25 changes: 15 additions & 10 deletions src/containers/VerifiedContract/VerifiedContract.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const VerifiedContract = () => {
const address = params?.["address"];
const path = `${consts.API_CONTRACT_DEPLOY}${consts.PATH_CONTRACT.LIST}/${address}`;

const {data, loading, error, refetch: refetchSmartContract} = useGet({
const { data, loading, error, refetch: refetchSmartContract } = useGet({
path: path,
});

Expand Down Expand Up @@ -55,15 +55,20 @@ const VerifiedContract = () => {
<Container fixed className={cx("smart-contract")}>
<div className={cx("header-card")}>
<Grid spacing={2} container>
<ContractPreview data={{
...data?.data,
address: data?.data?.contract_address,
code_id: data?.data?.code_id,
}} />
<MoreInfo data={{
...data?.data,
creator: data?.data?.creator_address,
}} />
<ContractPreview
data={{
...data?.data,
address: data?.data?.contract_address,
code_id: data?.data?.code_id,
}}
/>
<MoreInfo
data={{
...data?.data,
creator: data?.data?.creator_address,
label: data?.data?.contract_name,
}}
/>
</Grid>
</div>
{tableSection}
Expand Down

0 comments on commit a3b7dbd

Please sign in to comment.