From a4edc3b17f27de5866e11d04a1fc9bbd4d657867 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 5 Jul 2018 00:21:11 +0200 Subject: remove wrong toFloat function Amounts should never be converted to floats, the one use of the function was bogus. --- src/amounts.ts | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/amounts.ts') diff --git a/src/amounts.ts b/src/amounts.ts index 280cd636c..1aefe07e1 100644 --- a/src/amounts.ts +++ b/src/amounts.ts @@ -264,14 +264,6 @@ export function parseOrThrow(s: string): AmountJson { } -/** - * Convert the amount to a float. - */ -export function toFloat(a: AmountJson): number { - return a.value + (a.fraction / fractionalBase); -} - - /** * Convert a float to a Taler amount. * Loss of precision possible. -- cgit v1.2.3