From 614fbd99b7963ec89666b8b4252fa5f73c81653c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 14 Nov 2024 10:55:08 -0800 Subject: amount component --- src/lib/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib/utils.ts') diff --git a/src/lib/utils.ts b/src/lib/utils.ts index f6b11df0..a15bb8e7 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -189,7 +189,7 @@ export const auth = (cookies: any) => ({ export const btc = (fiat: number, rate: number): number => Math.round((fiat * sats) / rate); -export const fiat = (amount: number, rate: number): number => +export const toFiat = (amount: number, rate: number): number => (amount * rate) / sats; export const fd = async (req: Request): Promise => { -- cgit v1.2.3