Skip to content

Commit

Permalink
Merge pull request #17 from gnosischain/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
giacomognosis authored Mar 7, 2024
2 parents 8b97635 + cc6c6e8 commit 49aa38e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/publish-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,29 @@ jobs:
"REACT_APP_HCAPTCHA_SITE_KEY=${{ secrets.DEV_REACT_APP_HCAPTCHA_SITE_KEY }}"
"REACT_APP_FAUCET_API_URL=${{ secrets.DEV_REACT_APP_FAUCET_API_URL}}"
- name: Main branch / tags - Build and push Docker image
- name: Gnosis Chain - Main branch / tags - Build and push Docker image
if: ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') )
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: app
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}-gc
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"REACT_APP_HCAPTCHA_SITE_KEY=${{ secrets.PROD_GC_REACT_APP_HCAPTCHA_SITE_KEY }}"
"REACT_APP_FAUCET_API_URL=${{ secrets.PROD_GC_REACT_APP_FAUCET_API_URL}}"
- name: Chiado Chain - Main branch / tags - Build and push Docker image
if: ( github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') )
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
with:
context: app
push: true
tags: ${{ steps.meta.outputs.tags }}-chiado
labels: ${{ steps.meta.outputs.labels }}
build-args: |
"REACT_APP_HCAPTCHA_SITE_KEY=${{ secrets.PROD_REACT_APP_HCAPTCHA_SITE_KEY }}"
"REACT_APP_FAUCET_API_URL=${{ secrets.PROD_REACT_APP_FAUCET_API_URL}}"
"REACT_APP_HCAPTCHA_SITE_KEY=${{ secrets.PROD_CHIADO_REACT_APP_HCAPTCHA_SITE_KEY }}"
"REACT_APP_FAUCET_API_URL=${{ secrets.PROD_CHIADO_REACT_APP_FAUCET_API_URL}}"
eks-deployment-restart:
# Run job on branch dev only
Expand Down
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
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -151,7 +151,7 @@ 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"
{chainId === 100
? <a
target="_blank"
rel="noreferrer"
Expand Down

0 comments on commit 49aa38e

Please sign in to comment.