diff options
| author | Adam Soltys <[email protected]> | 2023-02-14 11:19:12 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-02-14 11:19:12 -0800 |
| commit | dba5a60fe9635c13de3b2b47c3cfbfaa6ea278de (patch) | |
| tree | 9331037cb4880270044b8acc468b9898a16ce639 /src/lib/utils.js | |
| parent | 1cf015d50b463b6a3134eb57acab3cc376639f7a (diff) | |
| download | coinos-ui-dba5a60fe9635c13de3b2b47c3cfbfaa6ea278de.tar.gz coinos-ui-dba5a60fe9635c13de3b2b47c3cfbfaa6ea278de.zip | |
handle sending to user
Diffstat (limited to 'src/lib/utils.js')
| -rw-r--r-- | src/lib/utils.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index b3bb29ec..86f722b9 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -147,6 +147,8 @@ export const login = async (user, cookies) => { export const auth = (cookies) => ({ authorization: `Bearer ${cookies.get('token')}` }); +export const fiat = (amount, rate) => (amount * rate) / sats; + export const f = (s, currency) => new Intl.NumberFormat('en-US', { style: 'currency', |
