From 80ce257e0057af8f75cdb6d931274c528f1cf080 Mon Sep 17 00:00:00 2001 From: IshaVenikar Date: Wed, 7 Aug 2024 10:33:18 +0530 Subject: [PATCH] Render KYC status if flag is enabled --- src/pages/OnboardingSuccess.tsx | 26 ++++++++++++++++---------- src/pages/SignWithNitroKey.tsx | 8 +++++--- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/src/pages/OnboardingSuccess.tsx b/src/pages/OnboardingSuccess.tsx index a180a52..67c4da5 100644 --- a/src/pages/OnboardingSuccess.tsx +++ b/src/pages/OnboardingSuccess.tsx @@ -8,6 +8,7 @@ import SumsubWebSdk from "@sumsub/websdk-react"; import { MessageHandler } from "@sumsub/websdk"; import { config, fetchAccessToken, getAccessTokenExpirationHandler, options } from "../utils/sumsub"; +import { ENABLE_KYC } from "../constants"; interface Participant { cosmosAddress: string; @@ -104,16 +105,21 @@ const OnboardingSuccess = () => { )} - KYC Status - {!loading && token && cosmosAddress && ( - - )} + {ENABLE_KYC ? ( + + KYC Status + {!loading && token && cosmosAddress && ( + + )} + + ) : '' + } ); }; diff --git a/src/pages/SignWithNitroKey.tsx b/src/pages/SignWithNitroKey.tsx index cd94f67..625f4cf 100644 --- a/src/pages/SignWithNitroKey.tsx +++ b/src/pages/SignWithNitroKey.tsx @@ -2,6 +2,7 @@ import React, { useState, useMemo, useEffect } from "react"; import { useNavigate } from "react-router-dom"; import { enqueueSnackbar } from "notistack"; import canonicalStringify from "canonical-json"; +import { ethers } from "ethers"; import { Select, @@ -58,7 +59,7 @@ const SignWithNitroKey = () => { setIsLoading(false) setEthSignature(ethSignature); - if(ENABLE_KYC) { + if (ENABLE_KYC) { navigate("/user-verification", { state: { message, @@ -73,8 +74,9 @@ const SignWithNitroKey = () => { message, cosmosAddress, receivedEthSig, - kycId, - }}) + kycIdHash, + }, + }); } } catch (error) { console.log("err in signing ", error);