feat: live price updates on coin page

This commit is contained in:
Face 2025-05-27 14:54:19 +03:00
parent 330ea7ad79
commit 0aa4849e76
5 changed files with 176 additions and 23 deletions

View file

@ -185,7 +185,9 @@ export async function POST({ params, request }) {
currentPrice: newPrice,
marketCap: Number(coinData.circulatingSupply) * newPrice,
change24h: metrics.change24h,
volume24h: metrics.volume24h
volume24h: metrics.volume24h,
poolCoinAmount: newPoolCoin,
poolBaseCurrencyAmount: newPoolBaseCurrency
}));
});
@ -325,7 +327,9 @@ export async function POST({ params, request }) {
currentPrice: newPrice,
marketCap: Number(coinData.circulatingSupply) * newPrice,
change24h: metrics.change24h,
volume24h: metrics.volume24h
volume24h: metrics.volume24h,
poolCoinAmount: newPoolCoin,
poolBaseCurrencyAmount: newPoolBaseCurrency
}));
});