fix: #578 reset TransactionHistory page, total, and txs state when wallet address changes - #614
Merged
k-deejah merged 2 commits intoAug 29, 2026
Conversation
…when wallet address changes
|
@jotel-dev 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! 🚀 |
…t-reset-when-wallet-address-changes
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary of Changes
Fixes #578
Problem
In
TransactionHistory.tsx,page,total, andtxsstate were not reset whenaddresschanged. If a user navigated to page 3 on Account A and then switched to Account B (which had fewer than 3 pages), the component requested page 3 for Account B, resulting in an empty response ("No transactions found") and briefly displaying a stale pagination reading like "Page 3 of 2".Solution & Implementation
pageto1,totalto0, andtxsto[]whenaddresschanges so that stale data and stale page numbers are discarded immediately before the new fetch starts.pageis reset synchronously upon address change, the fetch effect only requestspage: 1for the newly connected wallet.sessionStoragepersistence that previously retained old page numbers across wallet switches.contextClient ?? getClient()to ensure robust client resolution in both runtime and test environments.Acceptance Criteria Verified
TransactionHistoryto page 1.txslist are cleared before the new fetch begins.