fix(instances): make all prices 4 decimal points

This commit is contained in:
Sara Vieira 2018-03-20 10:52:55 +00:00 committed by Sérgio Ramos
parent 9bdf02b1ba
commit f5fbe0a169
2 changed files with 4 additions and 2 deletions

View File

@ -1264,7 +1264,7 @@ exports[`renders <Package /> without throwing 1`] = `
name="td"
selected={false}
>
1
1.0000
</td>
</tr>
`;

View File

@ -36,6 +36,8 @@ const GroupIcons = {
COMPUTE: <CpuIcon fill="#8043DC" />
};
const fourDecimals = n => parseFloat(Math.round(n * 10000) / 10000).toFixed(4);
const VerticalDivider = styled.div`
width: ${remcalc(1)};
background: ${props => props.theme.grey};
@ -166,7 +168,7 @@ export const Package = ({
</TableTd>
)}
<TableTd right bold={sortBy === 'price'} selected={selected}>
{price}
{fourDecimals(price)}
</TableTd>
</TableTrActionable>
);