From 2b98c79615e5ee387d0eba4f953da5b21aca493a Mon Sep 17 00:00:00 2001 From: Manuel Wedler Date: Tue, 30 Jul 2024 14:02:01 +0200 Subject: [PATCH] Adapt AccordionReceipt to proxy receipts --- .../src/app/components/AccordionReceipt.tsx | 93 +++++++++---------- 1 file changed, 45 insertions(+), 48 deletions(-) diff --git a/apps/contract-verification/src/app/components/AccordionReceipt.tsx b/apps/contract-verification/src/app/components/AccordionReceipt.tsx index ef4eb8aa39..9d9b88ed7a 100644 --- a/apps/contract-verification/src/app/components/AccordionReceipt.tsx +++ b/apps/contract-verification/src/app/components/AccordionReceipt.tsx @@ -1,5 +1,5 @@ import React, { useMemo } from 'react' -import { SubmittedContract } from '../types' +import { SubmittedContract, VerificationReceipt } from '../types' import { shortenAddress, CustomTooltip } from '@remix-ui/helper' import { AppContext } from '../AppContext' @@ -36,15 +36,31 @@ export const AccordionReceipt: React.FC = ({ contract, in
+
+ Chain ID: + {contract.chainId} +
+
+ File: + {contract.filePath} +
+
+ Contract: + {contract.contractName} +
+
+ Submission: + {new Date(contract.date).toLocaleString()} +
{!contract.proxyAddress ? ( - + ) : ( <>
Implementation - +
@@ -53,8 +69,7 @@ export const AccordionReceipt: React.FC = ({ contract, in {shortenAddress(contract.proxyAddress)} - {/* TODO add body for proxies */} - {/* */} +
)} @@ -64,50 +79,32 @@ export const AccordionReceipt: React.FC = ({ contract, in ) } -const ReceiptsBody = ({ contract }: { contract: SubmittedContract }) => { +const ReceiptsBody = ({ receipts }: { receipts: VerificationReceipt[] }) => { return ( - <> -
- Chain ID: - {contract.chainId} -
-
- File: - {contract.filePath} -
-
- Contract: - {contract.contractName} -
-
- Submission: - {new Date(contract.date).toLocaleString()} -
-
- - - - - - - - - {/*TODO add link*/} +
+
VerifierAPI URLStatusMessageReceiptID
+ + + + + + + + {/*TODO add link*/} + + + + {receipts.map((receipt) => ( + + + + + + - - - {contract.receipts.map((receipt) => ( - - - - - - - - ))} - -
VerifierAPI URLStatusMessageReceiptID
{receipt.verifierInfo.name}{receipt.verifierInfo.apiUrl}{receipt.status}{receipt.message}{receipt.receiptId}
{receipt.verifierInfo.name}{receipt.verifierInfo.apiUrl}{receipt.status}{receipt.message}{receipt.receiptId}
-
- + ))} + + +
) }