diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 0000000..76149fe
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,15 @@
+{
+ "useTabs": true,
+ "singleQuote": false,
+ "trailingComma": "all",
+ "printWidth": 80,
+ "plugins": ["prettier-plugin-svelte"],
+ "overrides": [
+ {
+ "files": "*.svelte",
+ "options": {
+ "parser": "svelte"
+ }
+ }
+ ]
+}
diff --git a/README.md b/README.md
index 895e8d8..3717bef 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,7 @@
-# haveno-markets
+# Haveno Markets
+
## Requirements
-* Haveno
-* ./haveno-statsnode --dumpStatistics=true
-* bun
\ No newline at end of file
+
+- Haveno
+- ./haveno-statsnode --dumpStatistics=true
+- bun
diff --git a/bun.lockb b/bun.lockb
index 66ec542..d5a6edb 100755
Binary files a/bun.lockb and b/bun.lockb differ
diff --git a/package.json b/package.json
index 0022550..21fbcb6 100644
--- a/package.json
+++ b/package.json
@@ -6,13 +6,15 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
- "fix": "biome check --write *",
+ "fix": "prettier --write . && biome check --write *",
"lint": "biome check *"
},
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@sveltejs/kit": "^2.6.1",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.7",
+ "prettier": "^3.3.2",
+ "prettier-plugin-svelte": "^3.2.5",
"sass": "^1.79.4",
"svelte": "^5.0.0-next.262",
"svelte-adapter-bun": "^0.5.2",
diff --git a/src/app.html b/src/app.html
index 419db4b..8907eaf 100644
--- a/src/app.html
+++ b/src/app.html
@@ -4,7 +4,7 @@
Haveno Markets
-
+
%sveltekit.head%
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte
index 9639a03..0a6d6d8 100644
--- a/src/routes/+layout.svelte
+++ b/src/routes/+layout.svelte
@@ -17,12 +17,12 @@ Object.groupBy ||= (values, keyFinder) => {
+
\ No newline at end of file
+
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 38ef484..424ca3a 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,4 +1,5 @@
+
+
{marketPair} - Haveno Markets
{marketPair}
- {formatPrice(data.trades?.[0]?.price, market, true, false) || "-"}
+ {formatPrice(data.trades?.[0]?.price, market, true, false) || "-"}
{#if data.trades?.length}
-
-
-
+
+
+
{/if}
-
-
Buy Offers
-
-
-
- Price |
- Amount (XMR) |
- Amount ({market}) |
-
- {#each data.offers[BUY_SELL[0]]?.toSorted((a,b) => b.price - a.price)||[] as offer}
-
- {formatPrice(offer.price, market, false, false)} |
- {formatPrice(offer.amount, "XMR", false, false)} |
- {formatPrice(offer.primaryMarketAmount, market, false, false)} |
-
- {/each}
-
-
-
-
-
Sell Offers
-
-
-
- Price |
- Amount (XMR) |
- Amount ({market}) |
-
- {#each data.offers[BUY_SELL[1]]?.toSorted((a,b) => a.price - b.price)||[] as offer}
-
- {formatPrice(offer.price, market, false, false)} |
- {formatPrice(offer.amount, "XMR", false, false)} |
- {formatPrice(offer.primaryMarketAmount, market, false, false)} |
-
- {/each}
-
-
-
+
+
Buy Offers
+
+
+
+ Price |
+ Amount (XMR) |
+ Amount ({market}) |
+
+ {#each data.offers[BUY_SELL[0]]?.toSorted((a, b) => b.price - a.price) || [] as offer}
+
+ {formatPrice(offer.price, market, false, false)} |
+ {formatPrice(offer.amount, "XMR", false, false)} |
+ {formatPrice(
+ offer.primaryMarketAmount,
+ market,
+ false,
+ false,
+ )} |
+
+ {/each}
+
+
+
+
+
Sell Offers
+
+
+
+ Price |
+ Amount (XMR) |
+ Amount ({market}) |
+
+ {#each data.offers[BUY_SELL[1]]?.toSorted((a, b) => a.price - b.price) || [] as offer}
+
+ {formatPrice(offer.price, market, false, false)} |
+ {formatPrice(offer.amount, "XMR", false, false)} |
+ {formatPrice(
+ offer.primaryMarketAmount,
+ market,
+ false,
+ false,
+ )} |
+
+ {/each}
+
+
+
@@ -134,7 +162,12 @@ const BUY_SELL = isMoneroQuote(market) ? ["SELL", "BUY"] : ["BUY", "SELL"];
{#each data.trades as trade}
- {new Date(trade.date).toISOString().replace("T", " ").replace(/\.\d*Z/, "")} |
+ {new Date(trade.date)
+ .toISOString()
+ .replace("T", " ")
+ .replace(/\.\d*Z/, "")} |
{formatPrice(trade.price, trade.currency, false, false)} |
{formatPrice(trade.xmrAmount, "XMR", false, false)} |
{formatPrice(trade.amount, trade.currency, false, false)} |
@@ -143,4 +176,4 @@ const BUY_SELL = isMoneroQuote(market) ? ["SELL", "BUY"] : ["BUY", "SELL"];
-
\ No newline at end of file
+
diff --git a/src/routes/markets/+page.svelte b/src/routes/markets/+page.svelte
index fd52582..946e9b4 100644
--- a/src/routes/markets/+page.svelte
+++ b/src/routes/markets/+page.svelte
@@ -1,4 +1,5 @@
+