Skip to content

Commit 3b40cb0

Browse files
authored
fix: array reference being reused (#22480)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> There was a `transactions` array reference that was being reused on every run of the selector, so duplicate items were being added and breaking the transactions view. ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Fixed issue with activity list showing blank spaces ## **Related issues** Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1751 ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: user [verb for user action] Given [describe expected initial app state] When user [verb for user action] Then [describe expected outcome] ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/437d7622-a32f-49dd-80ba-616eaa2c65ef ### **After** <!-- [screenshots/recordings] --> https://github.com/user-attachments/assets/2a2edf96-7332-4c21-8673-078a1328d4cc ## **Pre-merge author checklist** - [X] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [X] I've completed the PR template to the best of my ability - [X] I’ve included tests if applicable - [X] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [X] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 9e5caf3 commit 3b40cb0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/selectors/multichain/multichain.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,9 @@ export const selectNonEvmTransactionsForSelectedAccountGroup =
521521
}
522522

523523
const aggregated = {
524-
...DEFAULT_TRANSACTION_STATE_ENTRY,
524+
transactions: [],
525+
next: null,
526+
lastUpdated: 0,
525527
} as NonEvmTransactionStateEntry;
526528

527529
for (const account of selectedGroupAccounts) {

0 commit comments

Comments
 (0)