Take faucet endpoint from env
This commit is contained in:
parent
3e5135aa03
commit
a76c76a594
@ -4,3 +4,4 @@ REACT_APP_LACONICD_CHAIN_ID=laconic_9000-1
|
|||||||
REACT_APP_REGISTRY_GQL_ENDPOINT=http://localhost:9473/api
|
REACT_APP_REGISTRY_GQL_ENDPOINT=http://localhost:9473/api
|
||||||
REACT_APP_LACONICD_RPC_ENDPOINT=http://127.0.0.1:26657/
|
REACT_APP_LACONICD_RPC_ENDPOINT=http://127.0.0.1:26657/
|
||||||
REACT_APP_LACONICD_DENOM=photon
|
REACT_APP_LACONICD_DENOM=photon
|
||||||
|
REACT_APP_FAUCET_ENDPOINT=http://localhost:3000
|
||||||
|
@ -2,7 +2,7 @@ import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|||||||
import { useParams, useLocation, useNavigate } from "react-router-dom";
|
import { useParams, useLocation, useNavigate } from "react-router-dom";
|
||||||
import { SnackbarProvider, enqueueSnackbar } from "notistack";
|
import { SnackbarProvider, enqueueSnackbar } from "notistack";
|
||||||
|
|
||||||
import { Box, Button, Card, CardContent, Grid, Typography } from "@mui/material";
|
import { Box, Card, CardContent, Grid, Typography } from "@mui/material";
|
||||||
import LoadingButton from "@mui/lab/LoadingButton/LoadingButton";
|
import LoadingButton from "@mui/lab/LoadingButton/LoadingButton";
|
||||||
import {
|
import {
|
||||||
MsgOnboardParticipantEncodeObject,
|
MsgOnboardParticipantEncodeObject,
|
||||||
@ -45,7 +45,7 @@ const SignWithCosmos = () => {
|
|||||||
const handleTokenRequest = async () => {
|
const handleTokenRequest = async () => {
|
||||||
try {
|
try {
|
||||||
setIsRequesting(true);
|
setIsRequesting(true);
|
||||||
const response = await fetch('http://localhost:3000/faucet', {
|
const response = await fetch(`${process.env.REACT_APP_FAUCET_ENDPOINT!}/faucet`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
|
Loading…
Reference in New Issue
Block a user