import type { LiFiStep, Process } from '@lifi/sdk' import OpenInNewRounded from '@mui/icons-material/OpenInNewRounded' import { Box, Link, Typography } from '@mui/material' import { useExplorer } from '../../hooks/useExplorer.js' import { useProcessMessage } from '../../hooks/useProcessMessage.js' import { CardIconButton } from '../Card/CardIconButton.js' import { CircularProgress } from './CircularProgress.js' export const StepProcess: React.FC<{ step: LiFiStep process: Process }> = ({ step, process }) => { const { title, message } = useProcessMessage(step, process) const { getTransactionLink } = useExplorer() const transactionLink = process.txHash ? getTransactionLink({ txHash: process.txHash, chain: process.chainId, }) : process.txLink ? getTransactionLink({ txLink: process.txLink, chain: process.chainId, }) : undefined return ( {title} {transactionLink ? ( ) : null} {message ? ( {message} ) : null} ) }