-
Notifications
You must be signed in to change notification settings - Fork 635
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
index favorites by uniqueId instead of address #5972
Conversation
const query = useQuery({ | ||
queryKey: favoritesQueryKey, | ||
queryFn: refreshFavorites, | ||
staleTime: 24 * 60 * 60 * 1000, // 24hrs |
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.
instead of refetching every time the app loads, refresh once after 24hrs stale
|
||
const updatedMetadataByNetwork = await Promise.all( | ||
Object.entries(favoritesByNetwork).map(async ([network, networkFavorites]) => | ||
fetchMetadata(networkFavorites, ethereumUtils.getChainIdFromNetwork(network as Network)) |
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 splits the tokens that don't have a mainnet address to fetchMetadata from their network instead
like the case for degen
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 reverts commit 6d28cfc.
* 👍 * migration * add networks placeholder to default favorites
Fixes APP-1683 APP-1676
What changed (plus any additional context for devs)
we can't store based on just the address because for example the degen token in the degen network is address zero, same we use sometimes for eth in mainnet, found lots of lil weird bugs like that I think this fixes it all, probably good to QA this one
Screen recordings / screenshots
What to test