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 | 3fbd2514e38d29ff02cd7765d89476bed6530d37 (patch) | |
| tree | 89674469c2280236e655bbb9458d404f1cbf1422 /src/lib/utils.js | |
| parent | 36e967d2c124c93734f80cd94ce0a2efb0d3d21f (diff) | |
| download | coinos-ui-3fbd2514e38d29ff02cd7765d89476bed6530d37.tar.gz coinos-ui-3fbd2514e38d29ff02cd7765d89476bed6530d37.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()); |
