From 3067e76c281d3692fcdb439ba460f50a047f8535 Mon Sep 17 00:00:00 2001 From: wireless_purple Date: Mon, 15 Jul 2024 22:19:15 +0000 Subject: [PATCH] fix watcher, layout changes --- src/lib/server/context.js | 9 +- src/routes/+layout.svelte | 33 +++-- src/routes/market/[market]/+page.svelte | 5 +- static/haveno-reto_logo.svg | 119 ++++++++++++++++++ .../{haveno_logo_icon.png => haveno_logo.png} | Bin ...mbol-on-white-1280.png => monero_logo.png} | Bin 6 files changed, 152 insertions(+), 14 deletions(-) create mode 100644 static/haveno-reto_logo.svg rename static/{haveno_logo_icon.png => haveno_logo.png} (100%) rename static/{monero-symbol-on-white-1280.png => monero_logo.png} (100%) diff --git a/src/lib/server/context.js b/src/lib/server/context.js index 9f4f5f5..947d18e 100644 --- a/src/lib/server/context.js +++ b/src/lib/server/context.js @@ -60,19 +60,18 @@ Bun.file(`${import.meta.env.VITE_DB_PATH}/traditional_currency_list.json`) const watcher = watch(import.meta.env.VITE_DB_PATH, async (_, filename) => { const file = Bun.file(import.meta.env.VITE_DB_PATH + filename); - const contents = await file.json(); switch (filename) { case "offers_statistics.json": - offers.set(formatOffers(contents)); + offers.set(formatOffers(await file.json())); break; case "trade_statistics.json": - trades.set(formatTrades(contents)); + trades.set(formatTrades(await file.json())); break; case "crypto_currency_list.json": - crypto.set(formatCrypto(contents)); + crypto.set(formatCrypto(await file.json())); break; case "traditional_currency_list.json": - fiat.set(formatFiat(contents)); + fiat.set(formatFiat(await file.json())); break; } }); diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 49a6d2b..5b5d490 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -15,22 +15,28 @@ Object.groupBy ||= (values, keyFinder) => {
-
- - +
-