diff --git a/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/package.spec.js.snap b/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/package.spec.js.snap index 0827008a..ea984ff0 100644 --- a/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/package.spec.js.snap +++ b/packages/my-joy-instances/src/components/create-instance/__tests__/__snapshots__/package.spec.js.snap @@ -1264,7 +1264,7 @@ exports[`renders without throwing 1`] = ` name="td" selected={false} > - 1 + 1.0000 `; diff --git a/packages/my-joy-instances/src/components/create-instance/package.js b/packages/my-joy-instances/src/components/create-instance/package.js index a107eb2d..991825e4 100644 --- a/packages/my-joy-instances/src/components/create-instance/package.js +++ b/packages/my-joy-instances/src/components/create-instance/package.js @@ -36,6 +36,8 @@ const GroupIcons = { COMPUTE: }; +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 = ({ )} - {price} + {fourDecimals(price)} );