Skip to content

Commit

Permalink
blockscanner url
Browse files Browse the repository at this point in the history
  • Loading branch information
ilge-ustun committed Mar 8, 2024
1 parent 5767138 commit 1d7949f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions app/src/components/FaucetForm/Faucet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ interface FaucetProps {
setLoading: Dispatch<SetStateAction<boolean>>
}

const blockscanner:{ [key: string]: string }= {
100: "https://gnosisscan.io/tx/",
10200: "https://gnosis-chiado.blockscout.com/tx/"
}

function Faucet({ enabledTokens, chainId, setLoading }: FaucetProps): JSX.Element {
const [walletAddress, setWalletAddress] = useState<string>("")
const [token, setToken] = useState<Token | null>(null)
Expand Down Expand Up @@ -151,14 +156,11 @@ function Faucet({ enabledTokens, chainId, setLoading }: FaucetProps): JSX.Elemen
<div className="flex-row success">
<div>Token sent to your wallet address. Hash: </div>
<div>
{chainId === 100
? <a
target="_blank"
rel="noreferrer"
href={`https://gnosisscan.io/tx/${txHash}`}
>{txHash}</a>
: txHash
}
<a
target="_blank"
rel="noreferrer"
href={`${blockscanner[String(chainId)]}${txHash}`}
>{txHash}</a>
</div>
</div>
}
Expand Down

0 comments on commit 1d7949f

Please sign in to comment.