You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements cursor-based pagination with infinite scroll for the transactions list, updating state, service API, and UI styling accordingly.
Transactions Pagination/Infinite Scroll
TransactionsList.view.tsx: Add cursor-based fetching (wallet.transactionCursor), seenCursors, isFetchingMore, onScroll handler, and fetchMore using getTransactions(cursor); remove obsolete args (txnsInLastNumOfDays, onlyFromState).
useStarkNetSnap.ts: Change getTransactions to accept optional cursor and return { transactions, cursor }; append or replace transactions via Redux; set transactionCursor; skip fetch when a deploy transaction exists.
State Management (Redux)
walletSlice.ts: Add transactionCursor to state; new actions appendTransactions, setTransactionCursor; export them; initialize in state.
UI/Styling
List.style.ts: Set List height to 100vh for scrollable area.
Call Sites Updated
SendSummaryModal.view.tsx and TransactionsList.view.tsx: Update getTransactions calls to new signature.
Misc
useEstimateFee.ts: Remove debug logging.
useStarkNetSnap.ts: Clear transactionDeploy when switching selected token.
Written by Cursor Bugbot for commit 08f8cf9. This will update automatically on new commits. Configure here.
The reason will be displayed to describe this comment to others. Learn more.
Bug: Set Comparison Fails for Object References
The seenCursors Set uses object references, but JavaScript Sets compare objects by reference, not by value. This means has() always returns false for new object instances, leading to duplicate transaction fetches for the same cursor.
The reason will be displayed to describe this comment to others. Learn more.
Bug: State Persistence Blocks Transaction Fetching
The getTransactions function returns early if transactionDeploy is set in the state. Since transactionDeploy persists after a deploy transaction is found, this prevents any subsequent transaction fetches, breaking pagination and refresh functionality until the transactionDeploy state is cleared.
The reason will be displayed to describe this comment to others. Learn more.
Bug: Null Assignment Causes TypeScript Errors
Setting transactionDeploy to null when changing the selected token causes TypeScript type errors. The transactionDeploy state is typed to accept Transaction | undefined, but not null.
Setting transactionDeploy to null when changing token selection clears the deploy transaction state, which may be unintended. This could cause issues if the deploy transaction is still relevant or needed by other parts of the UI. The deploy transaction is account-specific, not token-specific, so clearing it on token change seems incorrect.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requirements:
Screen.Recording.2025-04-03.at.20.09.59.mov
Note
Implements cursor-based pagination with infinite scroll for the transactions list, updating state, service API, and UI styling accordingly.
TransactionsList.view.tsx: Add cursor-based fetching (wallet.transactionCursor),seenCursors,isFetchingMore,onScrollhandler, andfetchMoreusinggetTransactions(cursor); remove obsolete args (txnsInLastNumOfDays,onlyFromState).useStarkNetSnap.ts: ChangegetTransactionsto accept optionalcursorand return{ transactions, cursor }; append or replace transactions via Redux; settransactionCursor; skip fetch when a deploy transaction exists.walletSlice.ts: AddtransactionCursorto state; new actionsappendTransactions,setTransactionCursor; export them; initialize in state.List.style.ts: SetListheight to100vhfor scrollable area.SendSummaryModal.view.tsxandTransactionsList.view.tsx: UpdategetTransactionscalls to new signature.useEstimateFee.ts: Remove debug logging.useStarkNetSnap.ts: CleartransactionDeploywhen switching selected token.Written by Cursor Bugbot for commit 08f8cf9. This will update automatically on new commits. Configure here.