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

shuffle fp list #439

Closed
wants to merge 1 commit into from
Closed

shuffle fp list #439

wants to merge 1 commit into from

Conversation

jeremy-babylonlabs
Copy link
Collaborator

closes #427

  • Refactor fp state management to shuffle the list on fetch, this update make sure when refetch it doesn't re-shuffle the list

- Refactor fp state management to shuffle the list on fetch, this update make sure when refetch it doesn't re-shuffle the list
finalityProvidersRef.current = [...updatedProviders, ...newProviders];
}
}
}, [initialProviders, isRefetchingFinalityProviders]);
Copy link
Collaborator

@jrwbabylonlab jrwbabylonlab Dec 4, 2024

Choose a reason for hiding this comment

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

this logic seems quite complex thanks to the auto-refresh.
I wonder if it will make life easier if we just turn off the auto-refresh completely.
The auto-refresh exist due to tvl ranking, but now that we no longer doing the tvl sort, it doesn't really make much difference if we don't update the tvl in realtime.

handleSearch,
};
};

const shallowCompareFP = (objA: FinalityProvider, objB: FinalityProvider) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

we can say fpA instead of objA as this is shallowCompareFP

@jrwbabylonlab
Copy link
Collaborator

Closing as no longer needed

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.

Phase-1 FP sort randomly
3 participants