Skip to content

Commit 1742288

Browse files
committed
Merge branch 'next-into-season-1' of https://github.com/BibliothecaDAO/eternum into next-into-season-1
2 parents 5abea52 + 94a376b commit 1742288

File tree

13 files changed

+4
-2625
lines changed

13 files changed

+4
-2625
lines changed

client/apps/game/src/dojo/setup-network.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

client/apps/game/src/hooks/context/account-store.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

client/apps/game/src/ui/components/quest/quest-details.ts

Lines changed: 0 additions & 74 deletions
This file was deleted.

client/apps/game/src/ui/components/trading/market-order-panel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import {
2727
import clsx from "clsx";
2828
import { memo, useCallback, useEffect, useMemo, useState } from "react";
2929

30-
export const ONE_MONTH = 2628000;
30+
const ONE_MONTH = 2628000;
3131
export const MarketResource = memo(
3232
({
3333
entityId,

client/apps/game/src/ui/utils/utils.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
type Resource,
99
} from "@bibliothecadao/eternum";
1010
import { getEntityIdFromKeys } from "@dojoengine/utils";
11-
import { env } from "../../../env";
1211

1312
export { getEntityIdFromKeys };
1413

@@ -235,29 +234,6 @@ export const adjustWonderLordsCost = (cost: ResourceCost[]): ResourceCost[] => {
235234
return cost.map((item) => (item.resource === ResourcesIds.Lords ? { ...item, amount: item.amount * 0.1 } : item));
236235
};
237236

238-
const getSeasonAddressesPath = () => {
239-
return `/resource_addresses/${env.VITE_PUBLIC_CHAIN}/resource_addresses.json`;
240-
};
241-
242-
const getJSONFile = async (filePath: string) => {
243-
const response = await fetch(filePath);
244-
const data = await response.json();
245-
return data;
246-
};
247-
interface ResourceAddresses {
248-
[key: string]: [number, string];
249-
}
250-
251-
export const getSeasonAddresses = async (): Promise<ResourceAddresses> => {
252-
try {
253-
const path = getSeasonAddressesPath();
254-
const data = await getJSONFile(path);
255-
return data;
256-
} catch (error) {
257-
console.error("Error loading season addresses:", error);
258-
return {};
259-
}
260-
};
261237

262238
export const normalizeDiacriticalMarks = (str: string) => {
263239
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");

client/apps/landing/src/lib/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ETERNUM_CONFIG } from "@/utils/config";
1+
import { RESOURCE_PRECISION } from "@bibliothecadao/eternum";
22
import { clsx, type ClassValue } from "clsx";
33
import { twMerge } from "tailwind-merge";
44

@@ -20,9 +20,9 @@ export function displayAddress(string: string) {
2020
}
2121

2222
export function multiplyByPrecision(value: number): number {
23-
return Math.floor(value * ETERNUM_CONFIG().resources.resourcePrecision);
23+
return Math.floor(value * RESOURCE_PRECISION);
2424
}
2525

2626
export function divideByPrecision(value: number): number {
27-
return value / ETERNUM_CONFIG().resources.resourcePrecision;
27+
return value / RESOURCE_PRECISION;
2828
}

0 commit comments

Comments
 (0)