Skip to content

Commit

Permalink
Subscribe to swap and arena events on the arena page
Browse files Browse the repository at this point in the history
  • Loading branch information
xbtmatt committed Mar 4, 2025
1 parent 0ffe186 commit 439cbc4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import { ROUTES } from "router/routes";
import ChartContainer from "@/components/charts/ChartContainer";
import { type ClassValue } from "clsx";
import { useReliableSubscribe } from "@hooks/use-reliable-subscribe";

const RewardsRemainingBox = ({ rewardsRemaining }: { rewardsRemaining: bigint }) => {
const { isMobile } = useMatchBreakpoints();
Expand Down Expand Up @@ -114,6 +115,8 @@ export const ArenaClient = (props: ArenaProps) => {
const [position, setPosition] = useState<ArenaPositionModel | undefined | null>(null);
const [history, setHistory] = useState<ArenaLeaderboardHistoryWithArenaInfoModel[]>([]);

useReliableSubscribe({ eventTypes: ["Swap"], arena: true });

const r = useMemo(
() =>
isMobile ? (
Expand Down

0 comments on commit 439cbc4

Please sign in to comment.