Skip to content

Commit

Permalink
Merge pull request #1436 from decent-dao/maintenance/#1434-hide-prici…
Browse files Browse the repository at this point in the history
…ng-service-errors

Don't log or show Pricing API communication errors in development
  • Loading branch information
adamgall authored Mar 12, 2024
2 parents e53c7db + 14ba6c4 commit 0d508fd
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 0d508fd

Please sign in to comment.