fix(#50): add transaction history tracking#491
Conversation
autoFocus opens the keyboard immediately on mount, which can block UI elements before the screen finishes rendering. Replace it with a ref-based focus triggered after a 300 ms delay, giving the navigation transition time to complete on both iOS and Android. - Add nameInputRef (useRef<TextInput>) to the name field - Remove autoFocus prop from the name TextInput - Focus the input programmatically after 300 ms in a useEffect - Import useRef from React
…lity tracking - Switch KeyboardAvoidingView behavior to 'padding' on iOS and undefined on Android (Android handles scroll natively) - Track keyboard show/hide events with Keyboard listeners to set isKeyboardVisible state - Apply extra bottom padding to ScrollView content when keyboard is open so all form fields remain reachable - Import Keyboard from react-native
- Add src/services/crashReporter.ts: persists crash records to AsyncStorage, installs a global ErrorUtils handler for uncaught JS errors, detects previous crash on next launch, and supports optional remote endpoint reporting - Add src/components/CrashRecoveryModal.tsx: modal shown on launch when a previous crash is detected; lets user trigger data recovery or continue without recovering - Update ErrorBoundary to call crashReporter.recordCrash() in componentDidCatch so React render errors are also persisted
- Initialize crashReporter early in App startup (alongside i18n) - On launch, if a previous crash is detected, show CrashRecoveryModal - handleRecover calls crashReporter.attemptDataRecovery() which clears corrupted AsyncStorage state while preserving settings and auth keys - handleDismissRecovery marks the crash as notified so the modal does not reappear on subsequent launches - Import Alert for recovery-failure feedback
- Add src/types/transaction.ts: Transaction interface with id, subscriptionId, subscriptionName, amount, currency, status, type, date, txHash, chainId, explorerUrl, failureReason, notes - Add TransactionStatus (pending/confirmed/failed/cancelled) and TransactionType (fiat/crypto/refund) enums - Add src/store/transactionStore.ts: Zustand persisted store with addTransaction, updateTransactionStatus, getBySubscription, getByStatus, clearHistory; capped at 500 records via AsyncStorage - Export useTransactionStore from src/store/index.ts - Add TransactionHistory route to RootStackParamList
…d explorer link
- Add src/screens/TransactionHistoryScreen.tsx:
- FlatList of all transactions, newest first
- Filter chips: All / Confirmed / Pending / Failed
- Each row shows subscription name, date, type, amount, status badge
- Crypto transactions show shortened tx hash
- Tap a row to open a bottom-sheet detail panel with full info
- Detail panel shows txHash, chainId, failureReason, notes
- 'View on Block Explorer' button opens explorerUrl/tx/<hash> via
Linking.openURL (satisfies 'links to explorer' acceptance criterion)
- Register TransactionHistory screen in AppNavigator (SettingsStack)
|
@senmalong Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
|
❌ This PR has merge conflicts. Hi @senmalong, Please resolve the conflicts with 🤖 Drips Wave Merge Agent |
|
@Smartdevs17 conflict resolved |
|
@Smartdevs17 kindky review |
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 34266369 | Triggered | Generic Password | 66f2c0d | backend/config/tests/redis.test.ts | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
* fix(Smartdevs17#72): replace autoFocus with delayed focus via useRef autoFocus opens the keyboard immediately on mount, which can block UI elements before the screen finishes rendering. Replace it with a ref-based focus triggered after a 300 ms delay, giving the navigation transition time to complete on both iOS and Android. - Add nameInputRef (useRef<TextInput>) to the name field - Remove autoFocus prop from the name TextInput - Focus the input programmatically after 300 ms in a useEffect - Import useRef from React * fix(Smartdevs17#72): improve KeyboardAvoidingView and keyboard visibility tracking - Switch KeyboardAvoidingView behavior to 'padding' on iOS and undefined on Android (Android handles scroll natively) - Track keyboard show/hide events with Keyboard listeners to set isKeyboardVisible state - Apply extra bottom padding to ScrollView content when keyboard is open so all form fields remain reachable - Import Keyboard from react-native * fix(Smartdevs17#59): add crash reporter service and recovery modal - Add src/services/crashReporter.ts: persists crash records to AsyncStorage, installs a global ErrorUtils handler for uncaught JS errors, detects previous crash on next launch, and supports optional remote endpoint reporting - Add src/components/CrashRecoveryModal.tsx: modal shown on launch when a previous crash is detected; lets user trigger data recovery or continue without recovering - Update ErrorBoundary to call crashReporter.recordCrash() in componentDidCatch so React render errors are also persisted * fix(Smartdevs17#59): wire crash reporting into App.tsx startup - Initialize crashReporter early in App startup (alongside i18n) - On launch, if a previous crash is detected, show CrashRecoveryModal - handleRecover calls crashReporter.attemptDataRecovery() which clears corrupted AsyncStorage state while preserving settings and auth keys - handleDismissRecovery marks the crash as notified so the modal does not reappear on subsequent launches - Import Alert for recovery-failure feedback * fix(Smartdevs17#50): add Transaction types and transactionStore - Add src/types/transaction.ts: Transaction interface with id, subscriptionId, subscriptionName, amount, currency, status, type, date, txHash, chainId, explorerUrl, failureReason, notes - Add TransactionStatus (pending/confirmed/failed/cancelled) and TransactionType (fiat/crypto/refund) enums - Add src/store/transactionStore.ts: Zustand persisted store with addTransaction, updateTransactionStatus, getBySubscription, getByStatus, clearHistory; capped at 500 records via AsyncStorage - Export useTransactionStore from src/store/index.ts - Add TransactionHistory route to RootStackParamList * fix(Smartdevs17#50): add TransactionHistoryScreen with detail view and explorer link - Add src/screens/TransactionHistoryScreen.tsx: - FlatList of all transactions, newest first - Filter chips: All / Confirmed / Pending / Failed - Each row shows subscription name, date, type, amount, status badge - Crypto transactions show shortened tx hash - Tap a row to open a bottom-sheet detail panel with full info - Detail panel shows txHash, chainId, failureReason, notes - 'View on Block Explorer' button opens explorerUrl/tx/<hash> via Linking.openURL (satisfies 'links to explorer' acceptance criterion) - Register TransactionHistory screen in AppNavigator (SettingsStack)
Summary
Closes #50
Implements full transaction history tracking — store, types, screen with detail view, and block explorer links.
Files
src/types/transaction.ts(new)Transactioninterface:id,subscriptionId,subscriptionName,amount,currency,status,type,date(ISO),txHash,chainId,explorerUrl,failureReason,notesTransactionStatusenum:pending | confirmed | failed | cancelledTransactionTypeenum:fiat | crypto | refundsrc/store/transactionStore.ts(new)subtrackr-transaction-history)addTransaction— prepends and caps at 500 recordsupdateTransactionStatus— update status + optional failure reasongetBySubscription/getByStatus— filtered selectorsclearHistorysrc/screens/TransactionHistoryScreen.tsx(new)FlatListof all transactions, newest firstLinking.openURL(explorerUrl/tx/txHash)src/store/index.ts— exportsuseTransactionStoresrc/navigation/types.ts— addsTransactionHistoryroutesrc/navigation/AppNavigator.tsx— registersTransactionHistoryScreenAcceptance Criteria
Linking.openURL