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

fix: Redirect user to next available safe after removing current safe #3424

Merged
merged 4 commits into from
Feb 16, 2022

Conversation

usame-algan
Copy link
Member

@usame-algan usame-algan commented Feb 3, 2022

What it solves

Resolves #3031

How this PR fixes it

Similar to how its handled on mobile, when deleting the current safe the user gets redirected to:

  • The next available safe on the same network OR
  • The next available safe on another network OR
  • The welcome page

Open Questions

Could opening another safe automatically impact UX in a negative way? cc @liliiaorlenko

How to test it

  1. Open the Safe App
  2. Go to Settings > Safe Details
  3. Click Remove Safe
  4. Observe redirection for different cases in the order described above

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Feb 3, 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

@coveralls
Copy link

coveralls commented Feb 3, 2022

Pull Request Test Coverage Report for Build 1841428342

  • 0 of 15 (0.0%) changed or added relevant lines in 1 file are covered.
  • 914 unchanged lines in 79 files lost coverage.
  • Overall coverage decreased (-0.08%) to 33.573%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/safe/components/Settings/RemoveSafeModal/index.tsx 0 15 0.0%
Files with Coverage Reduction New Missed Lines %
src/logic/hooks/useCanTxExecute.tsx 1 81.82%
src/logic/hooks/useEstimateSafeCreationGas.tsx 1 91.3%
src/logic/safe/safeTxSigner.ts 1 11.11%
src/logic/safe/store/actions/fetchSafe.ts 1 80.33%
src/routes/CreateSafePage/steps/ReviewNewSafeStep.tsx 1 94.59%
src/routes/safe/components/Settings/RemoveSafeModal/index.tsx 1 0%
src/routes/safe/components/Settings/SpendingLimit/InfoDisplay/AddressInfo.tsx 1 11.11%
src/routes/safe/components/Settings/SpendingLimit/InfoDisplay/ResetTimeInfo.tsx 1 25.0%
src/routes/safe/components/Settings/SpendingLimit/InfoDisplay/TokenInfo.tsx 1 50.0%
src/routes/safe/components/Transactions/TxList/InfoDetails.tsx 1 50.0%
Totals Coverage Status
Change from base Build 1790282428: -0.08%
Covered Lines: 3227
Relevant Lines: 8585

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Feb 3, 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.

Looking good, but I don't agree with switching to a different network.

@github-actions
Copy link

github-actions bot commented Feb 3, 2022

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

Failed tests:

  • ❌ Read-only transaction creation and review Read-only transaction creation and review

@github-actions
Copy link

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

@francovenica
Copy link
Contributor

Looks good, The safe goes to the 1st safe in the network when another is deleted.
I think it was a good idea not to switch networks if you run out of safes in that specific network, I agree with Aaron that would be pushing it too much, so now, even if there are other safes in another network you will be taken to the welcome page if you remove all the safes in a specific network.

@usame-algan usame-algan merged commit 1433392 into dev Feb 16, 2022
@usame-algan usame-algan deleted the remove-safe-redirect branch February 16, 2022 17:25
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 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.

Welcome page is opened after safe removing instead of the next safe on the same network
5 participants