Skip to content

Commit

Permalink
app: treat chainID as a number
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Licari committed Mar 7, 2024
1 parent de5881e commit 9c588ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import Loading from "./components/Loading/Loading"
import Faucet from "./components/FaucetForm/Faucet"

const chainName:{ [key: string]: string }= {
"100": "Gnosis",
"10200": "Chiado"
100: "Gnosis",
10200: "Chiado"
}

function App(): JSX.Element {
const [chainId, setChainId] = useState("10200")
const [chainId, setChainId] = useState(10200)
const [loading, setLoading] = useState(true)
const [enabledTokens, setEnabledTokens] = useState([])
const [faucetLoading, setFaucetLoading] = useState(true)
Expand Down Expand Up @@ -44,7 +44,7 @@ function App(): JSX.Element {
const title = faucetLoading ? "FAUCET" : `${chainName[chainId]} CHAIN`
const subtitle = faucetLoading
? "Loading..."
: (chainId === "100" ? "Faucet" : "Testnet Faucet")
: (chainId === 100 ? "Faucet" : "Testnet Faucet")

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion app/src/components/FaucetForm/Faucet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import HCaptcha from "@hcaptcha/react-hcaptcha"

interface FaucetProps {
enabledTokens: Token[],
chainId: string,
chainId: number,
setLoading: Dispatch<SetStateAction<boolean>>
}

Expand Down

0 comments on commit 9c588ba

Please sign in to comment.