Add sum sub API endpoint
This commit is contained in:
parent
702fb3ebaa
commit
40212628f5
@ -6,4 +6,4 @@ REACT_APP_LACONICD_RPC_ENDPOINT=http://localhost:26657
|
||||
REACT_APP_LACONICD_DENOM=photon
|
||||
REACT_APP_FAUCET_ENDPOINT=http://localhost:4000
|
||||
REACT_APP_WALLET_META_URL=http://localhost:3000
|
||||
REACT_APP_SUMSUB_TOKEN=
|
||||
REACT_APP_SUMSUB_API_ENDPOINT=
|
||||
|
@ -17,7 +17,7 @@ const registry = new Registry(
|
||||
const OnboardingSuccess = () => {
|
||||
const location = useLocation();
|
||||
const { cosmosAddress } = location.state as {
|
||||
cosmosAddress: string
|
||||
cosmosAddress?: string
|
||||
}
|
||||
|
||||
const [participant, setParticipant] = useState<Participant>();
|
||||
|
@ -24,16 +24,18 @@ const SignWithCosmos = () => {
|
||||
const [role, setRole] = useState(Role.Participant);
|
||||
|
||||
const navigate = useNavigate();
|
||||
const {message: innerMessage, cosmosAddress, ethSignature, kycId} = location.state as {
|
||||
message: {
|
||||
|
||||
const {message: innerMessage, cosmosAddress, receivedEthSig: ethSignature, kycId} = location.state as {
|
||||
message?: {
|
||||
msg: string;
|
||||
address: string;
|
||||
};
|
||||
cosmosAddress: string;
|
||||
ethSignature: string;
|
||||
kycId: string;
|
||||
cosmosAddress?: string;
|
||||
receivedEthSig?: string;
|
||||
kycId?: string;
|
||||
};
|
||||
const ethAddress = innerMessage.address;
|
||||
|
||||
const ethAddress = innerMessage!.address;
|
||||
|
||||
const createCosmosClient = useCallback(async (endpoint: string) => {
|
||||
return await StargateClient.connect(endpoint);
|
||||
|
@ -24,7 +24,12 @@ const UserVerification = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
|
||||
const {message, cosmosAddress, receivedEthSig} = location.state;
|
||||
const {message, cosmosAddress, receivedEthSig} = location.state as {
|
||||
message?: string;
|
||||
cosmosAddress?: string;
|
||||
receivedEthSig?: string;
|
||||
};
|
||||
|
||||
const userId = cosmosAddress;
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
export const fetchToken = async (userId: string) => {
|
||||
try {
|
||||
const response = await fetch('http://localhost:3000/generate-token', {
|
||||
const response = await fetch(`${process.env.REACT_APP_SUMSUB_API_ENDPOINT}/generate-token`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
|
Loading…
Reference in New Issue
Block a user