From 9c20e36710345f52de0cb3ad7e3006dd48dfb75d Mon Sep 17 00:00:00 2001 From: ponderingdemocritus Date: Thu, 12 Dec 2024 13:58:58 +1100 Subject: [PATCH] market --- client/src/dojo/setup.ts | 2 +- .../src/ui/components/trading/MarketModal.tsx | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/client/src/dojo/setup.ts b/client/src/dojo/setup.ts index b6b5dee43..cecdcfede 100644 --- a/client/src/dojo/setup.ts +++ b/client/src/dojo/setup.ts @@ -149,7 +149,7 @@ export async function setup({ ...config }: DojoConfig) { network.contractComponents as any, { Composite: { operator: "Or", clauses: [...clauses] } }, [], - 1000, + 5000, true, ); diff --git a/client/src/ui/components/trading/MarketModal.tsx b/client/src/ui/components/trading/MarketModal.tsx index 126a9dbcc..d388d544c 100644 --- a/client/src/ui/components/trading/MarketModal.tsx +++ b/client/src/ui/components/trading/MarketModal.tsx @@ -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"; @@ -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"; @@ -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