mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 20:21:35 +00:00
Fix depth chart borked and premium precision
This commit is contained in:
parent
f12e242453
commit
bedbe1d3f9
@ -74,8 +74,8 @@ const DepthChart: React.FC<DepthChartProps> = ({
|
|||||||
// simple rule of three
|
// simple rule of three
|
||||||
if (order.coordinatorShortAlias != null) {
|
if (order.coordinatorShortAlias != null) {
|
||||||
const limits = federation.getCoordinator(order.coordinatorShortAlias).limits;
|
const limits = federation.getCoordinator(order.coordinatorShortAlias).limits;
|
||||||
order.base_amount =
|
const price = limits[currencyCode] ? limits[currencyCode].price : 0;
|
||||||
(order.price * limits[currencyCode].price) / limits[order.currency].price;
|
order.base_amount = (order.price * price) / price;
|
||||||
}
|
}
|
||||||
return order;
|
return order;
|
||||||
});
|
});
|
||||||
@ -309,7 +309,7 @@ const DepthChart: React.FC<DepthChartProps> = ({
|
|||||||
<Box justifyContent='center'>
|
<Box justifyContent='center'>
|
||||||
{xType === 'base_amount'
|
{xType === 'base_amount'
|
||||||
? `${center} ${String(currencyDict[currencyCode])}`
|
? `${center} ${String(currencyDict[currencyCode])}`
|
||||||
: `${center}%`}
|
: `${String(center.toPrecision(3))}%`}
|
||||||
</Box>
|
</Box>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item>
|
<Grid item>
|
||||||
|
Loading…
Reference in New Issue
Block a user