diff --git a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx index 8cb52a2657..50c01e1873 100644 --- a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx +++ b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/TransactionsWatcher.tsx @@ -11,7 +11,7 @@ import { store as worldStore } from "../store"; export function TransactionsWatcher() { const { id: chainId } = useChain(); - const { worldAddress } = useParams(); + const { worldAddress } = useParams<{ worldAddress: string }>(); const wagmiConfig = useConfig(); const { data: worldAbiData } = useWorldAbiQuery(); const abi = worldAbiData?.abi; @@ -98,7 +98,7 @@ export function TransactionsWatcher() { useEffect(() => { for (const write of Object.values(observerWrites)) { const hash = write.hash; - if (hash && write.address === worldAddress) { + if (hash && write.address.toLowerCase() === worldAddress.toLowerCase()) { const transaction = transactions.find((transaction) => transaction.hash === hash); if (!transaction) { handleTransaction(hash, BigInt(write.time) / 1000n); diff --git a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/useObservedTransactions.ts b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/useObservedTransactions.ts index ff49086f28..5627331b58 100644 --- a/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/useObservedTransactions.ts +++ b/packages/explorer/src/app/(explorer)/[chainName]/worlds/[worldAddress]/observe/useObservedTransactions.ts @@ -32,7 +32,7 @@ export type ObservedTransaction = { }; export function useObservedTransactions() { - const { worldAddress } = useParams(); + const { worldAddress } = useParams<{ worldAddress: string }>(); const transactions = useStore(worldStore, (state) => state.transactions); const observerWrites = useStore(observerStore, (state) => state.writes); @@ -40,7 +40,7 @@ export function useObservedTransactions() { const mergedMap = new Map(); for (const write of Object.values(observerWrites)) { - if (write.address !== worldAddress) continue; + if (write.address.toLowerCase() !== worldAddress.toLowerCase()) continue; const parsedAbiItem = parseAbiItem(`function ${write.functionSignature}`) as AbiFunction; const writeResult = write.events.find((event): event is Message<"write:result"> => event.type === "write:result"); diff --git a/packages/explorer/src/chains/rhodolite.ts b/packages/explorer/src/chains/rhodolite.ts deleted file mode 100644 index d973da34cf..0000000000 --- a/packages/explorer/src/chains/rhodolite.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { MUDChain } from "@latticexyz/common/chains"; - -export const rhodolite = { - id: 17420, - name: "Rhodolite", - nativeCurrency: { - decimals: 18, - name: "Ether", - symbol: "ETH", - }, - rpcUrls: { - default: { - http: ["https://rpc.rhodolitechain.com"], - }, - }, - indexerUrl: "https://indexer.mud.rhodolitechain.com", -} satisfies MUDChain; diff --git a/packages/explorer/src/common.ts b/packages/explorer/src/common.ts index bd7af3a874..06eebb04eb 100644 --- a/packages/explorer/src/common.ts +++ b/packages/explorer/src/common.ts @@ -1,10 +1,9 @@ import { anvil } from "viem/chains"; -import { garnet, redstone } from "@latticexyz/common/chains"; -import { rhodolite } from "./chains/rhodolite"; +import { garnet, redstone, rhodolite } from "@latticexyz/common/chains"; export const internalNamespaces = ["world", "store", "metadata", "puppet", "erc20-puppet", "erc721-puppet"]; -export const supportedChains = { anvil, garnet, redstone, rhodolite } as const; +export const supportedChains = { anvil, rhodolite, garnet, redstone } as const; export type supportedChains = typeof supportedChains; export type supportedChainName = keyof supportedChains; diff --git a/packages/explorer/src/observer/relay.ts b/packages/explorer/src/observer/relay.ts index 6c64292170..1c2d6829ef 100644 --- a/packages/explorer/src/observer/relay.ts +++ b/packages/explorer/src/observer/relay.ts @@ -1,10 +1,11 @@ "use client"; -import debug from "debug"; import { isBridgeEnvelope } from "./bridge"; import { relayChannelName } from "./common"; +import { debug } from "./debug"; export function createRelay(): () => void { + debug("creating relay"); const channel = new BroadcastChannel(relayChannelName); function relay(event: MessageEvent) { if (isBridgeEnvelope(event.data)) {