diff options
| author | Adam Soltys <[email protected]> | 2024-02-16 13:47:49 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-02-16 13:47:49 -0800 |
| commit | 25673e9182d2a5869a2e22a438d9dcd83554a190 (patch) | |
| tree | 89674469c2280236e655bbb9458d404f1cbf1422 /src/lib/utils.js | |
| parent | f7416a62c14668a4ea699219b73e11cad2dd5d5e (diff) | |
| download | coinos-ui-25673e9182d2a5869a2e22a438d9dcd83554a190.tar.gz coinos-ui-25673e9182d2a5869a2e22a438d9dcd83554a190.zip | |
items wip
Diffstat (limited to 'src/lib/utils.js')
| -rw-r--r-- | src/lib/utils.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index d1096cd4..53437f56 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -172,6 +172,7 @@ export let auth = (cookies) => ({ authorization: `Bearer ${cookies.get("token")}`, }); +export let btc = (fiat, rate) => Math.round((fiat * sats) / rate); export let fiat = (amount, rate) => (amount * rate) / sats; export let fd = async (req) => { let obj = Object.fromEntries(await req.formData()); |
