diff options
| author | Adam Soltys <[email protected]> | 2024-02-24 21:39:44 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-02-24 21:39:44 -0800 |
| commit | fee415dd6c5ee83159990a5e7d59184b0ab1ec96 (patch) | |
| tree | d6a0fb1d8348c163d15d062f2b3136147dd5b277 /lib/utils.js | |
| parent | f0e144cfe7b4a7a49e9533ffaa6c61000a19bd32 (diff) | |
| download | coinos-server-fee415dd6c5ee83159990a5e7d59184b0ab1ec96.tar.gz coinos-server-fee415dd6c5ee83159990a5e7d59184b0ab1ec96.zip | |
itemized email
Diffstat (limited to 'lib/utils.js')
| -rw-r--r-- | lib/utils.js | 1 |
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) => |
