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

View file

@ -40,11 +40,9 @@ const formatOffers = (e) => {
);
};
const formatCrypto = (e) => {
e.push({
precision: 12,
code: "XMR",
sign: "ɱ",
});
let xmr = e[e.findIndex((e) => e.code === "XMR")];
xmr.sign = "ɱ";
xmr.precision = 12;
return 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 === "CAD")].sign = "$";
e[e.findIndex((e) => e.code === "SEK")].sign = "kr";
e[e.findIndex((e) => e.code === "BRL")].sign = "R$";
return e;
};
@ -67,12 +66,12 @@ Bun.file(`${import.meta.env.VITE_DB_PATH}trade_statistics.json`)
.then((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()
.then((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()
.then((j) => {
crypto.set(formatCrypto(j));