Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

fix: Extract safe address when using currentSafe selector #3630

Merged
merged 1 commit into from
Mar 7, 2022

Conversation

usame-algan
Copy link
Member

What it solves

Resolves #3565

How this PR fixes it

When switching networks, the currentSafe selector didn't get an up-to-date safe address sometimes but instead used a cached value. Moving the extractSafeAddress call to the selector arguments solves this issue.

How to test it

  1. Open the safe app
  2. Switch to safes in different networks so that they are saved in localStorage
  3. Connect with mobile pairing
  4. Switch to other networks
  5. Observe that the last used safe of those networks is correctly loaded and visible in the sidebar
  6. Observe that there is no Safe loading error visible

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 0 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

Copy link
Member

@iamacook iamacook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@github-actions
Copy link

github-actions bot commented Mar 7, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1945868340

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Read-only transaction creation and review Read-only transaction creation and review
  • ❌ Safe Apps List Safe Apps List

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1945837199

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 34.862%

Totals Coverage Status
Change from base Build 1932713526: 0.0%
Covered Lines: 3364
Relevant Lines: 8719

💛 - Coveralls

@francovenica
Copy link
Contributor

Followed the steps and it worked fine for me
Loaded a few safes in different networks, paired the app with the web app and switched between networks. The safes loaded fine and they showed in the sidebar as well. I didn't see errors like the ones reported in the main issue

@usame-algan usame-algan merged commit 3b3b69a into dev Mar 7, 2022
@usame-algan usame-algan deleted the fix-load-safe-error branch March 7, 2022 18:04
@github-actions github-actions bot locked and limited conversation to collaborators Mar 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When switching between Gnosis Chain and other networks, the wrong safe address is used in requests
4 participants