Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/components/_shared/header/mobile-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import NumbersService from "@/lib/helpers/numbers.service";
import useTokens from "@/lib/contracts/useTokens";
import { useChainModal } from "@rainbow-me/rainbowkit";
import { toast } from "sonner";
import { IS_PROD } from "../../../middleware";

const variants = {
open: { opacity: 1, x: 0, y: 21 },
Expand Down Expand Up @@ -259,7 +258,7 @@ const ConnectedInfo = ({ address }: { address: string }) => {
</div>
</div>

{!IS_PROD && (
{
<div
onClick={openChainModal}
className="flex items-center justify-center pt-[16px]"
Expand All @@ -272,7 +271,7 @@ const ConnectedInfo = ({ address }: { address: string }) => {
Chain Settings
</a>
</div>
)}
}
</div>
</div>
);
Expand Down
3 changes: 0 additions & 3 deletions src/lib/contracts/useContracts.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
import { useAccount, useChains } from "wagmi";
import { MentoChain, MentoChainContracts } from "@/lib/types";
import { Celo, Alfajores } from "@/config/chains";
import { IS_PROD } from "../../middleware";

export const useContracts = (): MentoChainContracts => {
const chains = useChains();
const { isConnected, chainId } = useAccount();

if (IS_PROD) return Celo.contracts;

return isConnected && (chainId === Celo.id || chainId === Alfajores.id)
? (chains.find((chain) => chain.id === chainId) as MentoChain).contracts
: Celo.contracts;
Expand Down
4 changes: 1 addition & 3 deletions src/lib/helpers/ensureChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ export function EnsureChain({ children }: { children: ReactNode }) {
(IS_PROD && chainId !== Celo.id) ||
(!IS_PROD && chainId !== Celo.id && chainId !== Alfajores.id)
) {
if (!switching) {
setSwitching(true);
}
if (!switching) setSwitching(false);
}
}
}, [chainId, isConnected, setUpAndSwitch, switchChain, switching]);
Expand Down
Loading