Skip to content

Commit

Permalink
Merge branch 'next-into-season-1' of https://github.com/BibliothecaDA…
Browse files Browse the repository at this point in the history
…O/eternum into next-into-season-1
  • Loading branch information
bob0005 committed Jan 20, 2025
2 parents 5abea52 + 94a376b commit 1742288
Show file tree
Hide file tree
Showing 13 changed files with 4 additions and 2,625 deletions.
46 changes: 0 additions & 46 deletions client/apps/game/src/dojo/setup-network.ts

This file was deleted.

17 changes: 0 additions & 17 deletions client/apps/game/src/hooks/context/account-store.ts

This file was deleted.

74 changes: 0 additions & 74 deletions client/apps/game/src/ui/components/quest/quest-details.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
import clsx from "clsx";
import { memo, useCallback, useEffect, useMemo, useState } from "react";

export const ONE_MONTH = 2628000;
const ONE_MONTH = 2628000;
export const MarketResource = memo(
({
entityId,
Expand Down
24 changes: 0 additions & 24 deletions client/apps/game/src/ui/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
type Resource,
} from "@bibliothecadao/eternum";
import { getEntityIdFromKeys } from "@dojoengine/utils";
import { env } from "../../../env";

export { getEntityIdFromKeys };

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

const getSeasonAddressesPath = () => {
return `/resource_addresses/${env.VITE_PUBLIC_CHAIN}/resource_addresses.json`;
};

const getJSONFile = async (filePath: string) => {
const response = await fetch(filePath);
const data = await response.json();
return data;
};
interface ResourceAddresses {
[key: string]: [number, string];
}

export const getSeasonAddresses = async (): Promise<ResourceAddresses> => {
try {
const path = getSeasonAddressesPath();
const data = await getJSONFile(path);
return data;
} catch (error) {
console.error("Error loading season addresses:", error);
return {};
}
};

export const normalizeDiacriticalMarks = (str: string) => {
return str.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
Expand Down
6 changes: 3 additions & 3 deletions client/apps/landing/src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ETERNUM_CONFIG } from "@/utils/config";
import { RESOURCE_PRECISION } from "@bibliothecadao/eternum";
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";

Expand All @@ -20,9 +20,9 @@ export function displayAddress(string: string) {
}

export function multiplyByPrecision(value: number): number {
return Math.floor(value * ETERNUM_CONFIG().resources.resourcePrecision);
return Math.floor(value * RESOURCE_PRECISION);
}

export function divideByPrecision(value: number): number {
return value / ETERNUM_CONFIG().resources.resourcePrecision;
return value / RESOURCE_PRECISION;
}
Loading

0 comments on commit 1742288

Please sign in to comment.