diff --git a/packages/explorer/src/app/(home)/EditableTableCell.tsx b/packages/explorer/src/app/(home)/EditableTableCell.tsx index f8d106a5fe..67ab53b6dc 100644 --- a/packages/explorer/src/app/(home)/EditableTableCell.tsx +++ b/packages/explorer/src/app/(home)/EditableTableCell.tsx @@ -8,7 +8,7 @@ import { SchemaAbiType } from "@latticexyz/schema-type/internal"; import { useQueryClient } from "@tanstack/react-query"; import { waitForTransactionReceipt } from "@wagmi/core"; import { Checkbox } from "../../components/ui/Checkbox"; -import { ACCOUNT_PRIVATE_KEYS, CONFIG } from "../../consts"; +import { ACCOUNT_PRIVATE_KEYS } from "../../consts"; import { useWorldAddress } from "../../hooks/useWorldAddress"; import { camelCase } from "../../lib/utils"; import { useStore } from "../../store"; @@ -70,7 +70,7 @@ export function EditableTableCell({ const transactionReceipt = await waitForTransactionReceipt(wagmiConfig, { hash: txHash, - pollingInterval: CONFIG.TRANSACTION_RECEIPT_POLL_INTERVAL, + pollingInterval: 100, }); toast.success(`Transaction successful with hash: ${txHash}`, { diff --git a/packages/explorer/src/app/(home)/TablesViewer.tsx b/packages/explorer/src/app/(home)/TablesViewer.tsx index 2e70ad0f5f..8085a79a06 100644 --- a/packages/explorer/src/app/(home)/TablesViewer.tsx +++ b/packages/explorer/src/app/(home)/TablesViewer.tsx @@ -24,7 +24,7 @@ import { TableHeader, TableRow, } from "../../components/ui/Table"; -import { CONFIG, NON_EDITABLE_TABLES } from "../../consts"; +import { NON_EDITABLE_TABLES } from "../../consts"; import { EditableTableCell } from "./EditableTableCell"; import { bufferToBigInt } from "./utils/bufferToBigInt"; @@ -75,7 +75,7 @@ export function TablesViewer({ table: selectedTable }: Props) { }); }, enabled: Boolean(selectedTable), - refetchInterval: CONFIG.TABLES_VIEWER_REFETCH_INTERVAL, + refetchInterval: 1000, }); const { data: mudTableConfig } = useQuery({ @@ -161,7 +161,7 @@ export function TablesViewer({ table: selectedTable }: Props) { columns, initialState: { pagination: { - pageSize: CONFIG.TABLE_PAGE_SIZE, + pageSize: 50, }, }, onSortingChange: setSorting, diff --git a/packages/explorer/src/components/AccountSelect.tsx b/packages/explorer/src/components/AccountSelect.tsx index 189d1bcf09..4f50724927 100644 --- a/packages/explorer/src/components/AccountSelect.tsx +++ b/packages/explorer/src/components/AccountSelect.tsx @@ -1,6 +1,6 @@ import { Address, formatEther } from "viem"; import { useBalance } from "wagmi"; -import { ACCOUNTS, CONFIG } from "../consts"; +import { ACCOUNTS } from "../consts"; import { useStore } from "../store"; import { Select, @@ -21,7 +21,7 @@ function AccountSelectItem({ const balance = useBalance({ address, query: { - refetchInterval: CONFIG.BALANCES_REFETCH_INTERVAL, + refetchInterval: 15000, }, }); const balanceValue = balance.data?.value; diff --git a/packages/explorer/src/consts.ts b/packages/explorer/src/consts.ts index 4e3e478f1c..5ce2e167f6 100644 --- a/packages/explorer/src/consts.ts +++ b/packages/explorer/src/consts.ts @@ -1,13 +1,6 @@ import { Hex } from "viem"; import { privateKeyToAccount } from "viem/accounts"; -export const CONFIG = { - TABLES_VIEWER_REFETCH_INTERVAL: 1_000, - BALANCES_REFETCH_INTERVAL: 15_000, - TRANSACTION_RECEIPT_POLL_INTERVAL: 100, - TABLE_PAGE_SIZE: 50, -}; - export const NON_EDITABLE_TABLES = ["__chainState", "__mudStoreTables"]; export const PRIVATE_KEYS: Hex[] = [