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

fix(wallet-mobile): NetworkError instance #3213

Merged
merged 5 commits into from
Apr 23, 2024

Conversation

jorbuedo
Copy link
Contributor

related: https://emurgo.atlassian.net/browse/YOMO-1356

This one was confusing. Not sure why we have NetworkError exported from @yoroi/common, but it's not the same one the wallet is throwing, so don't mix them up because then instanceof will fail.

@jorbuedo jorbuedo added the fix label Apr 23, 2024
@jorbuedo jorbuedo added this to the 4.27.0 milestone Apr 23, 2024
@jorbuedo jorbuedo self-assigned this Apr 23, 2024
@banklesss
Copy link
Contributor

banklesss commented Apr 23, 2024

maybe it's worth to still use the common package error but catching it by instance and use the UI error messages?

@jorbuedo
Copy link
Contributor Author

maybe it's worth to still use the common package error but catching it by instance and use the UI error messages?

Well, sure, we can use the one in common everywhere instead. None of the uses I see use the message from the error itself.

…let/WalletDetailsScreen.tsx

Signed-off-by: Juliano Lazzarotto <[email protected]>
@stackchain
Copy link
Member

stackchain commented Apr 23, 2024

maybe it's worth to still use the common package error but catching it by instance and use the UI error messages?

Well, sure, we can use the one in common everywhere instead. None of the uses I see use the message from the error itself.

The network error inside wallet is legacy, there are 2 fetchers, the legacy fetch, and the fetchData, which is the new one. There will be few places to replace. Please update them all to use -> from types Api.Error.Network, from types, the errors inside common can be dropped.

@stackchain stackchain merged commit 19f6c04 into release/wallet-mobile/v4.27.0 Apr 23, 2024
2 checks passed
@stackchain stackchain deleted the yomo-1356 branch April 23, 2024 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants