Closed Hemanthghs closed 2 months ago
The changes involve enhancements to the transaction history components, introducing new state management for transaction status and loading states. A custom hook for initializing transactions is added, and components are updated to provide better user feedback during transaction retrieval. Additionally, new loading and error handling components are implemented to improve the overall user experience.
Files | Change Summary |
---|---|
frontend/src/app/(routes)/transactions/history/SearchTransaction.tsx |
Added txnStatus state management; modified rendering logic for TransactionNotFound based on txnStatus . |
frontend/src/app/(routes)/transactions/history/[network]/[hash]/loading.tsx |
Replaced PageLoading with TransactionLoading for a more specialized loading experience. |
frontend/src/app/(routes)/transactions/history/[network]/[hash]/page.tsx |
Implemented loading state with txnStatus ; conditionally rendered Transaction and TransactionNotFound components based on transaction status. |
frontend/src/app/(routes)/transactions/history/[network]/components/Transaction.tsx |
Introduced viewRawOpen state for displaying raw transaction data; added "View JSON" button and CustomDialog for JSON display. |
frontend/src/app/(routes)/transactions/history/[network]/components/TransactionHistoryDashboard.tsx |
Added useInitTransactions custom hook to initialize transaction data based on chainID . |
frontend/src/app/(routes)/transactions/history/loaders/TransactionLoading.tsx |
Created TransactionLoading component for a visually appealing loading state with shimmer effects. |
frontend/src/app/globals.css |
Added new CSS classes .shimmer and .shimmer-line for improved loading effects; reformatted selectors for readability. |
frontend/src/custom-hooks/useGetTransactions.ts |
Removed useEffect from useGetTransactions ; added conditional check for chainID in fetchTransaction . |
frontend/src/custom-hooks/useInitTransactions.tsx |
Defined a new custom hook to initialize transaction data based on chainID , using useEffect for state management. |
frontend/src/store/features/recent-transactions/recentTransactionsSlice.tsx |
Enhanced getTransaction thunk and reducer with checks for txnsData and refined error handling for improved transaction processing. |
sequenceDiagram
participant User
participant TransactionHistoryPage
participant ReduxStore
participant TransactionLoading
participant TransactionNotFound
User->>TransactionHistoryPage: Request transaction history
TransactionHistoryPage->>ReduxStore: Fetch transaction data
ReduxStore-->>TransactionHistoryPage: Return txnStatus
alt txnStatus is PENDING
TransactionHistoryPage->>TransactionLoading: Render loading component
else txnStatus is REJECTED
TransactionHistoryPage->>TransactionNotFound: Render not found component
else txnStatus is SUCCESS
TransactionHistoryPage->>User: Display transaction data
end
🐰 In the meadow, changes bloom,
New states and hooks dispel the gloom.
Transactions dance, loading with grace,
JSON revealed in a cozy space.
Hooray for updates, hop and cheer,
A brighter path for all to steer! 🌼
[!TIP] We have updated our review workflow to use the Anthropic's Claude family of models. Please share any feedback in the discussion post on our Discord.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@coderabbitai review
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
resolute | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 3, 2024 8:46am |
Summary by CodeRabbit
New Features
Bug Fixes
Style
Documentation