This commit is contained in:
koalasat 2024-10-26 15:57:38 +02:00
parent aa6daae161
commit 325468ccd3
No known key found for this signature in database
GPG Key ID: 2F7F61C6146AB157

View File

@ -68,8 +68,8 @@ const DepthChart: React.FC<DepthChartProps> = ({
useEffect(() => {
if (Object.values(federation.book).length > 0) {
const enriched = Object.values(federation.book).map((order) => {
if (order && order.coordinatorShortAlias != null && order.currency) {
const limits = federation.getCoordinator(order.coordinatorShortAlias).limits;
if (order?.coordinatorShortAlias && order?.currency) {
const limits = federation.getCoordinator(order.coordinatorShortAlias)?.limits;
const originalPrice =
(limits[order.currency]?.price ?? 0) * (1 + parseFloat(order.premium) / 100);