Add TODOs for follow-on PRs

This commit is contained in:
Adw8 2024-07-25 17:27:03 +05:30
parent a971bf85cf
commit 1a9bbcbc98
2 changed files with 5 additions and 8 deletions

View File

@ -6,9 +6,9 @@ import SignWithNitroKey from "./pages/SignWithNitroKey";
import SignWithCosmos from "./pages/SignWithCosmos"; import SignWithCosmos from "./pages/SignWithCosmos";
import PageNotFound from "./pages/PageNotFound"; import PageNotFound from "./pages/PageNotFound";
import OnboardingSuccess from "./pages/OnboardingSuccess"; import OnboardingSuccess from "./pages/OnboardingSuccess";
import UserVerification from "./pages/UserVerification";
import SignPageLayout from "./layout/SignPageLayout"; import SignPageLayout from "./layout/SignPageLayout";
import { WalletConnectProvider } from "./context/WalletConnectContext"; import { WalletConnectProvider } from "./context/WalletConnectContext";
import UserVerification from "./pages/UserVerification";
function App() { function App() {
return ( return (

View File

@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import { useNavigate } from 'react-router-dom'; import { useNavigate } from 'react-router-dom';
import { Box, Button, Typography } from '@mui/material' import { Box, Typography } from '@mui/material'
import SumsubWebSdk from '@sumsub/websdk-react' import SumsubWebSdk from '@sumsub/websdk-react'
const UserVerification = () => { const UserVerification = () => {
@ -13,7 +13,6 @@ const UserVerification = () => {
useEffect(()=>{ useEffect(()=>{
if (applicationSubmitted) { if (applicationSubmitted) {
console.log('application is submitted');
navigate(`/sign-with-nitro-key/${userId}`) navigate(`/sign-with-nitro-key/${userId}`)
} }
}, [applicationSubmitted, userId, navigate]); }, [applicationSubmitted, userId, navigate]);
@ -35,8 +34,10 @@ const UserVerification = () => {
} }
const accessToken = { const accessToken = {
// TODO: Programmatically fetch access-token using sumsub API
"token": process.env.REACT_APP_SUMSUB_TOKEN!, "token": process.env.REACT_APP_SUMSUB_TOKEN!,
"userId": "deepstack32" // TODO: Generate random user-id string
"userId": "alice"
} }
const messageHandler = (event: any, payload: any ) => { const messageHandler = (event: any, payload: any ) => {
@ -45,7 +46,6 @@ const UserVerification = () => {
} }
if (event === 'idCheck.onApplicantSubmitted'){ if (event === 'idCheck.onApplicantSubmitted'){
console.log('Application is submitted');
setApplicationSubmitted(true); setApplicationSubmitted(true);
} }
@ -54,9 +54,6 @@ const UserVerification = () => {
setApplicationSubmitted(true); setApplicationSubmitted(true);
} }
} }
console.log(event);
console.log("Payload is ", payload);
} }
return ( return (