aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils.js')
-rw-r--r--lib/utils.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/utils.js b/lib/utils.js
index b5492f72..89217dfa 100644
--- a/lib/utils.js
+++ b/lib/utils.js
@@ -24,6 +24,7 @@ export let bail = (res, msg) => res.code(500).send(msg);
export let SATS = 100000000;
export let sats = (n) => Math.round(n * SATS);
export let btc = (n) => parseFloat((n / SATS).toFixed(8));
+export let fiat = (n, r) => (n * r) / SATS;
export let uniq = (a, k) => [...new Map(a.map((x) => [k(x), x])).values()];
export let pick = (O, K) =>