Skip to content

Commit

Permalink
Fix price service
Browse files Browse the repository at this point in the history
  • Loading branch information
saltict committed Jul 2, 2024
1 parent 1fd9425 commit 9cf91fb
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/extension-base/src/services/price-service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,18 @@ export class PriceService implements StoppableServiceInterface, PersistDataServi
currencyData: staticData[StaticKey.CURRENCY_SYMBOL][currencyKey || DEFAULT_CURRENCY] as CurrencyJson
};

if (currencyKey === DEFAULT_CURRENCY) {
return finalPriceMap;
}

Object.keys(finalPriceMap.price24hMap).forEach((key: string) => {
finalPriceMap.price24hMap[key] *= exchangeRateData[currencyKey].exchange;
finalPriceMap.priceMap[key] *= exchangeRateData[currencyKey].exchange;
});

await this.dbService.updatePriceStore(finalPriceMap);

return finalPriceMap;
// if (currencyKey === DEFAULT_CURRENCY) {
// }
//
// Object.keys(finalPriceMap.price24hMap).forEach((key: string) => {
// finalPriceMap.price24hMap[key] *= exchangeRateData[currencyKey].exchange;
// finalPriceMap.priceMap[key] *= exchangeRateData[currencyKey].exchange;
// });
//
// await this.dbService.updatePriceStore(finalPriceMap);
//
// return finalPriceMap;
}

async getPrice () {
Expand Down

0 comments on commit 9cf91fb

Please sign in to comment.