-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: my position is not loading when switch the network #343
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Tarun. I tested it and the problem doesn't seem to be resolved yet. See my loom: https://www.loom.com/share/a328847711964d6b8f686e3f99676211
You can't render hooks conditionally - see rules of hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure what the hook is for tbh
: [] | ||
|
||
setFilterPosition(filteredRows) | ||
}, [balances]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just wrapping it inside a useEffect - I don't think that solves anything?
@tarunyadav1 what's happening with this PR cc @Walodja1987 |
Would be good if someone could help to solve that issue |
Given that we want to launch on one single network, this has lower priority right now. However, if someone knows how to fix that, please feel free to help out. |
Technical Description
Note
useEffect
is rendering multiple times. This should not happen, the cause of the issue I think isuseQuery
hooks that fetch the balances. @juliankrispel is there something we can do to conditionally renderuseQuery
hooks.PR Checklist