use full currency list, update deps

This commit is contained in:
wireless_purple 2024-10-04 20:21:09 +00:00
parent a01060ba62
commit 92a38a8c76
3 changed files with 13 additions and 14 deletions

BIN
bun.lockb

Binary file not shown.

View file

@ -10,18 +10,18 @@
"lint": "biome check *" "lint": "biome check *"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^1.9.0", "@biomejs/biome": "^1.9.3",
"@sveltejs/kit": "^2.5.27", "@sveltejs/kit": "^2.6.1",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.7", "@sveltejs/vite-plugin-svelte": "^4.0.0-next.7",
"sass": "^1.78.0", "sass": "^1.79.4",
"svelte": "^5.0.0-next.246", "svelte": "^5.0.0-next.262",
"svelte-adapter-bun": "^0.5.2", "svelte-adapter-bun": "^0.5.2",
"svelte-preprocess": "^6.0.2", "svelte-preprocess": "^6.0.3",
"vite": "^5.4.5" "vite": "^5.4.8"
}, },
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"lightweight-charts": "^4.2.0", "lightweight-charts": "^4.2.1",
"svelte-lightweight-charts": "^2.2.0" "svelte-lightweight-charts": "^2.2.0"
} }
} }

View file

@ -40,11 +40,9 @@ const formatOffers = (e) => {
); );
}; };
const formatCrypto = (e) => { const formatCrypto = (e) => {
e.push({ let xmr = e[e.findIndex((e) => e.code === "XMR")];
precision: 12, xmr.sign = "ɱ";
code: "XMR", xmr.precision = 12;
sign: "ɱ",
});
return e; return e;
}; };
const formatFiat = (e) => { const formatFiat = (e) => {
@ -54,6 +52,7 @@ const formatFiat = (e) => {
e[e.findIndex((e) => e.code === "AUD")].sign = "$"; e[e.findIndex((e) => e.code === "AUD")].sign = "$";
e[e.findIndex((e) => e.code === "CAD")].sign = "$"; e[e.findIndex((e) => e.code === "CAD")].sign = "$";
e[e.findIndex((e) => e.code === "SEK")].sign = "kr"; e[e.findIndex((e) => e.code === "SEK")].sign = "kr";
e[e.findIndex((e) => e.code === "BRL")].sign = "R$";
return e; return e;
}; };
@ -67,12 +66,12 @@ Bun.file(`${import.meta.env.VITE_DB_PATH}trade_statistics.json`)
.then((j) => { .then((j) => {
trades.set(formatTrades(j)); trades.set(formatTrades(j));
}); });
Bun.file(`${import.meta.env.VITE_DB_PATH}active_traditional_currency_list.json`) Bun.file(`${import.meta.env.VITE_DB_PATH}traditional_currency_list.json`)
.json() .json()
.then((j) => { .then((j) => {
fiat.set(formatFiat(j)); fiat.set(formatFiat(j));
}); });
Bun.file(`${import.meta.env.VITE_DB_PATH}active_crypto_currency_list.json`) Bun.file(`${import.meta.env.VITE_DB_PATH}crypto_currency_list.json`)
.json() .json()
.then((j) => { .then((j) => {
crypto.set(formatCrypto(j)); crypto.set(formatCrypto(j));