Skip to content

Commit

Permalink
market
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Dec 12, 2024
1 parent d69e713 commit 9c20e36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion client/src/dojo/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export async function setup({ ...config }: DojoConfig) {
network.contractComponents as any,
{ Composite: { operator: "Or", clauses: [...clauses] } },
[],
1000,
5000,
true,
);

Expand Down
17 changes: 1 addition & 16 deletions client/src/ui/components/trading/MarketModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ReactComponent as Scroll } from "@/assets/icons/Scroll.svg";
import { ReactComponent as Sparkles } from "@/assets/icons/Sparkles.svg";
import { ReactComponent as Swap } from "@/assets/icons/Swap.svg";
import { BattleManager } from "@/dojo/modelManager/BattleManager";
import { addToSubscription } from "@/dojo/queries";
import { configManager } from "@/dojo/setup";
import { useDojo } from "@/hooks/context/DojoContext";
import { useBattlesByPosition } from "@/hooks/helpers/battles/useBattles";
Expand All @@ -26,7 +25,7 @@ import { formatTimeDifference } from "@/ui/modules/military/battle-view/BattlePr
import { currencyFormat, getEntityIdFromKeys } from "@/ui/utils/utils";
import { ID, ResourcesIds } from "@bibliothecadao/eternum";
import { useComponentValue } from "@dojoengine/react";
import { Suspense, lazy, useEffect, useMemo, useState } from "react";
import { Suspense, lazy, useMemo, useState } from "react";
import { ModalContainer } from "../ModalContainer";
import { HintModal } from "../hints/HintModal";
import { TroopDisplay } from "../military/TroopChip";
Expand Down Expand Up @@ -71,20 +70,6 @@ export const MarketModal = () => {

const bankStructure = getStructure(bank?.position || { x: 0, y: 0 });

useEffect(() => {
const fetch = async () => {
await addToSubscription(
dojo.setup.network.toriiClient,
dojo.setup.sync,
dojo.setup.network.contractComponents as any,
structureEntityId.toString(),
{ x: 0, y: 0 },
);
};

fetch();
}, [bankStructure?.entity_id]);

const battle = useMemo(() => {
if (battles.length === 0) return null;
return battles
Expand Down

0 comments on commit 9c20e36

Please sign in to comment.