Display all commitments for each process

This commit is contained in:
Sosthene 2025-06-13 16:12:13 +02:00
parent 512d981b1b
commit a71dc88407

View File

@ -4,6 +4,7 @@ import './ProcessesViewer.css';
interface BlockState {
commited_in: string;
state_id: string;
pcd_commitment: Record<string, string>;
public_data: {
memberPublicName?: string | number[];
pairedAddresses?: string[] | number[];
@ -128,19 +129,29 @@ function ProcessesViewer({ processes, myProcesses }: ProcessesViewerProps) {
{isExpanded && (
<div className="block-details">
<div className="block-complete-id">
<strong>ID complet:</strong> {processId}
<strong>Process ID:</strong> {processId}
</div>
{process.states.map((state, index) => {
if (index === stateCount - 1) return null;
if (index === stateCount) return null;
return (
<div key={`${processId}-state-${index}`} className="state-item">
<h4>État {index + 1}</h4>
<div className="state-detail">
<strong>State ID:</strong> {state.state_id}
<strong>TransactionId:</strong> {state.commited_in}
</div>
<div className="state-detail">
<strong>Commited dans:</strong> {state.commited_in}
<strong>Empreinte totale de l'état:</strong> {state.state_id}
</div>
<div className="state-detail">
<strong>Empreinte par information:</strong>
<ul>
{Object.entries(state.pcd_commitment).map(([key, value]) => (
<div key={key}>
<strong>{key}:</strong> {value}
</div>
))}
</ul>
</div>
<div className="state-public-data">