Commit 1bd122b5 authored by tom's avatar tom

display nonce for each item

parent e5bf636e
import { Text, HStack } from '@chakra-ui/react'; import { HStack, Box } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
import type { Step } from './types'; import type { Step } from './types';
...@@ -17,7 +17,7 @@ const VerificationStep = ({ step, isLast, isPassed }: Props) => { ...@@ -17,7 +17,7 @@ const VerificationStep = ({ step, isLast, isPassed }: Props) => {
return ( return (
<HStack gap={ 2 } color={ stepColor }> <HStack gap={ 2 } color={ stepColor }>
<IconSvg name={ isPassed ? 'finalized' : 'unfinalized' } boxSize={ 5 }/> <IconSvg name={ isPassed ? 'finalized' : 'unfinalized' } boxSize={ 5 }/>
<Text color={ stepColor }>{ typeof step === 'string' ? step : step.content }</Text> <Box color={ stepColor }>{ typeof step === 'string' ? step : step.content }</Box>
{ !isLast && <IconSvg name="arrows/east" boxSize={ 5 }/> } { !isLast && <IconSvg name="arrows/east" boxSize={ 5 }/> }
</HStack> </HStack>
); );
......
...@@ -30,7 +30,7 @@ const VerificationSteps = ({ currentStep, steps, isLoading, rightSlot, className ...@@ -30,7 +30,7 @@ const VerificationSteps = ({ currentStep, steps, isLoading, rightSlot, className
> >
{ steps.map((step, index) => ( { steps.map((step, index) => (
<VerificationStep <VerificationStep
key={ currentStep } key={ index }
step={ step } step={ step }
isLast={ index === steps.length - 1 && !rightSlot } isLast={ index === steps.length - 1 && !rightSlot }
isPassed={ index <= currentStepIndex } isPassed={ index <= currentStepIndex }
......
...@@ -155,13 +155,18 @@ const TxDetails = () => { ...@@ -155,13 +155,18 @@ const TxDetails = () => {
title="Withdrawal status" title="Withdrawal status"
hint="Detailed status progress of the transaction" hint="Detailed status progress of the transaction"
> >
<Flex flexDir="column" rowGap={ 3 }> <Flex flexDir="column" rowGap={ 2 }>
{ data.op_withdrawals.map((withdrawal) => ( { data.op_withdrawals.map((withdrawal) => (
<TxDetailsWithdrawalStatus <Box key={ withdrawal.nonce }>
key={ withdrawal.nonce } <Box mb={ 2 }>
status={ withdrawal.status } <span>Nonce: </span>
l1TxHash={ withdrawal.l1_transaction_hash } <chakra.span fontWeight={ 600 }>{ withdrawal.nonce }</chakra.span>
/> </Box>
<TxDetailsWithdrawalStatus
status={ withdrawal.status }
l1TxHash={ withdrawal.l1_transaction_hash }
/>
</Box>
)) } )) }
</Flex> </Flex>
</DetailsInfoItem> </DetailsInfoItem>
......
import { Box } from '@chakra-ui/react';
import { test as base, expect } from '@playwright/experimental-ct-react'; import { test as base, expect } from '@playwright/experimental-ct-react';
import React from 'react'; import React from 'react';
...@@ -25,7 +26,9 @@ statuses.forEach((status) => { ...@@ -25,7 +26,9 @@ statuses.forEach((status) => {
const component = await mount( const component = await mount(
<TestApp> <TestApp>
<TxDetailsWithdrawalStatus status={ status } l1TxHash="0x7d93a59a228e97d084a635181c3053e324237d07566ec12287eae6da2bcf9456"/> <Box p={ 2 }>
<TxDetailsWithdrawalStatus status={ status } l1TxHash="0x7d93a59a228e97d084a635181c3053e324237d07566ec12287eae6da2bcf9456"/>
</Box>
</TestApp>, </TestApp>,
); );
......
...@@ -49,7 +49,7 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => { ...@@ -49,7 +49,7 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
href="https://app.optimism.io/bridge/withdraw" href="https://app.optimism.io/bridge/withdraw"
target="_blank" target="_blank"
> >
Claim funds Claim funds
</Button> </Button>
) : null; ) : null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment