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

feat: Remove the network selector #344

Closed
wants to merge 21 commits into from
Closed

feat: Remove the network selector #344

wants to merge 21 commits into from

Conversation

karelianpie
Copy link
Contributor

@karelianpie karelianpie commented Sep 11, 2023

Description

  • Hide the network selector;
  • Updates and pins shared dependencies with the web-lib;
  • ...

Related Issue

Close #343

Motivation and Context

Remove the network selector, so all vaults from all networks are in the same list.

Users won't need to change networks to see all vaults, vault list filtering rather than app-wise

How Has This Been Tested?

Locally

Screenshots (if appropriate):

Screenshot 2023-09-29 at 15 13 47

@karelianpie karelianpie self-assigned this Sep 11, 2023
@vercel
Copy link

vercel bot commented Sep 11, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
yearnfi ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 4, 2023 11:12am

Copy link
Collaborator

@Majorfi Majorfi left a comment

Choose a reason for hiding this comment

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

Code looks good to me, this is where we want to go!
We may need to find a way to "clean" a bunch of files, but tldr: yes!


const filterHoldingsCallback = useCallback((address: TAddress): boolean => {
balancesNonce;
const holding = balances?.[toAddress(address)];

// [Optimism] Check if staked vaults have holdings
if (safeChainID === 10) {
if (chains.includes(10)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this make sense to have this condition if we "always" have opt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you mean that we will always have opt? It's only in chains array if the user selected it

@@ -146,7 +148,7 @@ function Index(): ReactElement {
**********************************************************************************************/
const curveVaults = useFilteredVaults(vaults, ({category}): boolean => category === 'Curve');
const boostedVaults = useFilteredVaults(vaults, ({address}): boolean => {
if (safeChainID !== 10) {
if (chains.includes(10)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this make sense to have this condition if we "always" have opt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as #344 (comment)

Comment on lines +23 to +29
export const ChainIconMap = new Map<number, ReactElement>([
[1, <IconEtherumChain />],
[10, <IconOptimismChain />],
[250, <IconFantomChain />],
[8453, <IconBaseChain />],
[42161, <IconArbitrumChain />]
]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should probably have a config file for the chains stuff with all the elements related to chains, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, in the web-lib right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🟢 Done
Development

Successfully merging this pull request may close these issues.

FRP: Remove the network selector
2 participants