From 243abb0a3d29e8e34e263eec843488e3bdb468a4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 31 Oct 2024 09:34:16 -0700 Subject: biome --- .../(app)/send/bitcoin/[address]/+layout.server.ts | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/routes/(app)/send/bitcoin') diff --git a/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts b/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts index a6edf8b0..68191311 100644 --- a/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts +++ b/src/routes/(app)/send/bitcoin/[address]/+layout.server.ts @@ -2,22 +2,22 @@ import { auth, get } from "$lib/utils"; import { redirect } from "@sveltejs/kit"; export async function load({ cookies, params, parent }) { - let { user } = await parent(); - let aid = cookies.get("aid"); - let { address } = params; - let { balance } = await get(`/account/${aid}`, auth(cookies)); + const { user } = await parent(); + const aid = cookies.get("aid"); + const { address } = params; + const { balance } = await get(`/account/${aid}`, auth(cookies)); - try { - let invoice = await get(`/invoice/${address}`); + try { + const invoice = await get(`/invoice/${address}`); - if (invoice) { - let recipient = await get(`/users/${invoice.uid}`); - if (recipient?.id !== user.id) - redirect(307, `/pay/${recipient.username}`); - } - } catch (e) { - // invoice not found - } + if (invoice) { + const recipient = await get(`/users/${invoice.uid}`); + if (recipient?.id !== user.id) + redirect(307, `/pay/${recipient.username}`); + } + } catch (e) { + // invoice not found + } - return { balance }; + return { balance }; } -- cgit v1.2.3