bridge_ui: tvl >1b decimals
This commit is contained in:
parent
07446e2e23
commit
9a0b2240d9
|
@ -46,6 +46,7 @@ const useStyles = makeStyles((theme) => ({
|
|||
},
|
||||
totalsBox: {
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
width: "100%",
|
||||
justifyContent: "space-evenly",
|
||||
alignItems: "center",
|
||||
|
@ -53,6 +54,8 @@ const useStyles = makeStyles((theme) => ({
|
|||
totalContainer: {
|
||||
display: "flex",
|
||||
alignItems: "flex-end",
|
||||
paddingLeft: theme.spacing(0.5),
|
||||
paddingRight: theme.spacing(0.5),
|
||||
paddingBottom: 1, // line up with left text bottom
|
||||
[theme.breakpoints.down("sm")]: {
|
||||
marginTop: theme.spacing(1),
|
||||
|
|
|
@ -196,7 +196,9 @@ const StatsRoot: React.FC<any> = () => {
|
|||
tvl.data.forEach((val) => {
|
||||
if (val.totalValue) sum += val.totalValue;
|
||||
});
|
||||
return numeral(sum).format("0 a").toUpperCase();
|
||||
return numeral(sum)
|
||||
.format(sum >= 1000000000 ? "0.000 a" : "0 a")
|
||||
.toUpperCase();
|
||||
}
|
||||
}, [tvl.data]);
|
||||
|
||||
|
@ -250,15 +252,15 @@ const StatsRoot: React.FC<any> = () => {
|
|||
)}
|
||||
</>
|
||||
</Paper>
|
||||
<Paper className={classes.mainPaper}>
|
||||
<NFTStats />
|
||||
</Paper>
|
||||
<Paper className={classes.mainPaper}>
|
||||
<TransactionMetrics />
|
||||
</Paper>
|
||||
<Paper className={classes.mainPaper}>
|
||||
<CustodyAddresses />
|
||||
</Paper>
|
||||
<Paper className={classes.mainPaper}>
|
||||
<NFTStats />
|
||||
</Paper>
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue