diff options
| author | Adam Soltys <[email protected]> | 2024-02-16 13:47:49 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-04-25 11:58:25 -0700 |
| commit | 0ed6d00cb2366af86e3b06fa74e4c33536027f07 (patch) | |
| tree | 58c54ef76ec18b2b27313351d9e49226a9a5d65e /src/lib/utils.js | |
| parent | ef86423a1e06e1783d832d5e87fef52e2164da27 (diff) | |
| download | coinos-ui-0ed6d00cb2366af86e3b06fa74e4c33536027f07.tar.gz coinos-ui-0ed6d00cb2366af86e3b06fa74e4c33536027f07.zip | |
merge
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 434ca268..8448e3c6 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -167,6 +167,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()); |
