diff --git a/frontend/src/components/Charts/DepthChart/index.tsx b/frontend/src/components/Charts/DepthChart/index.tsx index ce3b77cf..89fdd118 100644 --- a/frontend/src/components/Charts/DepthChart/index.tsx +++ b/frontend/src/components/Charts/DepthChart/index.tsx @@ -74,8 +74,8 @@ const DepthChart: React.FC = ({ // simple rule of three if (order.coordinatorShortAlias != null) { const limits = federation.getCoordinator(order.coordinatorShortAlias).limits; - order.base_amount = - (order.price * limits[currencyCode].price) / limits[order.currency].price; + const price = limits[currencyCode] ? limits[currencyCode].price : 0; + order.base_amount = (order.price * price) / price; } return order; }); @@ -309,7 +309,7 @@ const DepthChart: React.FC = ({ {xType === 'base_amount' ? `${center} ${String(currencyDict[currencyCode])}` - : `${center}%`} + : `${String(center.toPrecision(3))}%`}