Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TransactionFeedV2): Fix persisted feed storing unmerged transacti…
…ons (#6205) ### Description While working on a different feed issue, I've noticed there's a bug in storing the first page of the feed to the persisted storage. TLDR, currently it stores "raw" transactions from pagination, which are not merged with the stand by transactions. This still sometimes causes transactions to rearrange on the first load. This fix moves updating of the feed from to component level. It contradicts the current [Redux-driven](https://redux.js.org/style-guide/#put-as-much-logic-as-possible-in-reducers) approach as it moves processing that can be managed on reducer level back to the component level but in order to make it follow that guideline we will need to: - move `paginatedData` to Redux - move `confirmedTransactions` construction to Redux - keep `paginatedData` away from persisted storage with an extra dependency [like this](https://github.com/edy/redux-persist-transform-filter) or tweak the current persist settings as per their [nested persist guide](https://github.com/rt2zz/redux-persist?tab=readme-ov-file#nested-persists) which might cause issues with existing persistence-related tests therefore create more friction to implement this seemingly simple fix. [Initial PR review discussion](#6157 (review)) made sense at the time of working on that PR but back then I overlooked the fact that I've implemented it with this very bug as I was putting the wrong `data.transactions` data into the feed instead of the right `paginatedData[FIRST_PAGE_CURSOR]`. ### Test plan Existing test to check proper rehydration of the persisted feed passes. ### Related issues - Relates to RET-1207 ### Backwards compatibility Yes ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
- Loading branch information