From 274e67b2021d23e036a76b9ae947e8dace0c2de1 Mon Sep 17 00:00:00 2001 From: Guillermo Ramos Date: Sun, 16 Mar 2025 20:07:37 +0100 Subject: Fix rate parsing --- front/src/Main.elm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front/src/Main.elm b/front/src/Main.elm index ad43e46..dfdc55a 100644 --- a/front/src/Main.elm +++ b/front/src/Main.elm @@ -576,13 +576,13 @@ type alias SimSpecs = parseSimSpecs : RawSpecs -> Maybe SimSpecs parseSimSpecs { total, rate, i1, years, updates } = case - ( List.map String.toFloat [ total, i1 ] - , List.map String.toInt [ rate, years ] + ( List.map String.toFloat [ total, i1, rate ] + , List.map String.toInt [ years ] ) of - ( [ Just totalValueF, Just i1F ], [ Just rateI, Just yearsI ] ) -> + ( [ Just totalValueF, Just i1F, Just rateF ], [ Just yearsI ] ) -> Just - { principal = totalValueF * toFloat rateI / 100 + { principal = totalValueF * rateF / 100 , i1 = i1F , years = yearsI , updates = updates -- cgit v1.2.3