Correct units

This commit is contained in:
dapplion 2019-08-10 03:41:38 +02:00
parent 9c4de97ae3
commit 2a4f219668
2 changed files with 3 additions and 11 deletions

View File

@ -47,34 +47,29 @@ export default function CurveDesignInputParams({
min: 0,
max: 0.9,
step: 0.01,
unit: "%",
suffix: "%",
format: (n: number) => `${Math.round(100 * n)}%`,
toText: (n: number) => String(+(n * 1e2).toFixed(0)),
toNum: (n: string) => parseFloat(n) * 1e-2
},
{
label: "Hatch price",
label: "Hatch price (DAI/token)",
value: p0,
setter: _setP0,
min: 0.01,
max: 1,
step: 0.01,
unit: "$",
prefix: "$",
toText: (n: number) => String(+n.toFixed(2)),
toNum: (n: string) => parseFloat(n),
format: (n: number) => `$${n}`
},
{
label: "Post-hatch price",
label: "Post-hatch price (DAI/token)",
value: p1,
setter: setP1,
min: p0 || 0.1,
max: Number((maxReturnRate * p0).toFixed(2)),
step: 0.01,
unit: "$",
prefix: "$",
toText: (n: number) => String(+n.toFixed(2)),
toNum: (n: string) => parseFloat(n),
format: (n: number) => `$${n}`
@ -86,7 +81,6 @@ export default function CurveDesignInputParams({
min: 0,
max: 0.1,
step: 0.001,
unit: "%",
suffix: "%",
format: (n: number) => `${+(100 * n).toFixed(1)}%`,
toText: (n: number) => String(+(n * 1e2).toFixed(1)),

View File

@ -24,14 +24,12 @@ export default function CurveDesignInputParams({
const inputFields: InputFieldInterface[] = [
{
label: "Initial raise",
label: "Initial raise (DAI)",
value: d0,
setter: setD0,
min: 0.1e6,
max: 10e6,
step: 0.1e6,
unit: "$M",
prefix: "$",
suffix: "M",
format: (n: number) => `$${+(n * 1e-6).toFixed(1)}M`,
toText: (n: number) => String(+(n * 1e-6).toFixed(1)),