Skip to content

Commit

Permalink
Don't log or show Price API communication errors in development
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgall committed Mar 12, 2024
1 parent e53c7db commit 14ba6c4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/providers/App/hooks/usePriceAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ export default function usePriceAPI() {
}
}
} catch (e) {
// When doing local development, it's unlikely that the Pricing Service is going to be running locally,
// so don't worry about logging or showing the error toast.
if (process.env.NODE_ENV === 'development') return;
logError('Error while getting tokens prices', e);
toast.warning(t('tokenPriceFetchingError'));
return;
Expand Down

0 comments on commit 14ba6c4

Please sign in to comment.