Skip to content

Commit

Permalink
Merge pull request #21 from gnosischain/dev
Browse files Browse the repository at this point in the history
fix blockscanner url
  • Loading branch information
giacomognosis committed Mar 8, 2024
2 parents ff82de6 + 1d7949f commit a9bfaac
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 a9bfaac

Please sign in to comment.