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

Add default chain cosmoshub #189

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Add default chain cosmoshub #189

merged 2 commits into from
Jan 3, 2024

Conversation

abefernan
Copy link
Contributor

@abefernan abefernan commented Jan 2, 2024

Closes #184.

If the user goes to the root page without any chainname (https://cosmos-multisig-ui-kohl.vercel.app instead of https://cosmos-multisig-ui-kohl.vercel.app/<chain-name>), it will be redirected to https://cosmos-multisig-ui-kohl.vercel.app/cosmoshub instead of staying in an infinite loading screen.

@abefernan abefernan requested a review from hashedone January 2, 2024 12:49
@abefernan abefernan self-assigned this Jan 2, 2024
Copy link

vercel bot commented Jan 2, 2024

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

Name Status Preview Comments Updated (UTC)
cosmos-multisig-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 3, 2024 9:32am

@@ -61,7 +66,13 @@ export const ChainsProvider = ({ children }: ChainsProviderProps) => {
setChainsError(dispatch, chainItemsError);

const loadedChain = getChain(chainItems);
setChain(dispatch, loadedChain);
const recentChains = getRecentChainNamesFromStorage();
Copy link
Member

Choose a reason for hiding this comment

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

Why do we load recent chains? Is this used if non-empty? The setChain(dispatch, loadedChain); case does not seem to use recent chains

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that extra check is not needed. If getChain() returns empty chain it's because there are no recent chains

Copy link
Member

@webmaster128 webmaster128 left a comment

Choose a reason for hiding this comment

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

thanks

@abefernan abefernan merged commit 678aef8 into master Jan 3, 2024
5 checks passed
@abefernan abefernan deleted the fix/redirect-default-chain branch January 3, 2024 09:49
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.

Redirect to Cosmos Hub or add helpful instructions if no chain is selected
2 participants