This commit is contained in:
Gregory Tertyshny 2024-07-15 14:45:38 +03:00
parent f1947c0e00
commit 37c3b88bb1

View file

@ -1,6 +1,7 @@
import { bookUrl } from "./bookUrl";
import { extractPriceFrom } from "./extractPriceFrom";
import { getRate } from "./rates";
import { convertPrice } from "./convertPrice";
import { cacheBookPrice, getBookPrice } from "./cache";
import { format, isToday } from "date-fns";
@ -23,7 +24,7 @@ export const bookPriceFor = async (country) => {
if (countryPrice) {
l("found price", countryPrice, url);
const rate = await getRate(country.currencyCode);
convertedPrice = await convertedPrice(
convertedPrice = await convertPrice(
countryPrice,
country.currencyCode,
rate,