aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-core
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-03-17 18:21:43 +0100
committerFlorian Dold <florian@dold.me>2021-03-17 18:21:43 +0100
commit51f2ad9b6dc23bd4a73ef1953fedc654b37e26f0 (patch)
tree441faa4f83fec0a58befb15754cd18e6bab6e299 /packages/taler-wallet-core
parent07cdfb2e4ec761021477271776b81f33af0e731d (diff)
use static helpers for amounts
Diffstat (limited to 'packages/taler-wallet-core')
-rw-r--r--packages/taler-wallet-core/src/util/helpers.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/taler-wallet-core/src/util/helpers.ts b/packages/taler-wallet-core/src/util/helpers.ts
index 36ecc83fe..87fa2e93f 100644
--- a/packages/taler-wallet-core/src/util/helpers.ts
+++ b/packages/taler-wallet-core/src/util/helpers.ts
@@ -21,7 +21,7 @@
/**
* Imports.
*/
-import { AmountJson, Amounts } from "@gnu-taler/taler-util";
+import { amountFractionalBase, AmountJson, Amounts } from "@gnu-taler/taler-util";
import { URL } from "./url";
/**
@@ -30,7 +30,7 @@ import { URL } from "./url";
* settings such as significant digits or currency symbols.
*/
export function amountToPretty(amount: AmountJson): string {
- const x = amount.value + amount.fraction / Amounts.fractionalBase;
+ const x = amount.value + amount.fraction / amountFractionalBase;
return `${x} ${amount.currency}`;
}