Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
anxolin committed Jul 22, 2024
1 parent 82fe9bf commit 3d0798f
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ export class UsdRepositoryCoingecko implements UsdRepository {
// FIXME: This is a workaround for the fact that Coingecko Open API has a hardcoded BTC address in the response (notified the Coingecko team about this issue, so remove when the issue is fixed)
const priceData = data as SimplePriceResponse;

if (
response.status === 404 ||
!priceData ||
!priceData[tokenAddressLower] ||
!priceData[tokenAddressLower].usd
) {
if (response.status === 404 || !priceData?.[tokenAddressLower]?.usd) {
return null;
}
await throwIfUnsuccessful(
Expand Down

0 comments on commit 3d0798f

Please sign in to comment.