fix: unused variable and code simplification

This commit is contained in:
Sérgio Salgado 2021-05-13 22:44:42 +01:00 committed by Josh Harvey
parent d09cf61c86
commit 58d6a41505

View file

@ -120,16 +120,12 @@ const WizardStep = ({
denomination: step === 2 ? cashoutSettings.top : cashoutSettings.bottom denomination: step === 2 ? cashoutSettings.top : cashoutSettings.bottom
} }
const getPercentage = values => const getPercentage = values => {
R.clamp( const cassetteCount =
0, step === 2 ? values.cassette1Count : values.cassette2Count
100, const value = cassetteCount ?? cassetteInfo.amount
(100 * return R.clamp(0, 100, 100 * (value / cassetteCapacity))
(step === 2 }
? values.cassette1Count ?? cassetteInfo.amount
: values.cassette2Count ?? cassetteInfo.amount)) /
cassetteCapacity
)
return ( return (
<div className={classes.content}> <div className={classes.content}>
@ -173,7 +169,12 @@ const WizardStep = ({
classes.centerAlignment classes.centerAlignment
)}> )}>
<P>Since previous update</P> <P>Since previous update</P>
<Tooltip>Insert tooltip text here.</Tooltip> <Tooltip width={215}>
<P>
Number of bills inside the cashbox, since the last
cashbox changes.
</P>
</Tooltip>
</div> </div>
<div <div
className={classnames( className={classnames(
@ -185,11 +186,6 @@ const WizardStep = ({
</Info1> </Info1>
<P noMargin>accepted bills</P> <P noMargin>accepted bills</P>
</div> </div>
{steps[step - 1].fiatAmount && (
<P noMargin className={classes.fiatTotal}>
= {steps[step - 1].fiatAmount} {fiatCurrency}
</P>
)}
</div> </div>
</div> </div>
</div> </div>