Open fadeev opened 1 month ago
Right now when you select a token on a chain that is different from the one selected in MetaMask, the button is disabled.
Make the button clickable, so that it opens MetaMask and prompts the user to switch the chain:
Use wagmi:
import { useSwitchChain } from "wagmi"; const { switchChain } = useSwitchChain();
The bulk of the logic should be in the index.tsx of the swap component (and not in the template) to separate logic from presentation.
index.tsx
Make sure the button displays a spinner import { Loader2 } from "lucide-react" when changing the network.
import { Loader2 } from "lucide-react"
Assigned to @mikelord007
@mikelord007 any updates on the issue?
Right now when you select a token on a chain that is different from the one selected in MetaMask, the button is disabled.
Make the button clickable, so that it opens MetaMask and prompts the user to switch the chain:
Use wagmi:
The bulk of the logic should be in the
index.tsx
of the swap component (and not in the template) to separate logic from presentation.Make sure the button displays a spinner
import { Loader2 } from "lucide-react"
when changing the network.