Use faucet to fund laconic accounts while sending a transaction #2

Merged
nabarun merged 9 commits from ag-integrate-faucet into main 2024-07-18 06:02:58 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit a76c76a594 - Show all commits

View File

@ -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

View File

@ -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',