import React, { useEffect } from 'react' import { Box, Text } from 'ink' import { Header, KeyValue } from '../components/index.js' import { theme } from '../theme.js' export interface TransactionCreateSuccessScreenProps { /** * Safe transaction hash */ safeTxHash: string /** * Optional callback when the screen is ready to exit */ onExit?: () => void } /** * TransactionCreateSuccessScreen displays success message after creating a transaction. * This replaces the console.log implementation in commands/tx/create.ts * * Features: * - Shows transaction hash * - Displays next step for signing * - Clean, consistent styling */ export function TransactionCreateSuccessScreen({ safeTxHash, onExit, }: TransactionCreateSuccessScreenProps): React.ReactElement { // Auto-exit after rendering useEffect(() => { if (onExit) { onExit() } }, [onExit]) return (
{/* Transaction details */} {/* Next step */} To sign this transaction, run: safe tx sign {safeTxHash} ) }