Skip to content

Commit

Permalink
fix: network filtered view crash (#8846)
Browse files Browse the repository at this point in the history
## **Description**
Network list filtered view crash when removing the network on the redux
state on the add network view and then it's navigating back to the
screen, but the list is not updated

This needs to be fixed to move forward with E2E work

## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**
https://recordit.co/O3haA4sCxZ

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] 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.
- [ ] I’ve properly set the pull request status:
  - [ ] In case it's not yet "ready for review", I've set it to "draft".
- [ ] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.
  • Loading branch information
tommasini authored Mar 5, 2024
1 parent 10690a0 commit 0c45fbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/components/Views/Settings/NetworksSettings/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,11 @@ class NetworksSettings extends PureComponent {
this.updateNavBar();
};

componentDidUpdate = () => {
componentDidUpdate = (prevProps) => {
if (this.props.networkConfigurations !== prevProps.networkConfigurations) {
this.handleSearchTextChange(this.state.searchString);
}

this.updateNavBar();
};

Expand Down

0 comments on commit 0c45fbf

Please sign in to comment.