Commit 2ee179d7 authored by tom's avatar tom

hide last step for "Ready for relay" withdrawal status

parent 0a0fd668
...@@ -23,12 +23,16 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => { ...@@ -23,12 +23,16 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
return null; return null;
} }
const hasClaimButton = status === 'Ready for relay';
const steps = hasClaimButton ? WITHDRAWAL_STATUSES.slice(0, -1) : WITHDRAWAL_STATUSES;
const rightSlot = (() => { const rightSlot = (() => {
if (status === 'Relayed' && l1TxHash) { if (status === 'Relayed' && l1TxHash) {
return <TxEntityL1 hash={ l1TxHash } truncation="constant"/>; return <TxEntityL1 hash={ l1TxHash } truncation="constant"/>;
} }
if (status === 'Ready for relay') { if (hasClaimButton) {
return ( return (
<Button <Button
variant="outline" variant="outline"
...@@ -51,11 +55,11 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => { ...@@ -51,11 +55,11 @@ const TxDetailsWithdrawalStatus = ({ status, l1TxHash }: Props) => {
hint="Detailed status progress of the transaction" hint="Detailed status progress of the transaction"
> >
<VerificationSteps <VerificationSteps
steps={ WITHDRAWAL_STATUSES as unknown as Array<L2WithdrawalStatus> } steps={ steps as unknown as Array<L2WithdrawalStatus> }
step={ status } step={ status }
rightSlot={ rightSlot } rightSlot={ rightSlot }
my={ status === 'Ready for relay' ? '-6px' : 0 } my={ hasClaimButton ? '-6px' : 0 }
lineHeight={ status === 'Ready for relay' ? 8 : undefined } lineHeight={ hasClaimButton ? 8 : undefined }
/> />
</DetailsInfoItem> </DetailsInfoItem>
); );
......
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