diff --git a/src/components/SelectInput.vue b/src/components/SelectInput.vue
index a2975e2..0785941 100644
--- a/src/components/SelectInput.vue
+++ b/src/components/SelectInput.vue
@@ -1,7 +1,7 @@
-
diff --git a/src/market/location/index.ts b/src/market/location/index.ts
index bdbb095..75eef88 100644
--- a/src/market/location/index.ts
+++ b/src/market/location/index.ts
@@ -1,2 +1,3 @@
+export * from './location';
export * from './MarketLocation';
export { default as MarketLocationInput } from './MarketLocationInput.vue';
diff --git a/src/market/location/location.ts b/src/market/location/location.ts
new file mode 100644
index 0000000..fd89b40
--- /dev/null
+++ b/src/market/location/location.ts
@@ -0,0 +1,18 @@
+import {useLocalStorage} from "@vueuse/core";
+import {defineStore} from "pinia";
+import type {MarketLocation} from "./MarketLocation";
+
+const defaultLocation: MarketLocation = {
+ id: 60003760,
+ name: 'Jita IV - Moon 4 - Caldari Navy Assembly Plant',
+ systemId: 30000142,
+ systemName: 'Jita',
+ regionId: 10000002,
+ regionName: 'The Forge',
+};
+
+export const useMarketLocationStore = defineStore("marketLocation", () => {
+ const location = useLocalStorage("market-location", defaultLocation);
+
+ return {location};
+});
diff --git a/src/pages/ledger/ViewLedger.vue b/src/pages/ledger/ViewLedger.vue
index b472fde..87276c8 100644
--- a/src/pages/ledger/ViewLedger.vue
+++ b/src/pages/ledger/ViewLedger.vue
@@ -3,9 +3,11 @@ import {RouterLink, RouterView} from 'vue-router';
import {appraiseItemBalances, getLedgerBalance, isMain, LedgerLabel, useLedgerParam} from "@/ledger";
import {routeNames} from "@/routes.ts";
import {getMarketTypes, getPrices, IskLabel} from "@/market";
+import {useMarketLocationStore} from '@/market/location';
import {computedAsync} from "@vueuse/core";
const {ledgerId, ledger} = useLedgerParam();
+const marketLocationStore = useMarketLocationStore();
const itemAppraisal = computedAsync(async () => {
if (!ledgerId.value) {
@@ -19,7 +21,7 @@ const itemAppraisal = computedAsync(async () => {
}
const types = await getMarketTypes([...new Set(itemBalances.map(i => i.typeId))]);
- const prices = await getPrices(types);
+ const prices = await getPrices(types, marketLocationStore.location.id);
const appraisal = appraiseItemBalances(itemBalances, prices);
return appraisal.buy === 0 && appraisal.sell === 0 ? undefined : appraisal;
diff --git a/src/pages/market/Appraise.vue b/src/pages/market/Appraise.vue
index e3c9301..ceaa3c1 100644
--- a/src/pages/market/Appraise.vue
+++ b/src/pages/market/Appraise.vue
@@ -1,14 +1,16 @@
@@ -20,6 +22,12 @@ const send = async () => result.value = await appraise(items.value);
+
diff --git a/src/pages/market/TypeInfo.vue b/src/pages/market/TypeInfo.vue
index 468ba82..a641970 100644
--- a/src/pages/market/TypeInfo.vue
+++ b/src/pages/market/TypeInfo.vue
@@ -2,6 +2,7 @@
import {ClipboardButton} from '@/components';
import {getMarketType, getPrice, MarketType, MarketTypeInput, useMarketTaxStore} from "@/market";
import {AcquisitionResultTable, BuyModal} from '@/market/acquisition';
+import {MarketLocationInput, useMarketLocationStore} from '@/market/location';
import {ScanResultTable, toScanResult} from '@/market/scan';
import {acquisitionApi, marketApi} from "@/mammon";
import {ShoppingCartIcon} from '@heroicons/vue/24/outline';
@@ -19,8 +20,9 @@ const item = ref();
const inputItem = ref();
const marketTaxStore = useMarketTaxStore();
+const marketLocationStore = useMarketLocationStore();
const days = useStorage('market-scan-days', 365);
-const price = computedAsync(() => item.value ? getPrice(item.value) : undefined);
+const price = computedAsync(() => item.value ? getPrice(item.value, marketLocationStore.location.id) : undefined);
const result = computedAsync(async () => {
if (!item.value) {
return undefined;
@@ -83,10 +85,11 @@ watch(useRoute(), async route => {