-
Notifications
You must be signed in to change notification settings - Fork 33
feat: pagination on wallet UI #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/sf-815-pagination-on-snap
Are you sure you want to change the base?
feat: pagination on wallet UI #545
Conversation
5bde256 to
85477d7
Compare
…tion-on-wallet-ui
|
|
| ) { | ||
| seenCursors.current.add({ | ||
| txnHash: walletTransactionsCursor.txnHash, | ||
| blockNumber: walletTransactionsCursor.blockNumber, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ) => { | ||
| if (transactionDeploy) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
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.
|
|
||
| const setErc20TokenBalance = (erc20TokenBalance: Erc20TokenBalance) => { | ||
| dispatch(setErc20TokenBalanceSelected(erc20TokenBalance)); | ||
| dispatch(setTransactionDeploy(null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| const setErc20TokenBalance = (erc20TokenBalance: Erc20TokenBalance) => { | ||
| dispatch(setErc20TokenBalanceSelected(erc20TokenBalance)); | ||
| dispatch(setTransactionDeploy(null)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Token Change Incorrectly Resets Deploy Transaction
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.



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.