Skip to content

Commit

Permalink
fix: price service
Browse files Browse the repository at this point in the history
  • Loading branch information
bangjelkoski committed Mar 14, 2022
1 parent 88eb46f commit 32cf478
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/ui-common/src/token/coinGeckoService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,16 @@ export class TokenCoinGeckoService extends BaseService {
coinIds: coinId,
currency: 'usd',
})) as {
data: CoinPriceFromInjectiveService[]
data: {
data: CoinPriceFromInjectiveService[]
}
}

if (pricesResponse.data.length === 0) {
if (pricesResponse.data.data.length === 0) {
return 0
}

const [priceResponse] = pricesResponse.data
const [priceResponse] = pricesResponse.data.data

if (!priceResponse) {
return 0
Expand Down

0 comments on commit 32cf478

Please sign in to comment.