Skip to content

Commit 46aa755

Browse files
committed
fix: validate HMT symbol in Coinlore API response
1 parent 1bf5802 commit 46aa755

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

packages/apps/dashboard/server/src/modules/stats/stats.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ export class StatsService implements OnModuleInit {
347347
],
348348
);
349349
} else if (this.envConfigService.hmtPriceSource.includes('coinlore')) {
350-
if (!data || !data[0] || !data[0].price_usd) {
350+
if (!data || !data[0] || !data[0].price_usd || data[0].symbol !== 'HMT') {
351351
throw new Error('Failed to fetch HMT price from Coinlore API');
352352
}
353353
hmtPrice = parseFloat(data[0].price_usd);

0 commit comments

Comments
 (0)