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

Map error type to message #1782

Merged
merged 4 commits into from
Sep 19, 2023
Merged

Map error type to message #1782

merged 4 commits into from
Sep 19, 2023

Conversation

Robiquet
Copy link
Member

closes #1763

@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)
ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2023 9:56am

@@ -63,9 +63,10 @@ const WalletSelect = () => {
)}
{hasError && (
<div className="text-vermilion ml-auto text-ztg-12-120 w-ztg-275">
{error.type === "NoAccounts"
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this actually change? Since error type should only be one of two types it seems like the old code should cover all cases?

Copy link
Member Author

@Robiquet Robiquet Sep 12, 2023

Choose a reason for hiding this comment

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

I suspect the types are probably wrong and not all errors are accounted for. Even so, I don't think the previous code is good practice as it assumes that there will only ever be 2 error types

@Robiquet Robiquet added work in progress Not ready for code review. and removed review needed labels Sep 14, 2023
@Robiquet Robiquet merged commit e66bf94 into staging Sep 19, 2023
5 checks passed
@Robiquet Robiquet deleted the tr-wallet-error-message branch September 19, 2023 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect error message when connecting wallet
2 participants