@@ -15,11 +15,6 @@ import { strings } from '../../../../../../locales/i18n';
1515import { TransactionDetails } from '../../../../Views/confirmations/components/activity/transaction-details/transaction-details' ;
1616import { useTransactionDetails } from '../../../../Views/confirmations/hooks/activity/useTransactionDetails' ;
1717
18- /**
19- * Maps each Money/Earn transaction type to its i18n title key.
20- * Edit this map to customise detail-sheet titles without touching
21- * shared confirmations code.
22- */
2318const TITLE_KEYS : Partial < Record < TransactionType , string > > = {
2419 [ TransactionType . moneyAccountDeposit ] :
2520 'transaction_details.title.money_account_deposit' ,
@@ -38,21 +33,14 @@ const TITLE_KEYS: Partial<Record<TransactionType, string>> = {
3833function getTitle ( tx : TransactionMeta | undefined ) : string {
3934 const type =
4035 tx ?. type === TransactionType . batch
41- ? ( tx . nestedTransactions ?. find ( ( n ) => n . type && n . type in TITLE_KEYS )
42- ?. type as TransactionType | undefined ) ?? tx . type
36+ ? ( ( tx . nestedTransactions ?. find ( ( n ) => n . type && n . type in TITLE_KEYS )
37+ ?. type as TransactionType | undefined ) ?? tx . type )
4338 : tx ?. type ;
4439 return strings (
4540 ( type && TITLE_KEYS [ type ] ) ?? 'transaction_details.title.default' ,
4641 ) ;
4742}
4843
49- /**
50- * Renders the transaction details screen as a full-screen bottom sheet modal
51- * inside the Money modal stack. Because this component is registered as a
52- * navigation screen in MoneyModalStack, useTransactionDetails() (and any other
53- * hook that calls useRoute/useParams internally) automatically picks up
54- * { transactionId } from this screen's route params.
55- */
5644const MoneyTransactionDetailsSheet = ( ) => {
5745 const sheetRef = useRef < BottomSheetRef > ( null ) ;
5846 const navigation = useNavigation ( ) ;
0 commit comments