Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state: do not overwrite currentContract #179

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Conversation

Pilou97
Copy link
Collaborator

@Pilou97 Pilou97 commented Apr 3, 2024

When the currentContract is already set we should not overwrite it

How to reproduce the bug:

  • start the app (make sure your local storage is empty)
  • log in with a tz1/2/3
  • do not import contracts
  • go to the url localhost:3000/KT1N4PGc2VXRq8DwrRyLo57erbMEcieNU8M7
  • The dashboard is showing 00$ (if not reload your app)
  • Go to proposals
  • The proposals page redirect to the page invalid-contract

What is happening is that the login action overwrite currentContracts. When the user has not yet import contracts the value is set to null, even if the user was looking to a safe

When the currentContract is already set we should not overwrite it

For instance, the user can look to a safe without being log in
Then he logs in, then he should still look to the safe he was looking at
@Pilou97 Pilou97 force-pushed the pilou@fix-current-contract branch from 8f3dd74 to a2ffde7 Compare April 3, 2024 08:33
@Pilou97 Pilou97 merged commit 990e572 into main Apr 3, 2024
3 checks passed
This was referenced Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants